> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tybritelabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> From zero to your first tracked delivery.

This guide makes three calls: quote a delivery, create + fulfil an order, and
track it. Use a **test** secret key so nothing touches production.

## 1. Install the SDK

```bash npm theme={null}
npm install @tybrite-labs/tldp-sdk
```

```bash pnpm theme={null}
pnpm add @tybrite-labs/tldp-sdk
```

## 2. Initialize the client

```typescript theme={null}
import { TLDP } from '@tybrite-labs/tldp-sdk';

const client = new TLDP({ apiKey: 'tybrite_sk_test_YOUR_KEY' });
```

## 3. Quote a delivery

```typescript theme={null}
const { quotes } = await client.rates.calculateRates({
  requestBody: {
    origin: { city: 'Nairobi' },
    destination: { city: 'Mombasa' },
    weight_kg: 2.5,
    service_level: 'standard',
  },
});

const best = quotes[0];
console.log(best.courier_name, best.total_price);
```

## 4. Create and fulfil an order

```typescript theme={null}
const { order } = await client.orders.createOrder({
  requestBody: {
    reference: 'ORDER-1042',
    delivery_method: 'last_mile',
    recipient: { name: 'Amina N.', phone: '+254700000000', city: 'Mombasa' },
    item: { description: 'Books', weight_kg: 2.5 },
  },
});

// A quote's id is `quote_id` in the rates response; fulfil takes `rate_quote_id`.
const fulfilled = await client.orders.fulfilOrder({
  orderId: order.id,
  requestBody: { rate_quote_id: best.quote_id },
});

console.log(fulfilled.tracking_number);
```

## 5. Track it

```typescript theme={null}
const status = await client.tracking.trackShipment({
  trackingNumber: fulfilled.tracking_number,
});
console.log(status.status); // pending → picked_up → in_transit → delivered
```

## Next steps

> [card] [Authentication](https://docs.tybritelabs.com/tldp/authentication.md)
>
> Key types and test vs live.

> [card] [Webhooks](https://docs.tybritelabs.com/tldp/webhooks.md)
>
> Get notified the moment a delivery changes state.

> [card] [SDK guide](https://docs.tybritelabs.com/tldp/sdk/introduction.md)
>
> The full typed client.

> [card] [API Reference](https://docs.tybritelabs.com/tldp/api-reference/introduction.md)
>
> Every endpoint, request, and response.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.