Retrieve associated Opportunity ID when providing docID

Hey is there a way to access the opportunity ID given the documentID. I would like to be able to query given the docID info and be able to find the associated opportunity related to the docID provided. I can definitely complete the task done the other way around. I see in the documents sugar page that there is an associated opportunity , but can't find the endpoint.