Skip to content

Batches

Create Batch
client.batches.create(BatchCreateParams { config, source_directory_id, organization_id, project_id } params, RequestOptionsoptions?): BatchCreateResponse { id, config, project_id, 5 more }
POST/api/v2/batches
List Batches
client.batches.list(BatchListParams { created_at_on_or_after, created_at_on_or_before, organization_id, 5 more } query?, RequestOptionsoptions?): PaginatedCursor<BatchListResponse { id, config, project_id, 5 more } >
GET/api/v2/batches
Get Batch
client.batches.get(stringbatchID, BatchGetParams { expand, organization_id, project_id } query?, RequestOptionsoptions?): BatchGetResponse { id, config, project_id, 5 more }
GET/api/v2/batches/{batch_id}
ModelsExpand Collapse
BatchCreateResponse { id, config, project_id, 5 more }

A top-level batch.

Example: { “id”: “bat-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee”, “project_id”: “prj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee”, “source_directory_id”: “dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee”, “config”: { “job”: { “type”: “parse_v2”, “configuration_id”: “cfg-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee” } }, “status”: “COMPLETED”, “results”: [ { “source_directory_file_id”: “dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee”, “job_reference”: { “type”: “parse_v2”, “id”: “pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee” }, “error_message”: null } ] }

Batch-level FAILED means the orchestration failed and cannot provide a reliable per-file result set. results is only populated when explicitly requested with expand=results and may be null while a batch is still running or before result mappings are available.

id: string

Unique identifier

config: Config { job }

Batch configuration snapshot.

job: Job { configuration_id, type }

Job to create for each file in the source directory.

configuration_id: string

Saved product configuration ID matching the job type.

type: "parse_v2" | "extract_v2"

Product job type to run for each source directory file.

One of the following:
"parse_v2"
"extract_v2"
project_id: string

Project this batch belongs to.

source_directory_id: string

Directory being processed.

status: "PENDING" | "THROTTLED" | "RUNNING" | 3 more

Current batch status.

One of the following:
"PENDING"
"THROTTLED"
"RUNNING"
"COMPLETED"
"FAILED"
"CANCELLED"
created_at?: string | null

Creation datetime

formatdate-time
results?: Array<Result> | null

Expanded per-file result mappings. Null unless requested with expand=results, or until result mappings are available.

source_directory_file_id: string

Source directory file processed by this batch.

error_message?: string | null

Batch-level mapping error if the system could not create or associate a job for this source file.

job_reference?: JobReference | null

Reference to a job produced by a batch.

Example: { “type”: “parse_v2”, “id”: “pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee” }

id: string

Job ID, such as a parse job ID.

type: "parse_v2" | "extract_v2"

Type of job produced for the file.

One of the following:
"parse_v2"
"extract_v2"
updated_at?: string | null

Update datetime

formatdate-time
BatchListResponse { id, config, project_id, 5 more }

A top-level batch.

Example: { “id”: “bat-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee”, “project_id”: “prj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee”, “source_directory_id”: “dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee”, “config”: { “job”: { “type”: “parse_v2”, “configuration_id”: “cfg-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee” } }, “status”: “COMPLETED”, “results”: [ { “source_directory_file_id”: “dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee”, “job_reference”: { “type”: “parse_v2”, “id”: “pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee” }, “error_message”: null } ] }

Batch-level FAILED means the orchestration failed and cannot provide a reliable per-file result set. results is only populated when explicitly requested with expand=results and may be null while a batch is still running or before result mappings are available.

id: string

Unique identifier

config: Config { job }

Batch configuration snapshot.

job: Job { configuration_id, type }

Job to create for each file in the source directory.

configuration_id: string

Saved product configuration ID matching the job type.

type: "parse_v2" | "extract_v2"

Product job type to run for each source directory file.

One of the following:
"parse_v2"
"extract_v2"
project_id: string

Project this batch belongs to.

source_directory_id: string

Directory being processed.

status: "PENDING" | "THROTTLED" | "RUNNING" | 3 more

Current batch status.

One of the following:
"PENDING"
"THROTTLED"
"RUNNING"
"COMPLETED"
"FAILED"
"CANCELLED"
created_at?: string | null

Creation datetime

formatdate-time
results?: Array<Result> | null

Expanded per-file result mappings. Null unless requested with expand=results, or until result mappings are available.

source_directory_file_id: string

Source directory file processed by this batch.

error_message?: string | null

Batch-level mapping error if the system could not create or associate a job for this source file.

job_reference?: JobReference | null

Reference to a job produced by a batch.

Example: { “type”: “parse_v2”, “id”: “pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee” }

id: string

Job ID, such as a parse job ID.

type: "parse_v2" | "extract_v2"

Type of job produced for the file.

One of the following:
"parse_v2"
"extract_v2"
updated_at?: string | null

Update datetime

formatdate-time
BatchGetResponse { id, config, project_id, 5 more }

A top-level batch.

Example: { “id”: “bat-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee”, “project_id”: “prj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee”, “source_directory_id”: “dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee”, “config”: { “job”: { “type”: “parse_v2”, “configuration_id”: “cfg-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee” } }, “status”: “COMPLETED”, “results”: [ { “source_directory_file_id”: “dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee”, “job_reference”: { “type”: “parse_v2”, “id”: “pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee” }, “error_message”: null } ] }

Batch-level FAILED means the orchestration failed and cannot provide a reliable per-file result set. results is only populated when explicitly requested with expand=results and may be null while a batch is still running or before result mappings are available.

id: string

Unique identifier

config: Config { job }

Batch configuration snapshot.

job: Job { configuration_id, type }

Job to create for each file in the source directory.

configuration_id: string

Saved product configuration ID matching the job type.

type: "parse_v2" | "extract_v2"

Product job type to run for each source directory file.

One of the following:
"parse_v2"
"extract_v2"
project_id: string

Project this batch belongs to.

source_directory_id: string

Directory being processed.

status: "PENDING" | "THROTTLED" | "RUNNING" | 3 more

Current batch status.

One of the following:
"PENDING"
"THROTTLED"
"RUNNING"
"COMPLETED"
"FAILED"
"CANCELLED"
created_at?: string | null

Creation datetime

formatdate-time
results?: Array<Result> | null

Expanded per-file result mappings. Null unless requested with expand=results, or until result mappings are available.

source_directory_file_id: string

Source directory file processed by this batch.

error_message?: string | null

Batch-level mapping error if the system could not create or associate a job for this source file.

job_reference?: JobReference | null

Reference to a job produced by a batch.

Example: { “type”: “parse_v2”, “id”: “pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee” }

id: string

Job ID, such as a parse job ID.

type: "parse_v2" | "extract_v2"

Type of job produced for the file.

One of the following:
"parse_v2"
"extract_v2"
updated_at?: string | null

Update datetime

formatdate-time