Skip to main content

Process Batch

POST 

/api/v1/batches/:batch_id/process

Process (send) all valid invoices of a ready or partial batch.

In the request (200): a batch of at most 100 invoices (BATCH_SYNC_MAX_ITEMS) is sent before the answer, which is the batch in its final status, as it always was.

Queued (202): a bigger batch, or any batch when the request carries Prefer: respond-async, is queued for the platform's bulk workers and the answer is 202 Accepted at once: the batch with status queued (then processing, then its final status), the job_id of the run, a Location header and the status_url, results_url and receipt_url to follow it. A batch that is already queued or being sent answers 202 with the run it has, and nothing is queued twice. A queued run survives a restart or a deploy: it resumes where it stopped and sends no invoice twice. POST /batches/{id}/cancel stops it before its next invoice. When it ends, the batch.completed, batch.partial or batch.failed webhook is sent.

Requestโ€‹

Responsesโ€‹

Successful Response