Skip to main content

Import Reference Tables from a Spec

Create the reference tables a portable Spec carries in your workspace, so its lookups resolve. Returns an outcome per table and the new table ids.

Bring the reference tables that travel with a Spec into your workspace. Post the Spec's reference_data tables; each becomes a reference table you can see in Sources, and the response maps each table's old id to its new one so you can point the Spec at them.

For workspace admins moving a Spec between workspaces, or setting one up from a file. Use dryRun first to see what would be created or skipped.

Requires the specs:write scope, and the person behind the key must hold the workspace workspace permission. A table whose name already exists is skipped unless you list it in overwrite or set overwriteAll. Send an Idempotency-Key header to make retries safe.
POST/v1/matching/reference-data/import-bundle

Body

tables*arrayUp to 50 tables, each { name, rows, columns?, id? }; up to 100,000 rows per table.
dryRunbooleanReport the outcome without writing anything.
overwritestring[]Names of existing tables to replace.
overwriteAllbooleanReplace every existing table with the same name.

curl

curl -s -X POST https://api.talonic.com/v1/matching/reference-data/import-bundle \
  -H "Authorization: Bearer tlnc_your_api_key" \
  -H "Idempotency-Key: import-carriers-01" \
  -H "Content-Type: application/json" \
  -d '{"tables": [{"id": "ref_1", "name": "Carriers", "rows": [{"code": "A1", "name": "Acme Freight"}]}], "dryRun": true}'

Response

Response fields

outcomesarrayOne outcome per table you sent: whether it was created, replaced or skipped, and why.
id_mapobjectOld table id to new reference table id, for rebinding the Spec.

Errors

Error responses

400validation_errorMalformed table, too many tables or rows, or no workspace selected.
403insufficient_scope | insufficient_role | no_personThe key lacks specs:write, or its person lacks the workspace permission.
409idempotency_request_in_progressA request with the same Idempotency-Key is still running; retry shortly.
422idempotency_key_reusedThe Idempotency-Key was already used for a different request.

Frequently asked questions

Can I preview an import?+
Yes. Send dryRun: true to get the per-table outcome without creating anything.