Get associations for a CRM object

Last updated June 17, 2020

GET /crm-associations/v1/associations/:objectId/HUBSPOT_DEFINED/:definitionId

Method Details

HTTP Methods:

GET

Response Format:

json

Requires Authentication?

Yes

Rate Limited?

Yes

Headers

User-Agent

Products:

Marketing

Required Scope:

contacts

Use this endpoint to get the IDs of CRM objects associated with a given object, based on the specified association type. Check out the table on the CRM Associations Overview for a full list of IDs.

Use cases for this endpoint: To get the ticket IDs for all tickets associated with a specific contact record, the objectId would be the contact vid, and the definitionId would be 15.

To get all companies associated with a specific ticket record, the objectId would be the objectId of the ticket, and the definitionId would be 26.

Required parameters How to use Description
OAuth access token or API key Authorization: Bearer {token} header or hapikey={key} query parameter. Used to authenticate the request. Please see this page for more details about authentication.
Object ID /:objectId
Used in the request URL
The ID of the object that you want to get the associations for.
Association type /:definitionId
Used in the request URL
The ID of the type of associations you want. See  the table on the overview page for a list of these IDs.
Association category /HUBSPOT_DEFINED The category of the association HubSpot defines between objects.

Optional parameters How to use Description
Limit &limit=
Used in the request URL
The number of associations to return in a single response. Defaults to 10 if the parameter is not included, supports a maximum value of 100.
Offset &offset=
Used in the request URL
Used to page through the results. Each response will include an offset, which can be used to get the next set of results in the next request.