Skip to main content

Workbook Capture Overview

Read captured Excel workbooks cell by cell, map their labels onto a target structure made from a client example table, and project the facts, via /v1/sheet-capture.

Workbook capture reads an Excel workbook cell by cell: every table rebuilt as a grid, every value with the labels, notes and formula that give it meaning. It is for teams that receive the same kind of workbook from many senders in many layouts.

A target structure is made from a client's example table. Each sender's row and column labels map onto it; a person corrects or approves a mapping once, and every later workbook uses it. Projecting a workbook writes its facts under the structure, each with its source cell. Checks list totals that do not add up.

Every document read follows the document visibility of the person behind the credential: a hidden document answers 404. Changes need documents:write and the upload permission.

cURL: map a workbook onto a structure and read its facts

curl -X POST "https://api.talonic.com/v1/sheet-capture/documents/$DOC_ID/facts" \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"spec_id": "'$STRUCTURE_ID'"}'

curl "https://api.talonic.com/v1/sheet-capture/documents/$DOC_ID/facts?spec_id=$STRUCTURE_ID" \
  -H "Authorization: Bearer $TALONIC_API_KEY"

Endpoints

GET/v1/sheet-capture/specs
POST/v1/sheet-capture/specs

Body

document_id*stringThe captured workbook that holds the example table.
name*stringThe structure's name.
GET/v1/sheet-capture/specs/{specId}

Parameters

specId*stringPath. The structure id.
PATCH/v1/sheet-capture/specs/{specId}

Parameters

specId*stringPath. The structure id.

Body

fieldsarray{ name, default?, aliases? } per field to change.
checksarray{ name, total, parts[] } identity checks.
GET/v1/sheet-capture/specs/{specId}/mappings

Parameters

specId*stringPath. The structure id.
PATCH/v1/sheet-capture/specs/{specId}/mappings/{labelKey}

Parameters

specId*stringPath. The structure id.
labelKey*stringPath. The label key from the mappings list (URL-encoded).

Body

scopestringlabel (default) or header_leaf.
metricstringThe metric the label maps to.
setobjectField values the label sets.
ignorebooleanIgnore the label.
POST/v1/sheet-capture/specs/{specId}/mappings/{labelKey}/approve

Parameters

specId*stringPath. The structure id.
labelKey*stringPath. The label key (URL-encoded).
GET/v1/sheet-capture/documents/{id}

Parameters

id*stringPath. The document id.
GET/v1/sheet-capture/documents/{id}/checks

Parameters

id*stringPath. The document id.
spec_idstringA target structure id.
GET/v1/sheet-capture/documents/{id}/facts

Parameters

id*stringPath. The document id.
spec_id*stringThe target structure id.
metricstringOnly this metric.
limitintegerAt most this many (500 by default, at most 5,000).
offsetintegerFacts to skip.
POST/v1/sheet-capture/documents/{id}/facts

Parameters

id*stringPath. The document id.

Body

spec_id*stringThe target structure id.
GET/v1/sheet-capture/documents/{id}/tables/{tableId}

Parameters

id*stringPath. The document id.
tableId*stringPath. The table id.
limitintegerRows, 300 by default, at most 5,000.
aroundstringAn A1 cell reference, e.g. D42.
fromintegerThe first row.
GET/v1/sheet-capture/documents/{id}/tables/{tableId}/cells/{a1}

Parameters

id*stringPath. The document id.
tableId*stringPath. The table id.
a1*stringPath. The A1 cell reference.
POST/v1/sheet-capture/documents/{id}/run

Parameters

id*stringPath. The document id.

Frequently asked questions

Do I approve every label for every workbook?+
No. A mapping is decided once per target structure; every later workbook with the same label uses it.