Thank you, sir! Much appreciated!
So my solution would be $services.rest.url($doc.documentReference)
will give it a try!