Skip to main content
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

In v2, each results[].co2e is null in the immediate response. Distances and emissions are filled in asynchronously. Read the final values back via GET /v1/logistics/requests, and track overall progress through the processing job surfaced in the activity panel.

Request

The request body is identical to v1.

Successful Response

The response shape matches v1. The key difference is that each results[].co2e is null because emissions are not yet calculated when the response is returned.
integer
Number of records accepted and enqueued for asynchronous calculation (records that passed synchronous validation and deduplication).
integer
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.
array
One entry per accepted record. Each co2e is null until the asynchronous calculation completes.
array
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 moves PENDING → 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:

Common Errors

401 Unauthorized

Cause: Missing or invalid API key

403 Forbidden

Cause: The authenticated user is not a member of the organization

422 Unprocessable Entity

Cause: Invalid or missing required fields in the request body
Migrating from v1? The request body is unchanged. Update the URL prefix to /v2, treat results[].co2e as pending (null), and read final emissions back from the list endpoint or wait for the processing job to complete.

Create Request (v2)

Create a single request

Get Requests

Retrieve requests with filtering and pagination

Upload CSV

Bulk import via CSV file

Get Packages

View aggregated package emissions