Create a relationship on an entity
/api/v1/entities/{entity_uuid}/relationships
operationId: relationship.create
Base: https://portal.watcheye.com.au/api/v1/entities/{entity_uuid}/relationships
Create a relationship FROM the entity in the path TO another entity on your account. The two entities can belong to different programs.
Direction is set by the order: the path entity becomes from_entity_uuid and the
to_entity_uuid in the body becomes the to side. To record the relationship the other way
around, send the request to the other entity instead.
A relationship of a given type is recorded once between two entities. For symmetric types
(such as spouse_of) the same pair counts as one relationship regardless of direction; a
repeat request returns 409.
Idempotency
This endpoint accepts the Idempotency-Key header so that retries on network failure are
safe. See the Idempotency section of the
API guide for the full contract.
Path parameters
| Field | Description |
|---|---|
entity_uuidrequired |
string (uuid) The entity UUID (the |
Header parameters
| Field | Description |
|---|---|
Idempotency-Key |
string [max 255 characters] Optional client-generated key (typically a UUID) that lets you safely retry a write
request without risk of duplicate work or duplicate billing. A retry with the same key
and body returns the original response verbatim, with the Honoured on |
Request body
Content type application/json.
The relationship details
| Field | Description |
|---|---|
to_entity_uuidrequired |
string (uuid) UUID of the entity the relationship points to. Must be on your account and different from the path entity. |
relationship_typerequired |
string The type of relationship. Each type permits only certain entity types on the |
percentage_ownership |
number (float) Optional ownership percentage (0-100). Only meaningful for relationship types that support ownership (such as |
effective_from |
string (date) Optional date the relationship is effective from (YYYY-MM-DD). |
effective_to |
string (date) Optional date the relationship is effective until (YYYY-MM-DD). Must be on or after effective_from. Ignored (stored as null) for point-in-time relationship types ( |
comment |
string [max 255 characters] Free-text comment. Max 255 characters. Optional for most relationship types, but required for some (such as |
Responses
Relationship created
application/json
| Field | Description |
|---|---|
data |
object A directed link between two entities on your account - for example a person who is a director of a company, the spouse of another person, or the beneficial owner of a trust. The two entities can belong to any program on your account. A relationship is stored once, in the direction it was created ( Deleting a relationship is a soft-delete: the record is kept for audit / compliance purposes and a subsequent list call no longer returns it. |
data. |
string (uuid) The relationship's UUID |
data. |
string The type of relationship. |
data. |
string Human-readable label when read from the |
data. |
string Human-readable label when read from the |
data. |
boolean When |
data. |
string (uuid) UUID of the entity the relationship is recorded from. |
data. |
string (uuid) UUID of the entity the relationship points to. |
data. |
number (float) or null Ownership percentage (0-100) for relationship types that support it (such as |
data. |
string How the relationship was recorded (e.g. |
data. |
string (date) or null Optional date from which the relationship is effective (YYYY-MM-DD). |
data. |
string (date) or null Optional date the relationship is effective until (YYYY-MM-DD). Always null for point-in-time relationship types ( |
data. |
string or null Optional free-text comment describing the relationship. |
data. |
string (date-time) |
data. |
string (date-time) |
api_reference |
string (uuid) |
Conflict - either a request with this Idempotency-Key is currently being processed, or a relationship of this type already exists between these entities.
application/json
| Field | Description |
|---|---|
message |
string |
Idempotency-Key was reused with a different request body
application/json
| Field | Description |
|---|---|
message |
string |