Skip to main content

Batch Lifecycle

A batch tracks progress, and each document has its own outcome. A batch never succeeds or fails: it finishes as completed even when every document failed.

Batch Status​

StatusEntered WhenYou Can
pendingThe batch is createdAdd, upload, and delete documents. Submit or cancel
processingYou submitPoll. A repeat submit returns the batch
completedEvery document is succeeded, failed, or cancelledRead results. Delete the batch
cancelledYou cancel, or the batch stays pending for 7 daysDelete the batch

Only a pending batch can be cancelled. expiresAt shows when an unsubmitted batch is cancelled automatically.

cancellationReasonMeaning
requestedYou cancelled the batch
expiredThe batch was not submitted before expiresAt

Document Status​

StatusMeaning
awaiting_uploadDeclared, but the file has not been uploaded. Submit is blocked
pendingContent received. Waiting for submit or for processing capacity
queuedWaiting to be processed
processingBeing processed
succeededEntities are available
failederror.code gives the reason. See Errors
cancelledThe batch was cancelled before this document started

Submit needs at least one document and none in awaiting_upload.

Counts​

counts updates while the batch is processing and is final once the batch is completed or cancelled. The status counts add up to total.

FieldDocuments
totalAll
awaitingUploadawaiting_upload
pendingpending
queuedqueued
processingprocessing
succeededsucceeded
failedfailed
cancelledcancelled

Delete​

RequestAllowed WhenEffect
DELETE /v1/data-engine/batches/{batchId}Batch is completed or cancelledDeletes documents, entities, and files. Final counts are kept for usage reporting. A repeat delete returns 204
DELETE .../documents/{documentId}Batch is pendingDeletes that document