Assembly Groups
Read how a pipeline grouped its documents, find groups that need a base document chosen, settle them by choosing one, and assemble the groups again from code.
A pipeline that assembles documents puts related documents (an order with its delivery notes and amendments, say) into one group and builds one row per group. Each group has a base document, its anchor, whose values the others add to or replace. GET /v1/pipelines/{id}/assembly/groups lists every group with its row and its documents, and marks the anchor.
Sometimes a group cannot settle on one base document, for example when two documents both look like the original. GET /v1/pipelines/{id}/assembly/needs-anchor lists those groups, each with the candidates to choose from. POST /v1/pipelines/{id}/assembly/resolve-anchor settles one group by choosing its anchor; the group is assembled again around it.
POST /v1/pipelines/{id}/assembly/rerun assembles all groups again from the current documents, for example after you corrected values or attached more documents. It answers 400 while assembly is already running, when documents of the run are still processing, or when the pipeline does not assemble documents.
Reads need the read scope (or runs:read) and any member. Choosing an anchor is review work: it needs reviews:write, and the key's person must be a Member or above with the edit permission, as in the web app; a Viewer gets 403 insufficient_role. Assembling again needs runs:write, and the key's person must be an Admin of the workspace; in a workspace whose model configuration Talonic manages, it returns 403 insufficient_role.
/v1/pipelines/{id}/assembly/groupsResponse fields (data[])
pipelineDocumentId, documentId, filename, display_name, status, isAnchor./v1/pipelines/{id}/assembly/needs-anchor/v1/pipelines/{id}/assembly/resolve-anchorBody parameters
groupKey from needs-anchor (up to 2000 characters).documentId from needs-anchor.Choose the anchor of a group
curl -X POST https://api.talonic.com/v1/pipelines/$PIPELINE_ID/assembly/resolve-anchor \
-H "Authorization: Bearer $TALONIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"group_key": "PO-2026-0412", "anchor_document_id": "0b6c1f9e-2d4a-4e8b-9c1d-3f5a7b9c2e10"}'/v1/pipelines/{id}/assembly/rerun