Available shipping types
A shipping type is the delivery modality you are contracting: express, same day, next day, and so on. Which ones are available to you depends on your account configuration and on the geographic region you are shipping from, so the list has to be asked for per pickup location rather than hard-coded.
See Shipping type for what the entity itself contains.
Request
curl --request GET \
--url 'https://logistics.api.{{BASE_ENV_URL}}/v1/shipping_types/available?location=40.456367,-3.690587' \
--header 'Authorization: Bearer {{ACCESS_TOKEN}}'The location query parameter is required and holds the coordinates of the pickup point, formatted as latitude,longitude.
Response
200 returns the shipping types available at that location. Each one carries the id you will pass to Estimate and to Request shipment.
The list comes wrapped in available_shipping_types:
{
"available_shipping_types": [
{
"id": "express_default",
"name": "Express",
"modality": "express",
"description": "On-demand delivery in under two hours"
}
]
}
Theidis opaque, and its shape is not the same in every environmentSandbox returns readable names such as
express_default; production returns UUIDs. Either way it is a value to echo back, never one to parse, derive or hard-code — and a sandbox id will not work against production.
What varies by region is availability, not theidA shipping type is one thing with one
id: "Express" in Madrid and "Express" in Lima are the same shipping type, and theiddoes not change from one region to another. What changes is where it is active for your account — Madrid may offer it and Lima may not, so the list you get back differs by location even though the identifiers in it do not.So it is the availability you have to re-check per pickup location, not the identifier you have to re-resolve. Shipping a parcel with a shipping type that is not active at its pickup location fails with
404.
When it fails
| Status | Meaning |
|---|---|
401 | Missing or invalid access token. |
404 | No shipping types are available for the given location — usually a location outside any operating area. |
See Error handling for the shape of the error body.
Updated 2 days ago
