The CRM Associations endpoints are used to manage associations between tickets, products, line items, and their related contacts, companies, and deals.
{fromObjectType}
and {toObjectType}
that tell the direction of the association.
For example:
/crm/v3/associations/contacts/companies/types
./crm/v3/associations/Contacts/Tickets/batch/read
and identify the contact in the request body by its objectId
. In this example, Contacts is the fromObjectType, and Tickets is the toObjectType.GET
request to /crm/v3/associations/{fromObjectType}/{toObjectType}/types
.
Each type will have a returned numerical id
value and name
that can be used to reference the association type in other requests. For default associations, the numerical ID will be the same for all accounts, but for custom association labels, the ID will be unique to your account.
For example, your response would look similar to the following:
POST
request to /crm/v3/associations/{fromObjectType}/{toObjectType}/batch/create
. In your request, include the id
values for the records you want to associate, as well as the type
of the association.
For example, to associate contacts to companies, your request URL would be /crm/v3/associations/Contacts/Companies/batch/create
, and your request would look similar to the following:
POST
request to /crm/v3/associations/{fromObjectType}/{toObjectType}/batch/read
. In your request, include the id
values of the records whose associations you want to view. This will be for the {fromObjectType}
.
For example, to retrieve deals associated with companies, your request URL would be /crm/v3/associations/Companies/Deals/batch/read
and the request body would look like the following, with id
values for the companies whose deal associations you want to view:
id
values of all associated records. For the above example, your response would include the id
values for all associated deals and the association type
. The response would look similar to the following:
crm/v3/associations/{fromObjectType}/companies/batch/read
), only the primary associated company will be returned. To view all associated companies, use the V4 associations API.POST
request to /crm/v3/associations/{fromObjectType}/{toObjectType}/batch/archive
. In the request body, include the id
values for the from record and the to record, as well as their association type.
For example, to remove the association between a company and a deal, your request would look like: