DeltaVelocity

Jobs

Background work started in the dashboard (labels, invoices, picklists, order exports, bulk cancels) has a job id. Read its status with GET /v1/jobs/{job_id} (scope orders:read) until it finishes. status is one of:

statusMeaning
queuedAccepted, not started yet.
runningIn progress.
succeededFinished, and every item succeeded. result_url points at the file, when there is one.
partially_failedFinished, but some items failed or were skipped. failed_items lists them.
failedNothing succeeded. See below for where the reason is.

Each failed_items entry has a shipment_id, a code and a message. error (a code and a message) is present only when the job itself failed. When the job ran but every item failed, status is failed, error is null, and the failures are in failed_items. So check both: never assume error is set on a failed job.

Item-based jobs (bulk cancels) also carry counts (total, succeeded, failed, pending). Treat only succeeded as fully done: a partially_failed job needs you to act on failed_items.

Deferred cancels

A bulk cancel for a shipment whose courier booking is still unresolved lists that shipment in failed_items with the code cancel_deferred and counts it in counts.failed. A job whose items are all deferred reads status: "failed"; one that also has successes reads partially_failed.

Treat cancel_deferred as "will be cancelled, do not retry". DV has stored the cancel and applies it once the booking resolves. That usually takes about 75 minutes, counted from the booking attempt or from the cancel request, whichever is later. DV checks every 10 minutes, so each step can run up to 10 minutes after that. The item then moves to succeeded, and the job's counts and status update to match. If DV cannot apply it (for example, the shipment moved on first), the item stays in failed_items with the code cancel_failed. Keep polling GET /v1/jobs/{job_id} until no cancel_deferred items remain, and act only on cancel_failed.