Skip to main content
@tybrite-labs/tldp-sdk is a fully typed TypeScript client for the TLDP API. It turns rates, orders, shipments, tracking, returns, and webhooks into typed method calls, and handles auth, retries, and idempotency for you.

Installation

Initialize the client

The base URL defaults to https://api.tybritelabs.com/logistics. Your key’s middle segment (test / live) selects the environment — see Authentication.

Calling a method

Methods are grouped into services on the client (client.orders, client.rates, …). With the SDK’s options style, you pass a single object with the path/query params and a requestBody where applicable.

Idempotency & retries

Pass an idempotencyKey on writes so a retried request never double-creates:
The client also retries transient network and 5xx failures automatically with exponential backoff.

Error handling

Failed requests throw an ApiError carrying the HTTP status and the API’s error body:

Services

Orders

Create, fulfil, and manage orders.

Shipments

Create and manage shipments directly.

Rates

Quote deliveries and list zones.

Tracking

Public + detailed tracking.

Proof of Delivery

Retrieve POD for a shipment.

Returns

Returns and exchanges.

Webhooks

Manage endpoints and test events.

System

API info and health.