Association Types
The Association Type
object represents the relationship between two objects.The AssociationType object
Properties
source_object_class
ObjectRequired
target_object_classes
AssociationSubType[]Required
remote_key_name
StringOptional
display_name
StringOptional
cardinality
EnumOptional
Possible values include:
ONE_TO_ONE
, MANY_TO_ONE
, MANY_TO_MANY
, ONE_TO_MANY
, or -
in cases where there is no clear mapping - the original value passed through.is_required
BooleanRequired
id
StringRequired
remote_id
StringOptional
The third-party API ID of the matching object.
modified_at
StringRequired
This is the datetime that this object was last updated by Merge
The AssociationType object
JSON
{"source_object_class": {"id": "ff1ff4cb-a66b-47dc-8e2a-50388049e602","origin_type": "CUSTOM_OBJECT"},"target_object_classes": [{"id": "Opportunity","origin_type": "COMMON_MODEL"}],"remote_key_name": "order_to_opportunity","display_name": "Order to Opportunity","cardinality": "ONE_TO_MANY","is_required": true,"id": "5bb73c32-3c6c-4757-ab7d-7d3540a1be31","remote_id": "93","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}/association-types
Returns a list of AssociationType
objects.
Header Parameters
Authorization
StringRequired
Token-based authentication with required prefix "Bearer"
X-Account-Token
StringRequired
Token identifying the end user.
Query & Path Parameters
created_after
StringOptional
If provided, will only return objects created after this datetime.
created_before
StringOptional
If provided, will only return objects created before this datetime.
cursor
StringOptional
The pagination cursor value.
custom_object_class_id
StringRequired
expand
StringOptional
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_data
BooleanOptional
Whether to include data that was marked as deleted by third party webhooks.
include_remote_data
BooleanOptional
Whether to include the original data Merge fetched from the third-party to produce these models.
modified_after
StringOptional
If provided, only objects synced by Merge after this date time will be returned.
modified_before
StringOptional
If provided, only objects synced by Merge before this date time will be returned.
page_size
IntegerOptional
Number of results to return per page.
remote_id
StringOptional
The API provider's ID for the given object.
Response
JSON
{"next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw","previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ","results": [{"source_object_class": {"id": "ff1ff4cb-a66b-47dc-8e2a-50388049e602","origin_type": "CUSTOM_OBJECT"},"target_object_classes": [{"id": "Opportunity","origin_type": "COMMON_MODEL"}],"remote_key_name": "order_to_opportunity","display_name": "Order to Opportunity","cardinality": "ONE_TO_MANY","is_required": true,"id": "5bb73c32-3c6c-4757-ab7d-7d3540a1be31","remote_id": "93","modified_at": "2021-10-16T00:00:00Z"}]}
This endpoint is currently supported for Salesforce, Hubspot, and Zendesk Sell. More integrations coming soon!
POST
/custom-object-classes/{custom_object_class_id}/association-types
Creates an AssociationType
object with the given values.
Header Parameters
Authorization
StringRequired
Token-based authentication with required prefix "Bearer"
X-Account-Token
StringRequired
Token identifying the end user.
Query & Path Parameters
custom_object_class_id
StringRequired
is_debug_mode
BooleanOptional
Whether to include debug fields (such as log file links) in the response.
run_async
BooleanOptional
Whether or not third-party updates should be run asynchronously.
Body Parameters
model
ObjectRequired
Find available fields below under “Model Parameters”.
Model Parameters
View app-specific writable fields under “Field support by platform” in this section.source_object_class
Objecttarget_object_classes
Arrayremote_key_name
Stringdisplay_name
Stringcardinality
StringONE_TO_ONE
- ONE_TO_ONE
is_required
BooleanPOST v1/custom-object-classes/{custom_object_class_id}/association-types
JSON
{"model": {"source_object_class": {"id": "string","origin_type": "CUSTOM_OBJECT"},"target_object_classes": [{"id": "string","origin_type": "CUSTOM_OBJECT"}],"remote_key_name": "string","display_name": "string","cardinality": "ONE_TO_ONE","is_required": false}}
Response
JSON
{"model": {"source_object_class": {"id": "ff1ff4cb-a66b-47dc-8e2a-50388049e602","origin_type": "CUSTOM_OBJECT"},"target_object_classes": [{"id": "Opportunity","origin_type": "COMMON_MODEL"}],"remote_key_name": "order_to_opportunity","display_name": "Order to Opportunity","cardinality": "ONE_TO_MANY","is_required": true,"id": "5bb73c32-3c6c-4757-ab7d-7d3540a1be31","remote_id": "93","modified_at": "2021-10-16T00:00:00Z"},"warnings": [{"source": {"pointer": "/age"},"title": "Unrecognized Field","detail": "An unrecognized field, age, was passed in with request data.","problem_type": "UNRECOGNIZED_FIELD"}],"errors": [{"source": {},"title": "Missing Required Field","problem_type": "MISSING_REQUIRED_FIELD"}],"logs": [{"log_id": "99433219-8017-4acd-bb3c-ceb23d663832","dashboard_view": "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832","log_summary": {"url": "https://harvest.greenhouse.io/v1/candidates/","method": "POST","status_code": 200}}]}
This endpoint is currently supported for Salesforce, Hubspot, and Zendesk Sell. More integrations coming soon!
GET
/custom-object-classes/{custom_object_class_id}/association-types/{id}
Returns an AssociationType
object with the given id
.
Header Parameters
Authorization
StringRequired
Token-based authentication with required prefix "Bearer"
X-Account-Token
StringRequired
Token identifying the end user.
Query & Path Parameters
custom_object_class_id
StringRequired
expand
StringOptional
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
id
StringRequired
include_remote_data
BooleanOptional
Whether to include the original data Merge fetched from the third-party to produce these models.
Response
JSON
{"source_object_class": {"id": "ff1ff4cb-a66b-47dc-8e2a-50388049e602","origin_type": "CUSTOM_OBJECT"},"target_object_classes": [{"id": "Opportunity","origin_type": "COMMON_MODEL"}],"remote_key_name": "order_to_opportunity","display_name": "Order to Opportunity","cardinality": "ONE_TO_MANY","is_required": true,"id": "5bb73c32-3c6c-4757-ab7d-7d3540a1be31","remote_id": "93","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}/association-types/meta/post
Returns metadata for CRMAssociationType
POSTs.
Header Parameters
Authorization
StringRequired
Token-based authentication with required prefix "Bearer"
X-Account-Token
StringRequired
Token identifying the end user.
Query & Path Parameters
custom_object_class_id
StringRequired
Response
JSON
{"request_schema": {},"remote_field_classes": {},"status": {"linked_account_status": "string","can_make_request": true},"has_conditional_params": true,"has_required_linked_account_params": true}
This endpoint is currently supported for Salesforce, Hubspot, and Zendesk Sell. More integrations coming soon!