Skip to main content
PATCH
Change a relation definition

Authorizations

Authorization
string
header
required

Sign in with the existing Occtoo Studio identity and selected organization.

Path Parameters

relationId
string
required

Raw id of the relation definition (e.g. productVariants).

Body

application/json

Holds changes to a relation definition. Omitted or null fields stay as they are.

name
null | string

New name of the relation definition.

description
null | string

New free-text note. An empty string clears it.

tags
null | string[]

New labels, replacing the old ones.

match
null | object

New pair of card properties that link the cards. Only while status is Active; the links are built again.

sourceDisplayName
null | string

New label for the relation on the source side. An empty string clears it.

targetDisplayName
null | string

New label for the relation on the target side. An empty string clears it.

order
null | object

New order of the target cards related to a source card.

Response

OK

Links the cards of two card definitions, a source and a target. Segments (relation in where) and destination endpoints (relation content) follow relation definitions by id.

id
string
required

Raw id of the relation definition (e.g. productVariants). Use with /v1/relation-definitions/{relationId}.

name
string
required

Name of the relation definition.

description
null | string
required

Free-text note about the relation definition.

tags
string[]
required

Labels for grouping and filtering relation definitions.

sourceCardId
string
required

Raw id of the source card definition (e.g. products).

targetCardId
string
required

Raw id of the target card definition (e.g. variants).

match
object
required

The card properties whose values link a source card to its target cards.

sourceDisplayName
null | string
required

Label for the relation on the source side (e.g. Variants). Null when not set.

targetDisplayName
null | string
required

Label for the relation on the target side (e.g. Variant of). Null when not set.

order
null | object
required

How the target cards related to a source card are ordered. Null = no order set.

status
enum<string>
required

Whether the links between cards are built. See RelationDefinitionStatus.

Available options:
Initializing,
Updating,
Active
createdAt
string<date-time>
required

When the relation definition was created (UTC).

updatedAt
string<date-time>
required

When the relation definition last changed (UTC).