Cancel a batch
POST
Items that haven't started rendering are canceled (failed documents with error code canceled); renders already running finish. A canceled batch has no ZIP. 409 once the batch has finished.
header
AuthorizationBearer <token>Authorization: Bearer dr_live_… or dr_test_…
id*stringOK
application/json- response
id*stringobject*unknownstatus*stringqueued → running → completed (ZIP ready), failed (nothing rendered, or the ZIP couldn't be built) or canceled.
Value in
"queued""running""completed""failed""canceled"template*stringversion*numberfilename_pattern*string|nullcounts*Items by outcome; pending is queued or rendering.
zip_url*|Signed download URL of the ZIP with every rendered file (PDFs, or XML e-invoices), once the batch completed and while the ZIP is retained.
zip_size_bytes*number|nullzip_expires_at*|When the ZIP is deleted (the file retention period).
error*|nulltest_mode*booleancreated_at*stringFormat
date-timefinished_at*|nullcurl -X POST 'https://druckling-nine.vercel.app/v1/batches/string/cancel'Example Response200
{ "id": "string", "object": "batch", "status": "queued", "template": "string", "version": 0, "filename_pattern": "string", "counts": { "total": 0, "pending": 0, "rendered": 0, "failed": 0, "canceled": 0 }, "zip_url": "string", "zip_size_bytes": 0, "zip_expires_at": "2019-08-24T14:15:22Z", "error": { "code": "string", "message": "string" }, "test_mode": true, "created_at": "2019-08-24T14:15:22Z", "finished_at": "2019-08-24T14:15:22Z"}