Create Logistics Requests (Bulk, v2)
Create Logistics Requests (Bulk, v2)
Bulk-create logistics shipments with asynchronous emissions calculation and progress tracking
POST
Create Logistics Requests (Bulk, v2)
Create Logistics Requests (Bulk, v2)
v2 of Create Logistics Requests (Bulk). It
accepts the exact same request body and returns the same response shape, but the
distance and emissions calculation for every record is performed asynchronously by a
background worker instead of inline. The endpoint returns as soon as the records are
persisted, which makes it well suited for large daily batches.
Same contract as v1. Headers, body parameters, validation, deduplication and the
5,000-record limit are identical to
POST /v1/logistics/requests/bulk. See the
v1 reference for the full request
documentation.v1 vs v2
| Behaviour | v1 (/v1/logistics/requests/bulk) | v2 (/v2/logistics/requests/bulk) |
|---|---|---|
| Distance & emissions | Calculated inline for every record before responding | Deferred to a background worker |
results[].co2e | Final emissions value | null while the async calculation is pending |
| Response latency | Scales with batch size (geocoding + distance APIs) | Low and roughly constant |
| Progress tracking | — | A processing job is created and updated as records are calculated |
| Sync-phase errors (validation, in-batch duplicates) | Returned in errors[] | Returned in errors[] and recorded on the processing job |
Request
The request body is identical to v1.Response
The response shape matches v1. The key difference is that eachresults[].co2e is null
because emissions are not yet calculated when the response is returned.
Number of records accepted and enqueued for asynchronous calculation (records that passed
synchronous validation and deduplication).
Number of records that failed synchronous validation or were rejected as in-batch
duplicates. Failures detected during the asynchronous calculation phase (e.g. missing
distance or load) are reported on the processing job, not in this response.
One entry per accepted record. Each
co2e is null until the asynchronous calculation
completes.Synchronous-phase errors only (validation, in-batch duplicates), each with
index,
movement_id and error.Tracking progress
A processing job is created for the batch and updated as records are calculated. Its status movesPENDING → RUNNING → COMPLETED (or FAILED), with per-record success/failure counts
and a capped list of error entries (stage: "sync" for validation/dedup, stage: "calculation"
for async failures such as NO_TOC, NO_LOAD or NO_DISTANCE). The job is visible in the
activity panel.
Read the calculated emissions back once the job completes:

