My angular app, was suddenly giving strange errors when i used web api put to assign a lookup value on the entity using web api:
The URI 'MYTENANT.crm.dynamics.com/.../kipon_staffs(d3dd9b93-1b0b-e811-80ee-00505694498c)' is not valid because it is not based on 'https://MYTENANT.crm.dynamics.com/api/data/v8.2/'.
The reason turned out to be very simple. I was using the v9.0 endpoint in the url, but due to use of generic libraries, the odata link in the body of the request, was still pointing to the 8.2 endpoint
I know for sure this has been working without any problems, but suddenly it was an issue. The fix was simple. Use the same version in the url as in the @odata.id value.