Estimate
Estimating tells you the price, the pickup ETA and the delivery ETA of a shipment before you create anything. You describe where each parcel is collected and where it goes; nothing is registered and nothing is charged.
Use it to show a price to your customer, to decide between shipping types, or to check that a route can be served at all.
Request
curl --request POST \
--url https://logistics.api.{{BASE_ENV_URL}}/v3/parcels/estimate \
--header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
--header 'Content-Type: application/json' \
--data '{
"shipping_type_id": "express_default",
"parcels": [
{
"external_id": "order_1042",
"pickup_location": { "lat": 40.456367, "lon": -3.690587 },
"dropoff_location": { "address": "Calle de Pradillo, 42, Madrid" },
"dimensions": { "height": 10, "length": 20, "width": 15, "unit": "cm" },
"weight": { "value": 1500, "unit": "g" }
}
]
}'| Field | Required | Notes |
|---|---|---|
shipping_type_id | Yes | From Available shipping types for this pickup location — the id is the same everywhere, but the type has to be active there. Echo it back exactly as returned: it is opaque, a readable name in sandbox and a UUID in production. |
parcels | Yes | At least one. Estimated together as a single delivery. |
parcels[].pickup_location | Yes | Coordinates (lat, lon) or an address. |
parcels[].dropoff_location | Yes | Same. |
parcels[].dimensions | No | Defaults to cm. Affects which vehicle can take the delivery. |
parcels[].weight | No | Defaults to g. Same. |
pickup_time | No | RFC 3339. When the parcels are ready to be collected. |
Response
{
"deliveries": [
{
"parcels": [ { "external_id": "order_1042", "...": "..." } ],
"estimation": {
"asset_kind": "moped",
"price": { "amount": 599, "currency": "EUR" },
"eta_to_pickup": "2021-12-02T10:12:07.753Z",
"eta_to_delivery": "2021-12-02T10:48:07.753Z"
}
}
]
}price.amount is in the minor unit of the currency (599 = 5.99 EUR).
asset_kindonly means something for expressFor
expressdeliveries it is the smallest vehicle — inbicycle → moped → carorder — that fits the whole delivery by weight, volume and largest-parcel dimensions and can still complete the route in time. Forsame_day,next_dayand other cross-dock modalities it does not reflect the vehicle that will actually carry the parcel, and should be ignored.
When it fails
| Status | Meaning |
|---|---|
400 | A field failed validation — most often a parcel with neither an address nor coordinates. |
401 | Missing or invalid access token. |
404 | The estimation could not be calculated. Check that both locations are inside an operating area. |
409 | The service cannot process the request in its current state. |
503 | Temporarily unavailable; retry. |
An estimate is not a reservation: the price and the ETAs are calculated for that moment and can change by the time you request the shipment.
Updated 2 days ago
