Skip to main content

Checks and Export

Read structural findings and format identities for a submission, then export the facts as rows in the client format with the document and source cell attached.

GET /v1/submissions/:documentId/checks returns the check findings of a submission: structural findings (a total that does not equal the sum of its parts, for example) plus, when spec_id is given, the identities of the target structure. Each finding names its cell, the captured table it sits in, and the figure mapped at that cell. A finding that appears more than once, because it was checked under two scopes or an embedded sheet is present twice, is listed once with the other places in copies. At most 1000 findings are read.

GET/v1/submissions/{documentId}/checks

Parameters

documentId*uuidThe workbook document.
spec_iduuidInclude the identities of this target structure.

Response fields (data[])

severitystringerror or warning.
sheet / a1 / embeddedstringThe cell of the finding; embedded is the path of an embedded workbook, else null.
table_id / table_titlestring | nullThe captured table the cell sits in.
expected / actualnumberWhat the cell's parts add up to, and what the cell reads.
partsstring[]Cells the identity adds up.
metric / year / fieldsstring | object | nullThe figure mapped at that cell; empty when no fact was mapped from it.
copiesstring[]Other nodes where the same finding sits.

Response: One finding

{
  "data": [
    {
      "severity": "error",
      "node": "Triangles/D20",
      "sheet": "Triangles",
      "a1": "D20",
      "embedded": null,
      "table_id": "t7",
      "table_title": "Incurred by accident year",
      "expected": 4180000,
      "actual": 4150000,
      "parts": ["D14", "D15", "D16", "D17", "D18", "D19"],
      "metric": "Incurred Loss",
      "year": "2023",
      "copies": []
    }
  ]
}

A finding names its figure through the fact mapped at the finding's cell, so a finding on a cell no fact was mapped from carries no metric. Findings are stored with the facts and replaced whenever the submission is re-captured or re-mapped.

Exporting Facts

GET /v1/submissions/export returns the facts in the client's long format: one row per figure, in the structure's own columns, order and names, followed by the document name and the source cell. Figures stay numbers. The export covers every submission mapped under the structure, or only the one named by document_id. The response is JSON, a header and aligned rows; it is 404 when the target structure is not the workspace's.

GET/v1/submissions/export

Query parameters

spec_id*uuidThe target structure.
document_iduuidOnly this submission.

Response fields (data)

namestringName of the target structure.
headerstring[]The structure's column names in the client's order, then Document and Source.
rowsarrayOne array per fact, aligned with header; figures are numbers when numeric.

cURL: Export one submission

curl "https://api.talonic.com/v1/submissions/export?spec_id=5d1c0a52-0c1e-4b64-9d2e-7a3c4f1e9b10&document_id=0b9a41de-6a9e-4f6c-8f42-1d7f2a3c5e60" \
  -H "Authorization: Bearer $TALONIC_API_KEY"
The export never writes an alias field as its own column; aliases are merged into their field at projection. Stored facts change only on re-mapping, so run POST /v1/submissions/process (or finish a label review, which re-projects every mapped submission) before exporting if mappings changed.

Frequently asked questions

How do I find the cell behind an exported figure?+
Each exported row ends with the document name and the source cell. The same cell appears as sheet and a1 in the facts and cell routes, with embedded set when the figure sits in an embedded workbook.
Why does a finding list copies?+
A finding that appears more than once, because it was checked under two scopes or an embedded sheet is present twice, is listed once. copies holds the other nodes where the same finding sits, so the list stays free of duplicates.
Is the export a file download?+
On /v1 the export is JSON: a header array and aligned rows, with figures as numbers. The header holds the structure's own column names in the client's order, then Document and Source. Build the client's file from these rows.