Full Graph
Get the full document linking graph as nodes and edges, or get the graph neighbourhood for a single document with configurable traversal depth.
The linking graph is a bipartite graph with two node types: documents and entities. Edges connect documents to the entity values they share. This endpoint returns the complete graph for your workspace, including detected cases (groups of documents linked through transaction or reference entities) and entity groups (documents linked only through identity entities).
depth parameter instead./v1/linking/graphResponse
Response fields
Response
{
"nodes": [
{ "id": "doc_uuid_1", "type": "document", "label": "invoice_oct.pdf", "document_type": "Invoice" },
{ "id": "doc_uuid_2", "type": "document", "label": "po_2024_001.pdf", "document_type": "Purchase Order" },
{
"id": "entity:ent_uuid_1",
"type": "entity",
"label": "ACME-001",
"category": "identity",
"document_count": 2,
"excluded": false
}
],
"edges": [
{ "source": "doc_uuid_1", "target": "entity:ent_uuid_1", "field_key": "vendor_id", "category": "identity" },
{ "source": "doc_uuid_2", "target": "entity:ent_uuid_1", "field_key": "vendor_id", "category": "identity" }
],
"cases": [
{ "case_key": "a1b2c3d4e5f6a7b8", "document_ids": ["doc_uuid_1", "doc_uuid_2"], "entity_ids": ["ent_uuid_1"] }
],
"entity_groups": [],
"stats": {
"total_documents": 50,
"linked_documents": 38,
"unlinked_documents": 12,
"excluded_entities": 1,
"owner_entities": ["GlobalCorp"],
"high_frequency_entities": []
}
}To explore the graph from a single document outward, use the document subgraph endpoint below. The depth parameter controls how many hops to traverse — each hop alternates between document and entity nodes.
/v1/linking/graph/documents/{id}Response
Response fields
Response
{
"nodes": [
{ "id": "doc_uuid_1", "type": "document", "label": "invoice_oct.pdf", "document_type": "Invoice" },
{ "id": "entity:ent_uuid_1", "type": "entity", "label": "ACME-001", "category": "identity" },
{ "id": "doc_uuid_2", "type": "document", "label": "po_2024_001.pdf", "document_type": "Purchase Order" }
],
"edges": [
{ "source": "doc_uuid_1", "target": "entity:ent_uuid_1", "field_key": "vendor_id", "category": "identity" },
{ "source": "doc_uuid_2", "target": "entity:ent_uuid_1", "field_key": "vendor_id", "category": "identity" }
]
}Errors
Error responses