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" }
      }
    ]
  }'
FieldRequiredNotes
shipping_type_idYesFrom 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.
parcelsYesAt least one. Estimated together as a single delivery.
parcels[].pickup_locationYesCoordinates (lat, lon) or an address.
parcels[].dropoff_locationYesSame.
parcels[].dimensionsNoDefaults to cm. Affects which vehicle can take the delivery.
parcels[].weightNoDefaults to g. Same.
pickup_timeNoRFC 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), and it includes VAT.

📘

asset_kind only means something for express

For express deliveries it is the smallest vehicle — in bicycle → moped → car order — that fits the whole delivery by weight, volume and largest-parcel dimensions and can still complete the route in time. For same_day, next_day and other cross-dock modalities it does not reflect the vehicle that will actually carry the parcel, and should be ignored.

Vehicle limits for express

For express deliveries we pick the vehicle from the weight and dimensions you send. A delivery fits a vehicle when all of these hold:

  • the total weight of its parcels is within the vehicle's maximum weight;
  • the total volume of its parcels is within the vehicle's cargo volume;
  • the largest parcel fits the vehicle's cargo space (its diagonal is compared with the vehicle's).

These are the standard limits:

asset_kindMax weightCargo space (H × W × L)Max parcels per delivery
bicycle10 kg45 × 45 × 45 cm10
moped13 kg45 × 45 × 45 cm10
car100 kg85 × 95 × 50 cm20
🚧

Send weight and dimensions in g and cm

They are the defaults, and the limits above are checked in those units. Omitting weight or dimensions does not skip the problem: we cannot check what you do not send, and a parcel that turns out too big or heavy for the vehicle ends in pickupfailed.

These limits are configuration and can change, and not every vehicle is available in every city or to every account. The estimate is the authority: if nothing fits, it fails rather than returning an asset_kind. Food and other restricted goods have their own conditions; ask your sales account manager.

When it fails

StatusMeaning
400A field failed validation — most often a parcel with neither an address nor coordinates.
401Missing or invalid access token.
404The estimation could not be calculated. Check that both locations are inside an operating area.
409The service cannot process the request in its current state.
503Temporarily unavailable; retry.

How long an estimate holds

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.

For on-demand (express) deliveries the price is only valid for a limited time. It depends on fleet availability and on the time of day, so the same route can cost differently an hour later. Estimate as close as you can to the moment you ship, and do not cache a price for longer than the customer's checkout.

How your rates are built and how long a quoted price holds for your account are part of your commercial agreement: ask your sales account manager for the details.

In sandbox prices are deliberately unrealistic, so do not use them to check any of this.


Did this page help you?