Skip to main content

Document Links

Get all entity links for a specific document showing entity values, types, link keys, and linked document IDs.

Retrieve all entity links discovered for a specific document. Each link represents a shared field value — such as a customer ID or PO number — that connects this document to others in the workspace. Use this endpoint to understand how a document relates to the rest of your corpus.

Call this endpoint when building a document detail view or when you need to trace the relationships of a single document before exploring the broader graph. Pass the document UUID as a path parameter — the endpoint returns all entity links regardless of link key category.

Each entry in the response includes the entity_value (the raw shared value), the field_key (which field it was extracted from), and the link_key_category (identity, transaction, or reference). Documents with no extracted field values matching other documents return an empty data array.

Use this alongside the Full Graph subgraph endpoint to progressively explore the linking graph. Start here for a flat list of connections, then call the subgraph endpoint with depth=2 to expand outward from the document and discover second-degree relationships.

The document_count field on each entity indicates how many documents share that value. A high count on an identity entity (e.g. a vendor ID appearing in 50+ documents) is expected, while a high count on a transaction entity may indicate a data quality issue.
GET/v1/linking/documents/{id}/links

Response

Response fields

dataarrayArray of entity link objects.
data[].entity_idstringEntity UUID.
data[].entity_valuestringRaw entity value shared across documents.
data[].link_key_categorystring | nullLink key category: identity, transaction, or reference.
data[].field_keystringField name where this entity value was extracted.
data[].document_countintegerNumber of documents sharing this entity value.

Response

{
  "data": [
    {
      "entity_id": "ent_uuid_1",
      "entity_value": "ACME-001",
      "link_key_category": "identity",
      "field_key": "vendor_id",
      "document_count": 5
    },
    {
      "entity_id": "ent_uuid_2",
      "entity_value": "PO-2024-001",
      "link_key_category": "transaction",
      "field_key": "po_number",
      "document_count": 2
    }
  ]
}

Errors

Error responses

400validation_errorInvalid document ID format. Must be a UUID.
401unauthorizedMissing or invalid API key.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.