The Order-to-Shipment Flow
Creating an order does not immediately dispatch a courier. Fulfilment is a deliberate second step, giving you time to validate, quote, and confirm before committing to a delivery.1
Create an order
Call
POST /v1/orders (or client.orders.createOrder) with the recipient details, item description, and delivery method. The order enters the pending_fulfilment state.2
Get a rate quote
Call
POST /v1/rates/calculate to retrieve competitive quotes for the order’s route, weight, and service level. Select the quote that best fits your cost and speed requirements. Save the quote_id from the response.3
Fulfil the order
Call
POST /v1/orders/{id}/fulfil with your chosen rate_quote_id. TLDP creates a shipment, assigns a courier, and returns a tracking number. The order moves to the fulfilled state.4
Track the shipment
Use the returned
tracking_number to monitor delivery progress through the tracking endpoints or webhooks.Order States
Delivery Methods
When creating an order, you specify adelivery_method that determines how the recipient receives their parcel.
last_mile
A courier collects the parcel from your origin and delivers it directly to the recipient’s door address. Use this when your customer expects home or office delivery without travelling to collect.
station_pickup
The parcel is transported to the nearest TLDP-affiliated pickup station. The recipient receives a notification and collects at their convenience. Typically lower cost and suitable when door delivery isn’t practical.
On-Demand Fulfilment
For time-sensitive flows, use on-demand fulfilment to dispatch directly to nearby independent drivers without a separate rates call. TLDP offers four on-demand tiers:- Two-step (recommended)
- On-demand (one step)
On-demand fulfilment broadcasts an offer to matching online drivers at the chosen tier — the first driver to accept picks it up. The price is locked in atomically, so you will never see a quote expire between selection and fulfilment.
TypeScript Examples
Creating an order
Creating a shipment directly
Order Flow vs. Direct Shipment Creation
Use the right path for your integration needs:When to use the order flow
When to use the order flow
Choose the order flow (
POST /v1/orders → fulfil) when:- Your platform has a commerce layer and you want to record the buyer’s intent before committing to a courier
- You need to present rate options to the sender or customer before confirming
- You want order-level state tracking (
pending_fulfilment,fulfilled,cancelled) alongside shipment tracking - You may need to cancel before fulfilment without having dispatched a courier
When to create a shipment directly
When to create a shipment directly
Use
POST /v1/shipments directly when:- You already have a pre-selected rate quote and want to minimise round-trips
- You are building a backend automation that doesn’t need order-level state — for example, bulk label generation
- You are migrating from another logistics API and mapping directly to shipment objects fits your existing data model