Response from "/crm/v3/objects/calls/search" is missing information

Hi all, I hope someone can help me with my problem.

This is what I am trying to achieve:

I want to find all calls with a specific string in “hs_call_body” to get the contact id of the person who was called.

What I did:

I post to the endpoint “/crm/v3/objects/calls/search” with the following json:

{
 "after":1,
 "limit":100,
 "sorts":[],
 "properties": [
 "hs_call_callee_object_id",
 "hs_call_body"
 ],
 "filterGroups": [{
 "filters":[{
 "value":"search string",
 "operator":"CONTAINS_TOKEN",
 "propertyName":"hs_call_body"
 }]
 }]
}

This works mostly as expected…

The problem I have:

The API request returns 37 calls but only 10 of them have the “hs_call_callee_object_id” property set. The rest is empty.

For confirmation, I manually searched all calls with the same search criteria directly in Hubspot.

The result: The manual export also has 37 calls, but here I get 35 contact IDs in the “Associated Contact IDs” column.

So my question is:

What am I missing? Why does the API return less information about the associated contact IDs than the manual export?

Hey, @tealord :waving_hand: Thanks for your question. This one is tough for our community to troubleshoot as we don’t have access to your portal. Have you tried taking your list of calls that you received from the Search API request and making a second request to the Associations API? That may be a good next step in your troubleshooting.

Best,

Jaycee

Hey @Jaycee_Lewis thank you very much for your reply! Your reference to the Associations API was indeed the hint I needed!

The following request returns all the information I need:

GET /crm/v3/objects/calls/{id}?associations=contacts,companies,deals