Custom Objects
The Custom Object record refers to an instance of a Custom Object Class.
The CustomObject object
Properties

object_classString
Optional

fieldsObject
Required

remote_idString
Optional
The third-party API ID of the matching object.

idString
Required

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

remote_fieldsRemoteField[]
Required

The CustomObject object
JSON
{
"object_class": "ff1ff4cb-a66b-47dc-8e2a-50388049e602",
"fields": {
"order_id": "4183634295",
"order_quantity": 50,
"customer_type": "Returning"
},
"remote_id": "4183634295",
"id": "da0b1963-be70-469c-9f8c-06a81d0fe759",
"modified_at": "2021-10-16T00:00:00Z",
"remote_fields": [
{
"remote_field_class": {
"id": "string",
"display_name": "string",
"remote_key_name": "string",
"description": "string",
"is_custom": true,
"is_required": true,
"field_type": "string",
"field_format": "string",
"field_choices": [
"string"
],
"item_schema": {
"item_choices": [
"string"
]
}
},
"value": "string"
}
]
}

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

Returns a list of CustomObject objects.


Header Parameters

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

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

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

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.

include_remote_fieldsBoolean
Optional
Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

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.

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": [
{
"object_class": "ff1ff4cb-a66b-47dc-8e2a-50388049e602",
"fields": {
"order_id": "4183634295",
"order_quantity": 50,
"customer_type": "Returning"
},
"remote_id": "4183634295",
"id": "da0b1963-be70-469c-9f8c-06a81d0fe759",
"modified_at": "2021-10-16T00:00:00Z",
"remote_fields": [
{
"remote_field_class": {
"id": "string",
"display_name": "string",
"remote_key_name": "string",
"description": "string",
"is_custom": true,
"is_required": true,
"field_type": "string",
"field_format": "string",
"field_choices": [
"string"
],
"item_schema": {
"item_choices": [
"string"
]
}
},
"value": "string"
}
]
}
]
}

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

POST
/custom-object-classes/{custom_object_class_id}/custom-objects

Creates a CustomObject object with the given values.


Header Parameters

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

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

custom_object_class_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.
Body Parameters

modelObject
Required
Find available fields below under “Model Parameters”.
Model Parameters
View app-specific writable fields under “Field support by platform” in this section.

fieldsObject
POST v1/custom-object-classes/{custom_object_class_id}/custom-objects
JSON
{
"model": {
"fields": {
"test_field": "hello"
}
}
}
Response
JSON
{
"model": {
"object_class": "ff1ff4cb-a66b-47dc-8e2a-50388049e602",
"fields": {
"order_id": "4183634295",
"order_quantity": 50,
"customer_type": "Returning"
},
"remote_id": "4183634295",
"id": "da0b1963-be70-469c-9f8c-06a81d0fe759",
"modified_at": "2021-10-16T00:00:00Z",
"remote_fields": [
{
"remote_field_class": {
"id": "string",
"display_name": "string",
"remote_key_name": "string",
"description": "string",
"is_custom": true,
"is_required": true,
"field_type": "string",
"field_format": "string",
"field_choices": [
"string"
],
"item_schema": {
"item_choices": [
"string"
]
}
},
"value": "string"
}
]
},
"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}/custom-objects/{id}

Returns a CustomObject object with the given id.


Header Parameters

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

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

custom_object_class_idString
Required

idString
Required

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

include_remote_fieldsBoolean
Optional
Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

Response
JSON
{
"object_class": "ff1ff4cb-a66b-47dc-8e2a-50388049e602",
"fields": {
"order_id": "4183634295",
"order_quantity": 50,
"customer_type": "Returning"
},
"remote_id": "4183634295",
"id": "da0b1963-be70-469c-9f8c-06a81d0fe759",
"modified_at": "2021-10-16T00:00:00Z",
"remote_fields": [
{
"remote_field_class": {
"id": "string",
"display_name": "string",
"remote_key_name": "string",
"description": "string",
"is_custom": true,
"is_required": true,
"field_type": "string",
"field_format": "string",
"field_choices": [
"string"
],
"item_schema": {
"item_choices": [
"string"
]
}
},
"value": "string"
}
]
}

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

PATCH
/custom-object-classes/{custom_object_class_id}/custom-objects/{id}

Updates a CustomObject object with the given id.


Header Parameters

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

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

custom_object_class_idString
Required

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.

Body Parameters

modelObject
Required
Find available fields below under “Model Parameters”.
Model Parameters
View app-specific writable fields under “Field support by platform” in this section.

fieldsObject
PATCH v1/custom-object-classes/{custom_object_class_id}/custom-objects/{id}
JSON
{
"model": {
"fields": {
"test_field": "hello"
}
}
}
Response
JSON
{
"model": {
"object_class": "ff1ff4cb-a66b-47dc-8e2a-50388049e602",
"fields": {
"order_id": "4183634295",
"order_quantity": 50,
"customer_type": "Returning"
},
"remote_id": "4183634295",
"id": "da0b1963-be70-469c-9f8c-06a81d0fe759",
"modified_at": "2021-10-16T00:00:00Z",
"remote_fields": [
{
"remote_field_class": {
"id": "string",
"display_name": "string",
"remote_key_name": "string",
"description": "string",
"is_custom": true,
"is_required": true,
"field_type": "string",
"field_format": "string",
"field_choices": [
"string"
],
"item_schema": {
"item_choices": [
"string"
]
}
},
"value": "string"
}
]
},
"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}/custom-objects/meta/patch/{id}

Returns metadata for CRMCustomObject PATCHs.


Header Parameters

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

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

custom_object_class_idString
Required

idString
Required
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!

GET
/custom-object-classes/{custom_object_class_id}/custom-objects/meta/post

Returns metadata for CRMCustomObject POSTs.


Header Parameters

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

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

custom_object_class_idString
Required
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!