Skip to main content

Processing and Stated Fields

Capture and map many reinsurance workbooks in one call, plan the run with a dry run, and state field values such as the cedent for a whole submission.

POST /v1/submissions/process captures workbooks that are not captured yet and maps them under a target structure. It is the bulk entry point: one call can take up to 200 documents. The body is optional; with no body it processes every workbook the default limit allows. only narrows the targets by status (not_captured, not_mapped or all), document_ids names specific documents, recapture reads them again even when a capture exists, and dry_run returns the plan without running it.

The call is synchronous for about a minute. It replies with the documents done so far and lists the rest in pending; those finish in the background of the API instance that answered. A document already being processed on that instance is listed in pending and not run twice. Without spec_id documents are only captured, not mapped. Re-capturing a document replaces its run, so the process call re-maps it in the same request.

POST/v1/submissions/process

Body fields (all optional)

spec_iduuidTarget structure to map under. Without it documents are only captured.
document_idsuuid[]Only these documents. At most 200.
onlystringnot_captured, not_mapped or all. Default: all
recapturebooleanCapture again even when a capture exists.
limitintegerDocuments to process in this call, 1 to 200. Default: 50
dry_runbooleanReturn the plan and run nothing.

Response fields (data)

dry_runbooleanTrue for a plan.
plan[]arrayPresent for a dry run: { document_id, filename, capture, map } per document that would run.
results[]arrayPresent for a real run: { document_id, ok, error?, facts?, checks_failed? } per document done. facts and checks_failed are present when the document was mapped.
pending[]uuid[]Present for a real run: documents not done when the call replied.

cURL: Re-map three documents

curl -X POST "https://api.talonic.com/v1/submissions/process" \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "spec_id": "5d1c0a52-0c1e-4b64-9d2e-7a3c4f1e9b10",
    "document_ids": ["0b9a41de-6a9e-4f6c-8f42-1d7f2a3c5e60"],
    "only": "all"
  }'

Response: 201 Results and pending

{
  "data": {
    "dry_run": false,
    "results": [
      { "document_id": "0b9a41de-6a9e-4f6c-8f42-1d7f2a3c5e60", "ok": true, "facts": 312, "checks_failed": 2 }
    ],
    "pending": []
  }
}
A non-empty pending is normal for large workbooks, not an error. Read GET /v1/submissions (or the worklist) later to see when those documents turn mapped; do not call process again for the same documents while they are still running.

Stating Field Values for a Submission

Some values appear nowhere in a workbook as a label, such as the cedent or the currency. POST /v1/submissions/:documentId/fields states them for the whole submission. The values merge into those stated before, and an empty value removes a field. Stated values fill only fields no label sets, and their facts carry stated as the source of the field. At most 20 fields are accepted, with names up to 100 characters and values up to 200.

When spec_id is given and the submission is mapped under it, the submission is re-mapped in the background so its facts carry the values; the response then has remapping: true. The facts change shortly after the call returns, not before.

POST/v1/submissions/{documentId}/fields

Path and body

documentId*uuidThe workbook document.
fields*objectField name to value, for example {"Cedent":"Utica First"}. An empty value removes the field.
spec_iduuidStructure to re-project under, so the facts carry the values.

cURL: State the cedent

curl -X POST "https://api.talonic.com/v1/submissions/0b9a41de-6a9e-4f6c-8f42-1d7f2a3c5e60/fields" \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"fields": {"Cedent": "Utica First"}, "spec_id": "5d1c0a52-0c1e-4b64-9d2e-7a3c4f1e9b10"}'

Response: 201 Fields after the merge

{ "data": { "fields": { "Cedent": "Utica First" }, "remapping": true } }

Frequently asked questions

Why does process return documents in pending?+
The call replies after about a minute with what is done. The remaining documents finish in the background of the API instance that answered. Poll the inbox to see them turn mapped. A document already running on that instance is also listed in pending and is not run twice.
What does a dry run return?+
A plan: one entry per document with capture and map flags that say what would run. Nothing is captured or mapped, and no pending list is returned. Use it to check the filters before a large run.
When do stated values reach the facts?+
After the background re-map that the call starts when spec_id is given and the submission is mapped under that structure. The inbox shows the stated cedent at once; the facts follow shortly after. Stated values never override a field that a label in the workbook sets.