So in order to retrieve the entity for the lookup field you could pass a header in the webAPI request.
It should be like this:
and then you should get all the logical names in the response:
and this way you can set your odata bind dynamically in your code.