Check out the API Examples.
You can also use something like this:
var document = DocumentHelper.GetDocuments().WhereEquals("NodeAlias", nodeAlias).FirstObject;
int docId = document.DocumentID;
Keep in mind, the NodeAlias
field is NOT a unique value field. So you could get multiple records being returned.