1
Install the SDK
Add the
@tybrite-labs/tldp-sdk package to your project using your preferred package manager.2
Initialise the client
Import
TLDP and create a client instance. Pass your secret test key directly during initialisation. In production you should read this value from an environment variable rather than hard-coding it.3
Quote a delivery
Call
client.rates.calculateRates with an origin, destination, weight, and service level. The response contains a ranked list of quotes from available carriers. Pick the first result — or present all options to your customer.4
Create and fulfil an order
First create an order with the recipient details and parcel information. Then call
fulfilOrder with the order ID and the quote_id from the rate you selected. TLDP books the shipment with the carrier and returns a tracking number.5
Track your shipment
Pass the tracking number returned by
fulfilOrder to client.tracking.trackShipment. The status field progresses through pending → picked_up → in_transit → delivered as the carrier updates the shipment.The
quote_id field on each object in the quotes array (Step 3) maps directly to rate_quote_id in the fulfilOrder request body (Step 4). Always capture best.quote_id before moving on to order creation.Next steps
Authentication
Learn about secret vs publishable keys, test vs live environments, and how to rotate your credentials safely.
Webhooks
Subscribe to real-time shipment events instead of polling the tracking endpoint on a schedule.
SDK Guide
Explore the full TypeScript SDK reference — every method, parameter, and response type, with examples.
API Reference
Browse the complete REST API reference if you prefer raw HTTP calls or are integrating from a non-Node.js environment.