Skip to main content
client.rates returns competitive quotes from all your enabled couriers for a given origin–destination pair. You use these quotes to present pricing options to customers, then pass the chosen rate_quote_id to fulfilOrder or createShipment to lock in that price and book the courier. You can also list all delivery zones supported by the TLDP network.

Methods

calculateRates

Fetch courier quotes for a route. Provide origin and destination cities along with the parcel weight. Optionally filter results to a specific service level — omit service_level to receive quotes for all available service levels at once. The 10% platform commission is already included in total_price. Each quote_id is valid for 2 minutes and is required to create a shipment.
Each quote exposes its id as quote_id. When you later fulfil the order or create a shipment, pass that value under the key rate_quote_id. Read quote.quote_id, send it as rate_quote_id.
{ city: string; zone?: string }
required
The pickup location. Provide the city name matching a TLDP-supported zone. Optionally include zone for sub-city precision.
{ city: string; zone?: string }
required
The delivery destination. Provide the city name matching a TLDP-supported zone. Optionally include zone.
number
required
The gross weight of the parcel in kilograms. Used to calculate weight surcharges.
number
Declared monetary value of the contents. Used for insurance and liability calculations. Optional.
ServiceLevel
Optional. Filter results to a single service level. Omit to receive all available quotes across all service levels.
string[]
Optional flags such as 'fragile' that may affect routing or surcharges.
Quotes are time-bound. Once valid_until passes, re-run calculateRates before fulfilling — a stale rate_quote_id will be rejected.

Quote Fields

Each object in the quotes array contains the following fields.
The quote_id returned here maps directly to the rate_quote_id parameter expected by client.orders.fulfilOrder() and client.shipments.createShipment(). Store it alongside your order state so it is available at fulfilment time.

Price Breakdown Fields

Each quote also includes a breakdown object with a granular breakdown of how the total price is calculated.

listZones

Retrieve all delivery zones currently supported by the TLDP network. The response is edge-cached (~5 minutes) and ETag-validated. Use this to validate city names before calling calculateRates, or to build a location selector in your checkout flow.

Service Levels

TLDP supports five service levels across the courier network. Availability varies by route. Pass the lowercase string value when filtering calculateRates.