Skip to content

Relationships ​

MethodPathAction
GET/api/v1/{module}/relationshipsList the module's relationships
POST/api/v1/{module}/{id}/relationships/{relationship}Link records
DELETE/api/v1/{module}/{id}/relationships/{relationship}/{relatedId}Unlink a record

Finding relationships ​

GET /api/v1/{module}/relationships lists the module's relationships, each with its name, type, role and related_module. Use the name in the two calls below. A single record's related object is keyed by the same names; see Records.

Linking records ​

Send the IDs of the records to link, up to 500 per request:

POST /api/v1/deals/{id}/relationships/{relationship}
Content-Type: application/json

{ "related_ids": ["...", "..."] }

The response is 201 with the linked records. A link that already exists, or that the relationship's type doesn't allow, gets a 422.

Unlinking a record ​

DELETE /api/v1/deals/{id}/relationships/{relationship}/{relatedId}

This returns an empty 204.

Linking and unlinking need the token's Link permission on the module.