For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Logo
Resources
Log inGet a demo
Get startedAPI referenceImplementation
Get startedAPI referenceImplementation
    • Overview
          • GET/custom-object-classes/{custom_object_class_id}/association-types
          • POST/custom-object-classes/{custom_object_class_id}/association-types
          • GET/custom-object-classes/{custom_object_class_id}/association-types/{id}
          • GET/custom-object-classes/{custom_object_class_id}/association-types/meta/post
UnifiedAgent HandlerGateway
UnifiedAgent HandlerGateway
Resources
Log inGet a demo
Custom ObjectsAssociation Types

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

Beta
POST
/crm/v1/custom-object-classes/:custom_object_class_id/association-types
POST
/api/crm/v1/custom-object-classes/:custom_object_class_id/association-types
$curl -X POST https://api.merge.dev/api/crm/v1/custom-object-classes/custom_object_class_id/association-types \
> -H "X-Account-Token: X-Account-Token" \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "model": {
> "source_object_class": {
> "id": "string",
> "origin_type": "CUSTOM_OBJECT"
> },
> "target_object_classes": [
> {
> "id": "string",
> "origin_type": "CUSTOM_OBJECT"
> }
> ],
> "remote_key_name": "string"
> }
>}'
201Created
1{
2 "model": {
3 "id": "5bb73c32-3c6c-4757-ab7d-7d3540a1be31",
4 "remote_id": "93",
5 "created_at": "2021-09-15T00:00:00Z",
6 "modified_at": "2021-10-16T00:00:00Z",
7 "source_object_class": {
8 "id": "ff1ff4cb-a66b-47dc-8e2a-50388049e602",
9 "origin_type": "CUSTOM_OBJECT"
10 },
11 "target_object_classes": [
12 {
13 "id": "Opportunity",
14 "origin_type": "COMMON_MODEL"
15 }
16 ],
17 "remote_key_name": "order_to_opportunity",
18 "display_name": "Order to Opportunity",
19 "cardinality": "ONE_TO_MANY",
20 "is_required": true
21 },
22 "warnings": [
23 {
24 "title": "Unrecognized Field",
25 "detail": "An unrecognized field, age, was passed in with request data.",
26 "problem_type": "UNRECOGNIZED_FIELD",
27 "source": {
28 "pointer": "/age"
29 },
30 "block_merge_link": true,
31 "raw_error": "string",
32 "error_code": 1
33 }
34 ],
35 "errors": [
36 {
37 "title": "Missing Required Field",
38 "detail": "custom_fields is a required field on model.",
39 "problem_type": "MISSING_REQUIRED_FIELD",
40 "source": {
41 "pointer": "/model/custom_fields"
42 },
43 "block_merge_link": true,
44 "raw_error": "string",
45 "error_code": 1
46 }
47 ],
48 "logs": [
49 {
50 "log_id": "99433219-8017-4acd-bb3c-ceb23d663832",
51 "dashboard_view": "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832",
52 "log_summary": {
53 "url": "www.exampleintegration.com/api/v1/exampleapi",
54 "method": "POST",
55 "status_code": 200
56 }
57 }
58 ]
59}

Creates an AssociationType object with the given values.

Was this page helpful?
Previous

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

Next

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

Built with

Authentication

AuthorizationBearer

Token-based authentication with required prefix “Bearer”

Path parameters

custom_object_class_idstringRequiredformat: "uuid"

Headers

X-Account-TokenstringRequired
Token identifying the end user.

Query parameters

is_debug_modebooleanOptional

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

run_asyncbooleanOptional

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

Request

This endpoint expects an object.
modelobjectRequired

Response

modelobject

Description

The Association Type object represents the relationship between two objects.

Usage Example

TODO

warningslist of objects
errorslist of objects
logslist of objects