Hi Javier,
Thank you for your message.
You can use the DocumentURLProvider class to help you generate URLs for documents. Here is a simple API example:
TreeProvider treeProvider = new TreeProvider(CurrentUser);
int documentID = 4;
CMS.DocumentEngine.TreeNode document = treeProvider.SelectSingleDocument(4);
if (document != null)
{
string url = URLHelper.GetAbsoluteUrl(DocumentURLProvider.GetUrl(document.NodeAliasPath));
}
Let me know if you need anything else.
Kind regards,
Richard Sustek