Custom Object Classes

The Custom Object Class object is used to represent a Custom Object Schema in the remote system.

The CustomObjectClass object

Properties


nameString
Optional

descriptionString
Optional

labelsObject
Required

fieldsRemoteFieldClassForCustomObjectClass[]
Required

association_typesArray
Optional

idString
Required

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

The CustomObjectClass object
JSON
{
"name": "order",
"description": "Order object",
"labels": {
"singular": "Order",
"plural": "Orders"
},
"fields": [
{
"display_name": "Order ID",
"remote_key_name": "order_id",
"description": "The unique ID for the order.",
"is_required": true,
"is_nested_list": false,
"field_type": "string",
"field_format": null,
"field_choices": [],
"item_schema": null
},
{
"display_name": "Order Quantity",
"remote_key_name": "order_quantity",
"description": "The number of items ordered.",
"is_required": true,
"is_nested_list": false,
"field_type": "number",
"field_format": null,
"field_choices": [],
"item_schema": null
},
{
"display_name": "Customer Type",
"remote_key_name": "customer_type",
"description": "The type of customer.",
"is_required": true,
"is_nested_list": false,
"field_type": "string",
"field_format": null,
"field_choices": [
"New",
"Returning"
],
"item_schema": null
}
],
"association_types": [
{}
],
"id": "ff1ff4cb-a66b-47dc-8e2a-50388049e602",
"remote_id": "9579977"
}

GET

/custom-object-classes

CLOSED BETA

Returns a list of CustomObjectClass 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.

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, will only return objects modified after this datetime.

modified_beforeString
Optional
If provided, will only return objects modified before this datetime.

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": [
{
"name": "order",
"description": "Order object",
"labels": {
"singular": "Order",
"plural": "Orders"
},
"fields": [
{
"display_name": "Order ID",
"remote_key_name": "order_id",
"description": "The unique ID for the order.",
"is_required": true,
"is_nested_list": false,
"field_type": "string",
"field_format": null,
"field_choices": [],
"item_schema": null
},
{
"display_name": "Order Quantity",
"remote_key_name": "order_quantity",
"description": "The number of items ordered.",
"is_required": true,
"is_nested_list": false,
"field_type": "number",
"field_format": null,
"field_choices": [],
"item_schema": null
},
{
"display_name": "Customer Type",
"remote_key_name": "customer_type",
"description": "The type of customer.",
"is_required": true,
"is_nested_list": false,
"field_type": "string",
"field_format": null,
"field_choices": [
"New",
"Returning"
],
"item_schema": null
}
],
"association_types": [
{}
],
"id": "ff1ff4cb-a66b-47dc-8e2a-50388049e602",
"remote_id": "9579977"
}
]
}
GET

/custom-object-classes/{custom_object_class_id}/association-types

CLOSED BETA

Returns a list of AssociationType 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

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, will only return objects modified after this datetime.

modified_beforeString
Optional
If provided, will only return objects modified before this datetime.

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_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"
}
]
}
POST

/custom-object-classes/{custom_object_class_id}/association-types

CLOSED BETA

Creates an AssociationType 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


source_object_classObject
Required

target_object_classesArray
Required

remote_key_nameString
Required

display_nameString
Required

cardinalityString
Required

is_requiredBoolean
Required

POST 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"
},
"warnings": [
{
"source": {
"pointer": "/age"
},
"title": "Unrecognized Field",
"detail": "An unrecognized field, age, was passed in with request data.",
"problem_type": "UNRECOGNIZED_FIELD"
}
],
"errors": [
{
"source": {
"pointer": "/model/custom_fields"
},
"title": "Missing Required Field",
"detail": "custom_fields is a required field on model.",
"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
}
}
]
}
GET

/custom-object-classes/{custom_object_class_id}/association-types/{id}

CLOSED BETA

Returns an AssociationType 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

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

idString
Required

include_remote_dataBoolean
Optional
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"
}
GET

/custom-object-classes/{custom_object_class_id}/association-types/meta/post

Returns metadata for CRMAssociationType 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": {},
"status": {
"linked_account_status": "string",
"can_make_request": true
},
"has_conditional_params": true,
"has_required_linked_account_params": true
}
GET

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

CLOSED BETA

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, will only return objects modified after this datetime.

modified_beforeString
Optional
If provided, will only return objects modified before this datetime.

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",
"remote_fields": [
{
"value": {}
}
]
}
]
}
POST

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

CLOSED BETA

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


fieldsObject
Required
POST v1/custom-object-classes/{custom_object_class_id}/custom-objects
JSON
{
"model": {
"fields": {}
}
}
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",
"remote_fields": [
{
"value": {}
}
]
},
"warnings": [
{
"source": {
"pointer": "/age"
},
"title": "Unrecognized Field",
"detail": "An unrecognized field, age, was passed in with request data.",
"problem_type": "UNRECOGNIZED_FIELD"
}
],
"errors": [
{
"source": {
"pointer": "/model/custom_fields"
},
"title": "Missing Required Field",
"detail": "custom_fields is a required field on model.",
"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
}
}
]
}
GET

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

CLOSED BETA

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",
"remote_fields": [
{
"value": {}
}
]
}
PATCH

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

CLOSED BETA

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


fieldsObject
Required
PATCH v1/custom-object-classes/{custom_object_class_id}/custom-objects/{id}
JSON
{
"model": {
"fields": {}
}
}
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",
"remote_fields": [
{
"value": {}
}
]
},
"warnings": [
{
"source": {
"pointer": "/age"
},
"title": "Unrecognized Field",
"detail": "An unrecognized field, age, was passed in with request data.",
"problem_type": "UNRECOGNIZED_FIELD"
}
],
"errors": [
{
"source": {
"pointer": "/model/custom_fields"
},
"title": "Missing Required Field",
"detail": "custom_fields is a required field on model.",
"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
}
}
]
}
GET

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

CLOSED BETA

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, will only return objects modified after this datetime.

modified_beforeString
Optional
If provided, will only return objects modified before this datetime.

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"
}
]
}
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": {},
"status": {
"linked_account_status": "string",
"can_make_request": true
},
"has_conditional_params": true,
"has_required_linked_account_params": true
}
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": {},
"status": {
"linked_account_status": "string",
"can_make_request": true
},
"has_conditional_params": true,
"has_required_linked_account_params": true
}
GET

/custom-object-classes/{id}

CLOSED BETA

Returns a CustomObjectClass 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


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

idString
Required

include_remote_dataBoolean
Optional
Whether to include the original data Merge fetched from the third-party to produce these models.
Response
JSON
{
"name": "order",
"description": "Order object",
"labels": {
"singular": "Order",
"plural": "Orders"
},
"fields": [
{
"display_name": "Order ID",
"remote_key_name": "order_id",
"description": "The unique ID for the order.",
"is_required": true,
"is_nested_list": false,
"field_type": "string",
"field_format": null,
"field_choices": [],
"item_schema": null
},
{
"display_name": "Order Quantity",
"remote_key_name": "order_quantity",
"description": "The number of items ordered.",
"is_required": true,
"is_nested_list": false,
"field_type": "number",
"field_format": null,
"field_choices": [],
"item_schema": null
},
{
"display_name": "Customer Type",
"remote_key_name": "customer_type",
"description": "The type of customer.",
"is_required": true,
"is_nested_list": false,
"field_type": "string",
"field_format": null,
"field_choices": [
"New",
"Returning"
],
"item_schema": null
}
],
"association_types": [
{}
],
"id": "ff1ff4cb-a66b-47dc-8e2a-50388049e602",
"remote_id": "9579977"
}
PUT

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

CLOSED BETA

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"
}
PUT

/custom-object-classes/generator/{generator_id}

CLOSED BETA

Updates a CustomObjectClass 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


generator_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.
Response
JSON
{
"name": "order",
"description": "Order object",
"labels": {
"singular": "Order",
"plural": "Orders"
},
"fields": [
{
"display_name": "Order ID",
"remote_key_name": "order_id",
"description": "The unique ID for the order.",
"is_required": true,
"is_nested_list": false,
"field_type": "string",
"field_format": null,
"field_choices": [],
"item_schema": null
},
{
"display_name": "Order Quantity",
"remote_key_name": "order_quantity",
"description": "The number of items ordered.",
"is_required": true,
"is_nested_list": false,
"field_type": "number",
"field_format": null,
"field_choices": [],
"item_schema": null
},
{
"display_name": "Customer Type",
"remote_key_name": "customer_type",
"description": "The type of customer.",
"is_required": true,
"is_nested_list": false,
"field_type": "string",
"field_format": null,
"field_choices": [
"New",
"Returning"
],
"item_schema": null
}
],
"association_types": [
{}
],
"id": "ff1ff4cb-a66b-47dc-8e2a-50388049e602",
"remote_id": "9579977"
}