Extractions

Submit an extraction

Submits an extraction over completed files of one upload session. The prompt says what to extract, as a sentence or as an object naming exact output fields. options.json_typed_values: true is recommended for any integration that reads the rows; options.ask_questions: true lets the extraction stop and ask when the documents leave something unsettled.

Idempotent: the same request sent again with the same submission_id returns the existing extraction. Any other request under a submission_id that already belongs to an extraction is refused with SUBMISSION_ID_ALREADY_USED; use a new submission_id for each extraction. The task appears in the web dashboard alongside extractions submitted there.

Rate limit: 30 requests per minute per API key.

post/extractions

Request

  • Base URL: https://api.invoicedataextraction.com/v1
  • URL: https://api.invoicedataextraction.com/v1/extractions
  • Auth: HTTP bearer

Request body

submission_idstring required

An identifier you choose: 1 to 200 characters from letters, digits, dots, underscores, colons and hyphens. Used for upload_session_id, file_id and submission_id.

upload_session_idstring required

An identifier you choose: 1 to 200 characters from letters, digits, dots, underscores, colons and hyphens. Used for upload_session_id, file_id and submission_id.

file_idsClientId[] required

Files completed in this session.

task_namestring required

Your own label for the extraction.

output_structure'automatic' | 'per_invoice' | 'per_line_item' required

per_invoice: one row per invoice. per_line_item: one row per line item, with the invoice-level fields repeated. automatic: chosen from your prompt and documents; responses report the resolved value once processing completes.

Response

The extraction is queued. Wait for it with getExtraction.

successtrue required
extraction_idstring uuid required
submission_state'received' required

Changes

No recorded changes to this operation across all 1 revision of this API.