Relationships

Relationships are edges in the record graph. They connect records across models — an Applicant to their Employment records, a Mortgage Application to its collateral Property. These connections power cross-record aggregations and rule evaluations that span multiple entities.

Relationships are created by the platform's resolution pipeline — they are not created directly through the API. You can read and remove relationship links.

Endpoints

Method
Path
Description

GET

/records/{recordId}/relationships

List all relationships for a record

GET

/records/{recordId}/relationships/{relationshipName}

List related records by relationship name

DELETE

/records/{recordId}/relationships/{relationshipName}/{targetRecordId}

Remove a relationship link

List all relationships

GET /records/{recordId}/relationships

Returns all relationship links for a record, grouped by relationship name.

Response 200 OK

{
  "data": [
    {
      "relationshipName": "applicant_employment",
      "targetRecordId": "01957c3a-...",
      "targetModelId": "01957c3a-...",
      "targetModelName": "Employment",
      "createdAt": "2026-02-20T10:05:00Z"
    },
    {
      "relationshipName": "applicant_employment",
      "targetRecordId": "01957c3a-...",
      "targetModelId": "01957c3a-...",
      "targetModelName": "Employment",
      "createdAt": "2026-02-20T10:06:00Z"
    },
    {
      "relationshipName": "application_collateral",
      "targetRecordId": "01957c3a-...",
      "targetModelId": "01957c3a-...",
      "targetModelName": "Property",
      "createdAt": "2026-02-20T10:05:00Z"
    }
  ]
}

List by relationship name

Returns all records connected via a specific relationship type:

Response 200 OK

Relationship names

Relationship names are human-readable slugs declared in the model definition (e.g., applicant_employment, application_collateral). They are validated against the source model's definition — the server confirms the name is declared and the target record's model matches the declared target type.

Remove a relationship

Removes a single relationship link. The platform handles downstream effects — aggregations that depend on the relationship are recomputed and affected rule evaluations are marked stale.

Response 204 No Content

How relationships are created

Relationships are established by the platform's resolution pipeline during the resolution pass. The pipeline uses resolved identity fields to detect and bind relationships between records within a decisioning context. You do not create relationships directly.

To influence which relationships are created, configure relationship declarations in your model definitions.

Last updated