I am attempting to retrieve associations between specific objects using the provided endpoint:
/crm/v3/objects/{fromObjectType}/{fromObjectId}/associations/{toObjectType}
In particular, I am aiming to gather associations between contacts and tickets using the following endpoint:
https://api.hubapi.com/crm/v3/objects/contacts/7274956712/associations/Ticket?limit=100&archived=false
The response, however, only includes HubSpot-Defined association types, excluding custom ones:
HTTP/1.1 200 OK
Date: Fri, 19 Apr 2024 08:13:41 GMT
Content-Type: application/json;charset=utf-8
Connection: keep-alive
CF-Ray: 876b6fcea8f51cc8-BUD
CF-Cache-Status: DYNAMIC
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
Vary: origin, Accept-Encoding
Access-Control-Allow-Credentials: false
X-Content-Type-Options: nosniff
x-envoy-upstream-service-time: 22
x-evy-trace-listener: listener_https
x-evy-trace-route-configuration: listener_https/all
x-evy-trace-route-service-name: envoyset-translator
x-evy-trace-served-by-pod: iad02/hubapi-td/envoy-proxy-697677dfc-f8kdn
x-evy-trace-virtual-host: all
X-HubSpot-Correlation-Id: 13203ea0-1a36-4c41-b358-aeeba6be1247
X-HubSpot-RateLimit-Interval-Milliseconds: 10000
X-HubSpot-RateLimit-Max: 100
X-HubSpot-RateLimit-Remaining: 99
X-HubSpot-RateLimit-Secondly: 10
X-HubSpot-RateLimit-Secondly-Remaining: 9
x-request-id: 13203ea0-1a36-4c41-b358-aeeba6be1247
Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=AdD6wiBek0sG5LUFKcnpPTxBYgsPyBlGA87azg9ysrnNE%2FwI%2Bahip7f4AjEhfvpiIztkrxAF1Kz6aWDq4pZkRxmG0LmFBfD61C3MwWVetUpWvA5h8VwzNG%2FDt55GSsp4"}],"group":"cf-nel","max_age":604800}
NEL: {"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}
Server: cloudflare
Content-Length: 154
{
"results": [
{
"id": "2616639580",
"type": "contact_to_ticket"
},
{
"id": "2620841125",
"type": "contact_to_ticket"
},
{
"id": "2621126778",
"type": "contact_to_ticket"
}
]
}
However, I successfully get the associations when executing a GET request to:
https://api.hubapi.com/crm/v3/objects/contacts?limit=100&associations=Ticket&archived=false
Response:
{
"results": [
{
"archived": false,
"associations": {
"tickets": {
"results": [
{
"id": "2616639580",
"type": "contact_to_ticket"
},
{
"id": "2620841125",
"type": "contact_to_ticket"
},
{
"id": "2621126778",
"type": "contact_to_ticket"
},
{
"id": "2616639580",
"type": "contactticket1"
},
{
"id": "2620841125",
"type": "contactticket1"
},
{
"id": "2621126778",
"type": "contactticket1"
},
{
"id": "2620841125",
"type": "contactticket2"
},
{
"id": "2621126778",
"type": "contactticket2"
},
{
"id": "2621126778",
"type": "contactticket3"
}
]
}
},
"createdAt": "2024-03-28T10:19:04.973Z",
"id": "7274956712",
"properties": {
"createdate": "2024-03-28T10:19:04.973Z",
"email": "xxx",
"firstname": "xxx",
"hs_object_id": "7274956712",
"lastmodifieddate": "2024-04-09T08:17:07.147Z",
"lastname": "xxx"
},
"updatedAt": "2024-04-09T08:17:07.147Z"
}
]
}
2 years ago the response was returned in a different format:
https://api.hubapi.com/crm/v3/objects/companies/6266951100/associations/Contact?limit=100&archived=false
{
"results": [
{
"associationTypes": [
{
"category": "HUBSPOT_DEFINED",
"label": null,
"typeId": 280
},
{
"category": "HUBSPOT_DEFINED",
"label": "Primary Company",
"typeId": 2
}
],
"toObjectId": 101
},
{
"associationTypes": [
{
"category": "HUBSPOT_DEFINED",
"label": null,
"typeId": 280
},
{
"category": "HUBSPOT_DEFINED",
"label": "Primary Company",
"typeId": 2
}
],
"toObjectId": 151
}
]
}
Could there have been changes in API behavior or have I overlooked something?