I have following endpoint with contactId which associated with task, and I want to fetch task details with association of contact. Check below screenshot where I’m hitting the endpoint but I gets an error of infer object.
The reason you are encountering this issue is due to an invalid value being supplied in the “associations” query parameter. In your case it seems as though you’d like to get the associated contacts linked to the task. If that is the case you can use the CRM APIs, specifically GET /crm/v3/objects/tasks as follows:
Notice in the above example I specifcy “associations=contacts”. The response contains the IDs of any associated contacts in the “associations” object. I can then pull information on the contact using GET /crm/v3/objects/contacts/{contactId}.