Create Logistics Request (v2)
Create Logistics Request (v2)
Create a logistics shipment with asynchronous emissions calculation
POST
Create Logistics Request (v2)
Create Logistics Request (v2)
v2 of Create Logistics Request. It accepts the
exact same request body and returns the same response shape, but the expensive
distance and emissions calculation is performed asynchronously instead of inline. This
keeps the request fast and predictable for high-volume integrations.
Same contract as v1. Headers, body parameters and validation are identical to
POST /v1/logistics/requests. Only the timing of the distance/emissions calculation
changes. See the v1 reference for the full list
of body parameters.v1 vs v2
| Behaviour | v1 (/v1/logistics/requests) | v2 (/v2/logistics/requests) |
|---|---|---|
Distance calculation (when distance_km omitted) | Calculated inline, returned in the response | Deferred to an async worker, null in the immediate response |
Emissions (co2e) | Calculated inline, returned in the response | Deferred to an async worker, null in the immediate response |
tkm | Returned in the response | Returned only if distance_km was provided; otherwise null until the async calc runs |
| Response latency | Higher (waits for geocoding + distance APIs) | Low (returns as soon as the record is persisted) |
Request
The request is identical to v1. Minimal example:Response
The response shape matches v1, withco2e (and distance_km / tkm when not provided)
returned as null while the asynchronous calculation is pending.
Total CO2 equivalent emissions in kilograms.
null in v2 until the asynchronous
calculation completes.Distance in kilometers. Echoes the value you provided;
null when omitted (it is
calculated asynchronously).Tonne-kilometers. Computed up front when
distance_km is provided; otherwise null
until the asynchronous calculation completes.All other response fields (
id, origin, destination, load, toc, category,
traceability fields, etc.) are returned exactly as documented for
v1.Reading back the calculated values
Because the calculation is asynchronous, poll the list endpoint (filtering by themovement_id you submitted) until kgco2e / distance_km are populated:

