Skip to main content
The TLDP REST API is available at https://api.tybritelabs.com/v1 and gives you programmatic access to every logistics capability on the platform — from calculating shipping rates and creating orders to tracking shipments and managing returns. Interactive endpoint pages are listed in the sidebar under this tab; this page covers the conventions, authentication model, error format, and rate limits that apply across all endpoints.

Base URL

Every request targets the following base URL. The version segment (/v1) is part of the path, and breaking changes will ship under a new version rather than in-place.

Authentication

Authenticate by sending your API key as a Bearer token in the Authorization header on every request.
TLDP issues two families of keys. Secret keys (tybrite_sk_live_… and tybrite_sk_test_…) carry full read/write access and must only be used from your backend. Publishable keys (tybrite_pk_live_… and tybrite_pk_test_…) are read-only and safe to embed in client-side code. See the Authentication guide for details on creating and rotating keys.
Never expose a secret key in a browser, mobile app, or public repository. Use publishable keys for any client-facing integration.

Conventions

JSON everywhere

All request bodies must be sent as JSON with the Content-Type: application/json header. All responses — including errors — are returned as JSON.

Idempotency

Include an Idempotency-Key header on state-creating POST requests to safely retry without creating duplicate resources. Use a unique value per logical operation — a UUID works well. If you replay a request with the same key but a different body, the API returns 409 Conflict.
Generate a fresh UUID for each new operation and store it alongside your request so you can replay it exactly if a network error occurs before you receive a response.

API versioning

The current API version is v1, reflected in every endpoint path. When TLDP introduces breaking changes, they are released under a new version path (e.g. /v2) so your existing integrations remain unaffected until you choose to migrate.

Errors

All error responses share a consistent JSON structure, making it straightforward to handle failures uniformly across your integration.
The code field is a machine-readable string you can match against in your error-handling logic; message is a human-readable description intended for debugging.

HTTP status codes

5xx errors are safe to retry. Use exponential backoff with jitter to avoid amplifying load during incidents.

Rate limits

TLDP enforces per-key and per-IP rate limits to ensure fair usage across all integrations. When you exceed a limit, the API responds with 429 Too Many Requests. Inspect the X-RateLimit-* response headers to determine your remaining quota and when the window resets before retrying.

API resources

Each resource area has a dedicated SDK reference page with full method signatures, parameter descriptions, and code examples.

Rates

Calculate shipping rates and retrieve zone configurations for origin–destination pairs.

Orders

Create, update, fulfil, cancel, and query orders across your logistics workflows.

Shipments

Book shipments against confirmed orders and manage their lifecycle end-to-end.

Tracking

Retrieve real-time tracking events by tracking number or shipment ID.

Returns

Initiate, approve, receive, and resolve return requests from your customers.

Proof of Delivery

Retrieve signed proof-of-delivery records — photo, OTP, or signature — for delivered shipments.

Webhooks

Register endpoints to receive push notifications for shipment and order events.