Skip to main content
GET
← Logistics API Read packages (parcels) by their Dcycle id, up to 100 per request, with the totals of their legs. Use it after a load to get the footprint of the packages it touched: one request per 100 packages instead of one per package.
Beta. Part of the v2 logistics API, in beta. The contract may still change before general availability.

How it works

  • Each package comes once, in the order of the ids. An id repeated in the request is read once.
  • An id with no package in your organization is listed in not_found, not an error. An unknown id and another organization’s answer the same.
  • The totals follow the legs. total_distance_km and total_co2e are summed over the package’s active legs and recalculated after its legs are written or deleted. A package whose legs arrive in several loads changes as they arrive: read it again after a later load. To know whether it changed, compare its updated_at with the value you last read (not with your own clock). A recalculation that fails is repaired the next time one of its legs is written, and a revision of a TOC’s emission factor shows on the next write of one of its legs.
  • total_co2e is in kg CO₂e: each leg’s tonne-km times its TOC’s well-to-wheel factor, own-fleet legs included (the logistics report calculates own fleet from your recharges instead). Electric road legs and the cleaning surcharge are not in it yet, so it can differ from the sum of the legs’ co2e.
The ids are the packages’ Dcycle ids: the package_id of the legs in List Logistics Requests, or the id in List Packages.

Request

Headers

string
required
Your API key (see Authentication).Example: ${DCYCLE_API_KEY}
string
required
Your organization UUID. Only this organization’s packages are read.Example: a8315ef3-dd50-43f8-b7ce-d839e68d51fa

Query Parameters

uuid
required
A package id, repeated: ?id=…&id=…, 1 to 100 per request.

Response

200 OK with items (the packages found) and not_found (the ids with no package in your organization).
array
array[uuid]
Requested ids with no package in your organization.

Errors

Problem details. The API key and the organization are checked as in Create Logistics Requests (v2): 401, 400 ORGANIZATION_ID_REQUIRED and 403 LOGGED_USER_NOT_MEMBER, each in Errors. Then 422 REQUEST_VALIDATION_FAILED when there is no id, more than 100, or one that is not a UUID.