For the complete documentation index, see llms.txt. This page is also available as Markdown.

Relationships

Use the Relationships endpoint to query relationships between Violet entities.

Use the violet-relationships endpoint to query relationships between entities. We recommend using the explore endpoint to identify the sourceID for the entity or entities you're interested in, then the violet-relationships endpoint to build out structures like PO Lines belonging to a Purchase Order, or Parts belonging to an Assembly.

get

Get all Violet Relationships, or relationship graph from a source entity. When sourceId is provided, returns a graph (entityNodes, requirementNodes, links) for traversal: Assembly → BOM → Parts, Part/BOM line → PO line → PO, PO ↔ Invoice ↔ Bill, PO/line → receipts/delivery. Use recursiveRelationshipTypes / nonRecursiveRelationshipTypes to restrict traversal; see GET /model for types.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
sourceIdstring · uuidOptional

Violet entity ID to start graph traversal from. If omitted, returns all relationships.

recursiveRelationshipTypesstringOptional

Comma-separated relationship types to follow recursively (e.g. assemblyContains,contains for BOM; containsPOLine,receipts,linkedTo for PO/delivery/3-way match). See GET /model for all types.

Example: assemblyContains,contains
nonRecursiveRelationshipTypesstringOptional

Comma-separated relationship types to include only one level.

Example: contains
afterIdstring · uuidOptional

When sourceId is omitted, cursor for keyset pagination: relationship id from the last item of the previous response. Omit for the first page. Ignored when sourceId is provided.

limitinteger · min: 1 · max: 500Optional

When sourceId is omitted, max readable relationships per page (default 100, max 500). Ignored when sourceId is provided.

Default: 100
Responses
200

Without sourceId: array of relationships (paginated). With sourceId: graph of nodes and links.

application/json
or
get/api/violet-relationships
GET /api/violet-relationships HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Without sourceId: array of relationships (paginated). With sourceId: graph of nodes and links.

{
  "entityNodes": [
    {
      "id": "text"
    }
  ],
  "requirementNodes": [
    {
      "id": "text"
    }
  ],
  "links": [
    {
      "id": "text",
      "sourceId": "text",
      "targetId": "text",
      "metadata": {},
      "relationshipType": "containsPOLine",
      "pushPendingStatus": "create",
      "deletedAt": "2026-01-01T00:00:00.000Z",
      "isCustom": true,
      "requirementId": "text",
      "nameOverride": "text"
    }
  ]
}

Get relationship model (types and examples) for assistant/MCP traversal

get

Relationship model for MCP/assistant: which entity types can be related and in which direction. Returns allRelationshipTypes and relationshipTypeExamples (from current DB specs). Use with GET /violet-relationships?sourceId=... to traverse Assembly–BOM–Part, Part–PO line–PO, PO–Invoice–Bill, etc. Optional suggestPath: comma-separated entity types (e.g. "Part,Purchase Order" or "Purchase Order,Invoice,Bill" for 3-way match); response includes suggestedTypesForPath to pass as recursiveRelationshipTypes.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
suggestPathstringOptional

Comma-separated entity types to get suggested relationship types for (e.g. "Part,Purchase Order" or "Purchase Order,Invoice,Bill" for 3-way match). Response includes suggestedTypesForPath to pass as recursiveRelationshipTypes to getEntityRelationships.

Responses
200Success
application/json
get/api/violet-relationships/model
GET /api/violet-relationships/model HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200Success
{
  "allRelationshipTypes": [
    "containsPOLine"
  ],
  "relationshipTypeExamples": {
    "ANY_ADDITIONAL_PROPERTY": [
      {
        "sourceEntityType": "text",
        "targetEntityType": "text"
      }
    ]
  },
  "suggestedTypesForPath": [
    "containsPOLine"
  ]
}

Was this helpful?