Skip to navigation

Export Document Set

View as Markdown

Downloads one document set as a file — the same documents, cards, and numbers as the reconcile details screen, snapshotted at the current result.

format=json (the default) returns the export document; format=csv returns the flattened form described below. Content-Disposition carries the filename, for example INV-500.reconciliation.json. Numbers are strings so quantities and amounts do not round.

The CSV form has 18 columns. Each comparison writes a comparison row (source value, compared value, remaining, excess and status), followed by one match row per matched target (matches_document_identifier, matches_row_id, matches_value). Use the kind column to tell them apart; columns that do not apply to a row are empty. Column names follow the JSON:

kind,document_identifier,row_id,name,comparison_rule_name,target_group_name,source_value,compared_value,remaining,excess,status,matches_document_identifier,matches_row_id,matches_value,fulfillment_claim_status,fulfillment_allocated_amount,fulfillment_residual_amount,fulfillment_competing_document_set_ids
comparison,INV-500,23,Quantity check,Qty vs Purchase order,Purchase order,50,50,,,RECONCILED,,,,,,,
match,INV-500,23,Quantity check,Qty vs Purchase order,Purchase order,,,,,,PO-500,23,50,,,,

The JSON body follows staple.reconciliation.document-set.export/v1 (https://schemas.staple.ai/reconciliation/document-set-export/v1). New fields are additive, so check schema before parsing. The example below is a one-card, one-target export; the schema is the full contract.

Requires reconciliation v2 on the organisation; other tenants receive 404.

Authentication

x-api-keystring
API key issued by Staple.
AuthorizationBearer
JWT obtained from the login endpoint.

Path parameters

uuidstringRequired
Linking set UUID, as returned by List Linking Sets.
idstringRequired
Document set ID, as returned by List Document Sets.

Query parameters

formatenumOptionalDefaults to json

Export format. Defaults to json.

Allowed values:

Response

The export file. Content-Disposition carries the filename.