Associations
The Association record refers to an instance of an Association Type.
Properties

source_objectObject
Optional

target_objectObject
Optional

association_typeString
Optional

created_atString
Required

modified_atString
Required
This is the datetime that this object was last updated by Merge

The Association object
JSON
{
"source_object": "a8f5d29f-4e50-473f-8f12-27128ffcd37a",
"target_object": "da0b1963-be70-469c-9f8c-06a81d0fe759",
"association_type": "88a71b5c-a3cc-4bce-84ff-d18b049a4081",
"created_at": "2021-09-15T00:00:00Z",
"modified_at": "2021-10-16T00:00:00Z"
}

This endpoint is currently supported for Salesforce, Hubspot, and Zendesk Sell. More integrations coming soon!


GET
/custom-object-classes/{custom_object_class_id}/custom-objects/{object_id}/associations

https://api.merge.dev/api/crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/{object_id}/associations

US
EU

Returns a list of Association objects.


Header Parameters

AuthorizationString
Required
Token-based authentication with required prefix "Bearer"

X-Account-TokenString
Required
Token identifying the end user.
Query & Path Parameters

association_type_idString
Optional
If provided, will only return opportunities with this association_type.

created_afterString
Optional
If provided, will only return objects created after this datetime.

created_beforeString
Optional
If provided, will only return objects created before this datetime.

cursorString
Optional
The pagination cursor value.

custom_object_class_idString
Required

expandString
Optional
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

include_deleted_dataBoolean
Optional
Whether to include data that was marked as deleted by third party webhooks.

include_remote_dataBoolean
Optional
Whether to include the original data Merge fetched from the third-party to produce these models.

modified_afterString
Optional
If provided, only objects synced by Merge after this date time will be returned.

modified_beforeString
Optional
If provided, only objects synced by Merge before this date time will be returned.

object_idString
Required

page_sizeInteger
Optional
Number of results to return per page.

remote_idString
Optional
The API provider's ID for the given object.

Response
JSON
{
"next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
"previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ",
"results": [
{
"source_object": "a8f5d29f-4e50-473f-8f12-27128ffcd37a",
"target_object": "da0b1963-be70-469c-9f8c-06a81d0fe759",
"association_type": "88a71b5c-a3cc-4bce-84ff-d18b049a4081",
"created_at": "2021-09-15T00:00:00Z",
"modified_at": "2021-10-16T00:00:00Z"
}
]
}

This endpoint is currently supported for Salesforce, Hubspot, and Zendesk Sell. More integrations coming soon!

PUT
/custom-object-classes/{source_class_id}/custom-objects/{source_object_id}/associations/{target_class_id}/{target_object_id}/{association_type_id}

https://api.merge.dev/api/crm/v1/custom-object-classes/{source_class_id}/custom-objects/{source_object_id}/associations/{target_class_id}/{target_object_id}/{association_type_id}

US
EU

Creates an Association between source_object_id and target_object_id of type association_type_id.


Header Parameters

AuthorizationString
Required
Token-based authentication with required prefix "Bearer"

X-Account-TokenString
Required
Token identifying the end user.
Query & Path Parameters

association_type_idString
Required

is_debug_modeBoolean
Optional
Whether to include debug fields (such as log file links) in the response.

run_asyncBoolean
Optional
Whether or not third-party updates should be run asynchronously.

source_class_idString
Required

source_object_idString
Required

target_class_idString
Required

target_object_idString
Required

Response
JSON
{
"source_object": "a8f5d29f-4e50-473f-8f12-27128ffcd37a",
"target_object": "da0b1963-be70-469c-9f8c-06a81d0fe759",
"association_type": "88a71b5c-a3cc-4bce-84ff-d18b049a4081",
"created_at": "2021-09-15T00:00:00Z",
"modified_at": "2021-10-16T00:00:00Z"
}

This endpoint is currently supported for Salesforce, Hubspot, and Zendesk Sell. More integrations coming soon!