Skip to main content
Import prices from a Document

Authorizations

Authorization
string
header
required

Personal API key. Send X-Organization-Id. The required cumulative level is listed in x-watchdog-permission.

Headers

X-Organization-Id
string

Required for personal API keys. Target one organization you have access to. Migrated keys may omit it to use their original organization. For Clerk sessions, it must match the active organization.

Path Parameters

id
string<uuid>
required

Body

application/json
document_id
string<uuid>
required

A Document linked to this agreement.

worksheets
string[] | null

Excel worksheets to read, by exact name. Only for XLSX and XLS Documents; null reads every worksheet.

Required array length: 1 - 500 elements
Required string length: 1 - 31
instructions
string | null

Guidance for reading this document, e.g. which table or price column applies.

Maximum string length: 20000
default_currency
string | null

ISO 4217 currency for created amount prices whose source states none. Rows keep the source currency.

Pattern: ^[A-Z]{3}$

Response

An import of the same bytes and settings already exists and is queued, running or completed. No work started.

id
string<uuid>
required
agreement_id
string<uuid>
required
document_id
string<uuid>
required

The Document the prices were extracted from.

worksheets
string[] | null
required
instructions
string | null
required
default_currency
string | null
required
status
enum<string>
required

completed means the new prices are appended and the price table is written, in one transaction. Failed and cancelled imports append nothing.

Available options:
queued,
running,
completed,
failed,
cancelled
counts
object | null
required

Row outcomes, set when the import completes; null before and on failure.

failure
object | null
required

extraction_incomplete, extraction_failed, agreement_busy or agreement_deleted. dispatch_failed or admission_expired: processing never started. execution_incomplete: processing ended without a result. Import again in every case.

workflow_run_id
string<uuid>
required
workflow_run_item_id
string<uuid>
required
created_at
string<date-time>
required
updated_at
string<date-time>
required