> ## Documentation Index
> Fetch the complete documentation index at: https://run-deliverys.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Quote Local deliveries, place orders, track shipments, and receive signed webhook updates.

export const API_PRODUCTION_URL = "https://api.rundeliverys.com/api/v2";

export const API_STAGING_URL = "https://staging.rundeliverys.com/api/v2";

Welcome to the Run Delivery Business API. Here you'll find everything you need to get up and running with quoting, placing orders, tracking shipments, and receiving signed webhooks.

## Quick start

1. **Sign up / log in** to a Business account

* **Staging:** [Sign up ↗](https://b2b-dev.rundeliverys.com/register) · [Log in ↗](https://b2b-dev.rundeliverys.com/login)
* **Production:** [Sign up ↗](https://b2b-hub.rundeliverys.com/register) · [Log in ↗](https://b2b-hub.rundeliverys.com/login)

2. Open **Developers → Setup** and generate an API key (`run_test_…` or `run_live_…`)
3. Call the API with `Authorization: Bearer <api_key>`

For the full walkthrough (wallet funding, first quote, first order), see [Quickstart](/get-started/quickstart).

## Base URL

| Environment | Base URL |
| - | - |
| Staging | <code>{API_STAGING_URL}</code> |
| Production | <code>{API_PRODUCTION_URL}</code> |

| Trait | Detail |
| - | - |
| Style | RESTful, JSON-based |
| Methods | `GET`, `POST` |
| Auth | Bearer API key on every request |
| Transport | HTTPS required |

## Authentication

Include your API key on every request:

```http theme={null}
Authorization: Bearer YOUR_API_KEY
```

| Environment | Prefix | Example |
| - | - | - |
| Staging | `run_test_` | `run_test_fce859d98c4f0e2b1e644d5a46e2fb9fb45bde58b36a0wfj` |
| Production | `run_live_` | `run_live_fce859d98c4f0e2b1e644d5a46e2fb9fb45bde58b36a0wfj` |

Keys include `orders:read` and `orders:write` by default. See [Authentication](/concepts/authentication).

<Warning>
  Keep API keys on your server only. Never commit them to git or use them in browser-side JavaScript.
</Warning>

## Response status codes

| Status | Meaning |
| - | - |
| `200` | Success |
| `201` | Created |
| `400` | Bad request — validation or business rule failure |
| `401` | Unauthorized — missing, invalid, or wrong-environment API key |
| `403` | Forbidden — authenticated but missing required scope |
| `404` | Not found — resource does not exist (or is not yours) |
| `429` | Too many requests — rate limit exceeded |
| `500` | Internal server error |

Failed responses use this JSON shape:

| Field | Type | Description |
| - | - | - |
| `statusCode` | number | HTTP status code |
| `timestamp` | string | ISO 8601 time of the error |
| `path` | string | Request path that failed |
| `message` | string | Human-readable error detail |

See [Errors](/concepts/errors) for more detail.

## Next steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/get-started/quickstart">
    Quote a shipment and place your first order.
  </Card>

  <Card title="Orders" icon="package" href="/orders/quote-cost">
    Quote, place, list, get details, and download receipts.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/webhooks/overview">
    HMAC signatures, retries, and event types.
  </Card>

  <Card title="Wallet funding" icon="wallet" href="/guides/wallet-funding">
    Fund your Business wallet before placing orders.
  </Card>
</CardGroup>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "$RUN_BASE_URL/business/order/cost" \
    -H "Authorization: Bearer $RUN_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "pickup_address": "12 Admiralty Way, Lekki, Lagos",
      "dropoff_address": "15 Broad Street, Lagos Island, Lagos",
      "weight": 2
    }'
  ```

  ```javascript Node.js theme={null}
  const res = await fetch(`${process.env.RUN_BASE_URL}/business/order/cost`, {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${process.env.RUN_API_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      pickup_address: '12 Admiralty Way, Lekki, Lagos',
      dropoff_address: '15 Broad Street, Lagos Island, Lagos',
      weight: 2,
    }),
  });
  const quote = await res.json();
  ```

  ```python Python theme={null}
  import os
  import requests

  res = requests.post(
      f"{os.environ['RUN_BASE_URL']}/business/order/cost",
      headers={
          "Authorization": f"Bearer {os.environ['RUN_API_KEY']}",
          "Content-Type": "application/json",
      },
      json={
          "pickup_address": "12 Admiralty Way, Lekki, Lagos",
          "dropoff_address": "15 Broad Street, Lagos Island, Lagos",
          "weight": 2,
      },
  )
  quote = res.json()
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "price": 3869,
    "distance_km": 7.54,
    "currency": "NGN"
  }
  ```

  ```json 400 theme={null}
  {
    "statusCode": 400,
    "timestamp": "2026-08-12T15:18:51.396Z",
    "path": "/api/v2/business/order/cost",
    "message": "weight must not be less than 0.1"
  }
  ```

  ```json 401 theme={null}
  {
    "statusCode": 401,
    "timestamp": "2026-08-12T15:18:51.396Z",
    "path": "/api/v2/business/order/cost",
    "message": "Invalid API key"
  }
  ```

  ```json 403 theme={null}
  {
    "statusCode": 403,
    "timestamp": "2026-08-12T15:18:51.396Z",
    "path": "/api/v2/business/order/cost",
    "message": "Insufficient API key scope"
  }
  ```

  ```json 404 theme={null}
  {
    "statusCode": 404,
    "timestamp": "2026-08-12T15:18:51.396Z",
    "path": "/api/v2/business/orders/6a7c75f801df3fbb7fad0c58",
    "message": "Order not found"
  }
  ```

  ```json 500 theme={null}
  {
    "statusCode": 500,
    "timestamp": "2026-08-12T15:18:51.396Z",
    "path": "/api/v2/business/order/cost",
    "message": "Internal server error"
  }
  ```
</ResponseExample>


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