# Delivery API reference

> Every endpoint of the Delivery API, with schemas, errors and examples.

Create deliveries that a robot carries from a pickup to a dropoff, and follow them to the end.

- Base URL: `https://api.remi.robot.com/api/v3`
- Auth: An API key with the `delivery` scope, sent as `Authorization: Bearer <key>`. Ask your Robot.com representative for one.
- OpenAPI document: https://docs.remi.robot.com/openapi/delivery.json

## Deliveries

Create, read, change and cancel deliveries.

### List deliveries

`GET /delivery` (scope `delivery`)

Newest first by default. Pass `pagination.next_cursor` as `cursor` to get the next page; it is null on the last page.

Query parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | `integer` | no | 1 to 1000. Default `100`. |
| `cursor` | `string` | no |  |
| `active` | `'true' \| 'false'` | no |  |
| `external_id` | `string` | no |  |
| `sort` | `'asc' \| 'desc'` | no | Default `"desc"`. |

Response 200: A page of deliveries.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Delivery[]` | yes |  |
| `pagination` | `object` | yes |  |
| `pagination.next_cursor` | `string \| null` | yes |  |
| `pagination.limit` | `number` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | Invalid query, for example `active` other than `true` or `false`. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |

### Create a delivery

`POST /delivery` (scope `delivery`)

Creates the delivery and returns it. REMI assigns a bot and starts it.

- A point is a registered `id`, your `external_id`, or `lat` + `lng`.
- `dropoff` is required for `standard` and not allowed for `pickup_only`.
- Any error means no delivery exists, so retrying is safe.

Body:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | `string` | no | Display name, for example the order number. |
| `location_id` | `string` | no | Optional when a point is a registered one. |
| `draft` | `boolean \| null` | no | Create without starting it. Publish with `PATCH` and `draft: false`. |
| `mode` | `'standard' \| 'pickup_only' \| null` | no | Delivery mode. Defaults to standard (bot delivery). |
| `tags` | `string[] \| null` | no |  |
| `options` | `DeliveryOptionsInput` | no |  |
| `external_id` | `string \| null` | no | Your id. Unique among your active deliveries; use it with `id_type=external`. |
| `pickup` | `PointInput` | yes |  |
| `dropoff` | `PointInput \| null` | no | Required for `standard`, not allowed for `pickup_only`. |
| `return_point` | `PointInput \| null` | no | Where a canceled, loaded order goes back to. Turns the return on. |
| `packages` | `PackageInput[] \| null` | no |  |
| `deliver_by` | `string (date-time) \| null` | no | Deadline. Not with `require_available_bot`. |
| `metadata` | `Record<string, unknown> \| null` | no | Free-form, returned as sent. |

Response 201: The created delivery.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Delivery` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | Invalid body, an unresolvable point, or `require_available_bot` together with `deliver_by`. |
| 400 | `INVALID_BOT` | The bot in `options.bots` does not exist for you. |
| 400 | `PICKUP_ONLY_CONTACT_REQUIRED` | Pickup-only with tracking notifications but no pickup contact phone or email. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 409 | `NO_AVAILABLE_BOT` | With `require_available_bot`: no bot is free. |
| 409 | `BOT_UNAVAILABLE` | The pinned bot is not connected or not available. |
| 409 | `BOT_BUSY` | The pinned bot is on another delivery. |
| 501 |  | More than one bot in `options.bots`. |

Example request:

```json
{
  "name": "Order #4821",
  "external_id": "order-4821",
  "location_id": "7Nk2QhVpXrLmT4wZaBcDe",
  "pickup": {
    "id": "V1StGXR8Z5jdHi6BmyT2q",
    "contact": {
      "name": "Ana",
      "phone": "+573001234567"
    }
  },
  "dropoff": {
    "lat": 4.6602,
    "lng": -74.0521,
    "matching": {
      "mode": "snap",
      "radius": 25
    }
  },
  "packages": [
    {
      "reference": "burger-pkg",
      "station": "Burger Shop",
      "items": [
        {
          "name": "Cheeseburger",
          "quantity": 1
        }
      ]
    }
  ],
  "options": {
    "webhook_url": "https://example.com/hooks/remi"
  }
}
```

Example response:

```json
{
  "data": {
    "id": "ES-5867",
    "name": "Order #4821",
    "draft": false,
    "mode": "standard",
    "state": "pending",
    "paused": false,
    "bot": null,
    "location_id": "7Nk2QhVpXrLmT4wZaBcDe",
    "arriving": false,
    "arriving_at": "2026-06-17T15:51:00.000Z",
    "options": {
      "bots": null,
      "bot_tags": null,
      "require_available_bot": false,
      "webhook_url": "https://example.com/hooks/remi",
      "webhook_headers": null,
      "return_enabled": false,
      "eta_updates": false
    },
    "external_id": "order-4821",
    "pickup": {
      "id": "V1StGXR8Z5jdHi6BmyT2q",
      "name": "Downtown Store",
      "lat": 4.6512,
      "lng": -74.0689,
      "azimuth": null,
      "contact": {
        "name": "Ana",
        "phone": "+573001234567",
        "email": null
      },
      "matching": null
    },
    "dropoff": {
      "id": null,
      "name": "dropoff",
      "lat": 4.6602,
      "lng": -74.0521,
      "azimuth": null,
      "contact": null,
      "matching": {
        "mode": "snap",
        "radius": 25
      }
    },
    "return_point": null,
    "packages": [
      {
        "reference": "burger-pkg",
        "items": [
          {
            "name": "Cheeseburger",
            "quantity": 1,
            "description": null,
            "picture_url": null,
            "metadata": null
          }
        ],
        "dimensions": null,
        "weight": null,
        "metadata": null,
        "station": "Burger Shop",
        "loaded": false
      }
    ],
    "deliver_by": null,
    "created_at": "2026-06-17T15:42:00.000Z",
    "metadata": null,
    "event_type": null,
    "estimates": {
      "distance": 2980,
      "duration": 2483000,
      "pickup": {
        "arrival_at": "2026-06-17T15:51:00.000Z",
        "completion_at": "2026-06-17T15:54:00.000Z",
        "source": "derived",
        "unknown_reason": null
      },
      "dropoff": {
        "arrival_at": "2026-06-17T16:12:00.000Z",
        "completion_at": "2026-06-17T16:14:00.000Z",
        "source": "derived",
        "unknown_reason": null
      },
      "scheduled_at": null,
      "target_completion_at": null
    },
    "tracker_url": "https://track.kiwibot.com/t/A1b2C3d4E5",
    "scheduled": false,
    "cancellation_reason": null,
    "incomplete_reason": null
  }
}
```

### Estimate arrival times

`POST /delivery/eta` (scope `delivery`)

Two modes:

- `pickup` + `dropoff`: arrival of the nearest free bot, without creating anything. Travel time only.
- `delivery_id`: the current estimate of an existing delivery, including load and unload time.

Body:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `delivery_id` | `string` | no | An existing delivery. When set, the points are ignored. |
| `id_type` | `'external'` | no | Treat `delivery_id` as your `external_id`. |
| `pickup` | `PointInput` | no |  |
| `dropoff` | `PointInput` | no |  |
| `location_id` | `string` | no | Needed when neither point is a registered one. |

Response 200: Arrival times.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `DeliveryEta` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | Neither `delivery_id` nor both points, or points with no resolvable location. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 403 |  | The location is not yours. |
| 404 |  | No delivery with that `delivery_id`. |
| 409 | `NO_AVAILABLE_BOT` | No connected, free bot with at least 20% battery. |
| 422 |  | No route between the points. |

Example request:

```json
{
  "location_id": "7Nk2QhVpXrLmT4wZaBcDe",
  "pickup": {
    "lat": 4.6512,
    "lng": -74.0689
  },
  "dropoff": {
    "lat": 4.6602,
    "lng": -74.0521
  }
}
```

Example response:

```json
{
  "data": {
    "bot_id": "4T001",
    "pickup_eta": "2026-06-17T15:51:00.000Z",
    "dropoff_eta": "2026-06-17T16:12:00.000Z"
  }
}
```

### Get a delivery

`GET /delivery/{id}` (scope `delivery`)

Path parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | Delivery id, or your `external_id` with `id_type=external`. |

Query parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id_type` | `'external'` | no | Treat `{id}` as your `external_id`. Resolves only active deliveries. |

Response 200: The delivery.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Delivery` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 404 |  | No delivery with this id in your namespace (by `external_id`: no active one). |

Example response:

```json
{
  "data": {
    "id": "ES-5867",
    "name": "Order #4821",
    "draft": false,
    "mode": "standard",
    "state": "going_to_pickup",
    "paused": false,
    "bot": {
      "id": "4T001",
      "lat": 4.6498,
      "lng": -74.0712,
      "door_status": "closed",
      "control": null
    },
    "location_id": "7Nk2QhVpXrLmT4wZaBcDe",
    "arriving": false,
    "arriving_at": "2026-06-17T15:51:00.000Z",
    "options": {
      "bots": null,
      "bot_tags": null,
      "require_available_bot": false,
      "webhook_url": "https://example.com/hooks/remi",
      "webhook_headers": null,
      "return_enabled": false,
      "eta_updates": false
    },
    "external_id": "order-4821",
    "pickup": {
      "id": "V1StGXR8Z5jdHi6BmyT2q",
      "name": "Downtown Store",
      "lat": 4.6512,
      "lng": -74.0689,
      "azimuth": null,
      "contact": {
        "name": "Ana",
        "phone": "+573001234567",
        "email": null
      },
      "matching": null
    },
    "dropoff": {
      "id": null,
      "name": "dropoff",
      "lat": 4.6602,
      "lng": -74.0521,
      "azimuth": null,
      "contact": null,
      "matching": {
        "mode": "snap",
        "radius": 25
      }
    },
    "return_point": null,
    "packages": [
      {
        "reference": "burger-pkg",
        "items": [
          {
            "name": "Cheeseburger",
            "quantity": 1,
            "description": null,
            "picture_url": null,
            "metadata": null
          }
        ],
        "dimensions": null,
        "weight": null,
        "metadata": null,
        "station": "Burger Shop",
        "loaded": false
      }
    ],
    "deliver_by": null,
    "created_at": "2026-06-17T15:42:00.000Z",
    "metadata": null,
    "event_type": null,
    "estimates": {
      "distance": 2980,
      "duration": 2483000,
      "pickup": {
        "arrival_at": "2026-06-17T15:51:00.000Z",
        "completion_at": "2026-06-17T15:54:00.000Z",
        "source": "derived",
        "unknown_reason": null
      },
      "dropoff": {
        "arrival_at": "2026-06-17T16:12:00.000Z",
        "completion_at": "2026-06-17T16:14:00.000Z",
        "source": "derived",
        "unknown_reason": null
      },
      "scheduled_at": null,
      "target_completion_at": null
    },
    "tracker_url": "https://track.kiwibot.com/t/A1b2C3d4E5",
    "scheduled": false,
    "cancellation_reason": null,
    "incomplete_reason": null
  }
}
```

### Update a delivery

`PATCH /delivery/{id}` (scope `delivery`)

Supported today: change `external_id`, and publish a draft with `draft: false` (add `scheduled_at` to schedule it). Other fields answer 501.

Path parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | Delivery id, or your `external_id` with `id_type=external`. |

Query parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id_type` | `'external'` | no | Treat `{id}` as your `external_id`. Resolves only active deliveries. |

Body:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | `string` | no |  |
| `draft` | `boolean \| null` | no |  |
| `options` | `DeliveryOptionsInput` | no |  |
| `external_id` | `string \| null` | no |  |
| `pickup` | `{ name?: string, lat?: number, lng?: number, azimuth?: integer \| null, contact?: { name?: string \| null, phone?: string \| null, email?: string (email) \| null } \| null } \| { id: string }` | no |  |
| `dropoff` | `{ name?: string, lat?: number, lng?: number, azimuth?: integer \| null, contact?: { name?: string \| null, phone?: string \| null, email?: string (email) \| null } \| null } \| { id: string }` | no |  |
| `return_point` | `{ name?: string, lat?: number, lng?: number, azimuth?: integer \| null, contact?: { name?: string \| null, phone?: string \| null, email?: string (email) \| null } \| null } \| { id: string } \| null` | no |  |
| `packages` | `PackageInput[] \| null` | no |  |
| `deliver_by` | `string (date-time) \| null` | no |  |
| `scheduled_at` | `string (date-time) \| null` | no |  |
| `metadata` | `Record<string, unknown> \| null` | no |  |

Response 200: The updated delivery.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Delivery` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | `draft: false` on a delivery that is not a draft, or a point that can no longer change. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 404 |  | No delivery with this id in your namespace (by `external_id`: no active one). |
| 501 |  | The field cannot be updated yet. |

Example request:

```json
{
  "draft": false,
  "scheduled_at": "2026-06-17T23:30:00.000Z"
}
```

### Get the remaining route

`GET /delivery/{id}/route` (scope `delivery`)

The path the bot still has to drive, from its last position through the remaining stops. Before a bot starts, it begins at the pickup.

Poll it: nothing is pushed when the bot reroutes. A result can be up to 10 seconds old (`computed_at`).

Path parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | Delivery id, or your `external_id` with `id_type=external`. |

Query parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id_type` | `'external'` | no | Treat `{id}` as your `external_id`. Resolves only active deliveries. |

Response 200: The route.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `DeliveryRoute` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 404 |  | No delivery with this id in your namespace (by `external_id`: no active one). |
| 409 | `PICKUP_ONLY_DELIVERY` | Pickup-only deliveries have no bot. |
| 409 | `DELIVERY_FINALIZED` | The delivery is delivered, returned, canceled or failed. |
| 409 | `BOT_POSITION_UNKNOWN` | No bot position from the last 30 minutes. Retry shortly. |

Example response:

```json
{
  "data": {
    "source": "estimated",
    "mapped": true,
    "computed_at": "2026-06-17T15:48:10.000Z",
    "position_recorded_at": "2026-06-17T15:48:08.000Z",
    "distance": 2980,
    "duration": 2483000,
    "points": [
      [
        4.6498,
        -74.0712
      ],
      [
        4.6512,
        -74.0689
      ],
      [
        4.6577,
        -74.0571
      ],
      [
        4.6602,
        -74.0521
      ]
    ],
    "stops": [
      {
        "name": "pickup",
        "lat": 4.6512,
        "lng": -74.0689,
        "point_index": 1
      },
      {
        "name": "dropoff",
        "lat": 4.6602,
        "lng": -74.0521,
        "point_index": 3
      }
    ]
  }
}
```

### Cancel a delivery

`POST /delivery/{id}/cancel` (scope `delivery`)

With a return configured and the order already loaded, the bot brings it back and the delivery ends `returned`. Pickup-only: stations already handed over stay handed over.

Path parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | Delivery id, or your `external_id` with `id_type=external`. |

Query parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id_type` | `'external'` | no | Treat `{id}` as your `external_id`. Resolves only active deliveries. |

Response 200: Canceled.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | `true` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 404 |  | No delivery with this id in your namespace (by `external_id`: no active one). |

Example response:

```json
{
  "success": true
}
```

### Pause a delivery

`POST /delivery/{id}/pause` (scope `delivery`)

Stops the bot where it is and alerts our operations team. Not an emergency stop: for a physical emergency, call operations too. Pausing again is a no-op.

Path parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | Delivery id, or your `external_id` with `id_type=external`. |

Query parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id_type` | `'external'` | no | Treat `{id}` as your `external_id`. Resolves only active deliveries. |

Body (optional):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `reason` | `string` | no | Shown to operations. Cut to 200 characters. |

Response 200: The delivery, with `paused: true`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Delivery` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 404 |  | No delivery with this id in your namespace (by `external_id`: no active one). |
| 409 | `DELIVERY_NOT_IN_PROGRESS` | Only a delivery in progress can be paused. |
| 409 | `STOP_NOT_SUPPORTED` | This bot or delivery cannot be stopped through the API. Call operations. |
| 409 | `OPERATOR_IN_CONTROL` | An operator is driving the bot. Call operations. |

Example request:

```json
{
  "reason": "The robot is blocking a building entrance"
}
```

### Resume a delivery

`POST /delivery/{id}/resume` (scope `delivery`)

Resumes a delivery you paused. A pause made by our operations team is theirs to resume.

Path parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | Delivery id, or your `external_id` with `id_type=external`. |

Query parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id_type` | `'external'` | no | Treat `{id}` as your `external_id`. Resolves only active deliveries. |

Body (optional):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `reason` | `string` | no | Shown to operations. Cut to 200 characters. |

Response 200: The delivery, with `paused: false`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Delivery` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 | `RESUME_JOB_NO_BOT` | The delivery no longer has a bot. Call operations. |
| 400 | `RESUME_JOB_INVALID_STATE` | The delivery changed at the same moment. Read it again. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 404 |  | No delivery with this id in your namespace (by `external_id`: no active one). |
| 409 | `DELIVERY_NOT_PAUSED` | The delivery is not paused. |
| 409 | `PAUSED_BY_OPERATIONS` | Our operations team paused it. |
| 409 | `OPERATOR_IN_CONTROL` | An operator is driving the bot. Call operations. |

## Loading

Open the bot door and confirm loads and hand-offs.

### Open the door to load

`POST /delivery/{id}/load/start` (scope `delivery`)

At `at_pickup`: opens the bot door. The state does not change.

Path parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | Delivery id, or your `external_id` with `id_type=external`. |

Query parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id_type` | `'external'` | no | Treat `{id}` as your `external_id`. Resolves only active deliveries. |

Response 200: The delivery.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Delivery` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | The delivery is not `at_pickup`, or has no bot. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 404 |  | No delivery in progress with this id. |

### Finish loading

`POST /delivery/{id}/load/finish` (scope `delivery`)

Confirms the whole pickup is loaded: REMI closes the door and the delivery moves to `going_to_dropoff`. Takes no body. To finish one station or package, use the targeted route. On a bot whose lid a person closes (`manual_close_door`), this does nothing: the load completes when the lid closes.

Path parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | Delivery id, or your `external_id` with `id_type=external`. |

Query parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id_type` | `'external'` | no | Treat `{id}` as your `external_id`. Resolves only active deliveries. |

Response 200: The delivery.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Delivery` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | The delivery is not `at_pickup` (also when it already left), or has no bot. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 404 |  | No delivery in progress with this id. |

### Finish loading one station or package

`POST /delivery/{id}/load/finish/target` (scope `delivery`)

Completes only the `package` or `station` you name. The bot leaves when every package is loaded. Repeating it is a no-op. On a 409, do not fall back to the untargeted finish: it would load everything.

Path parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | Delivery id, or your `external_id` with `id_type=external`. |

Query parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id_type` | `'external'` | no | Treat `{id}` as your `external_id`. Resolves only active deliveries. |

Body:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `package` | `string` | no | A package `reference`. |
| `station` | `string` | no | Every package of this station. |

Response 200: The delivery.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Delivery` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | The delivery is not `at_pickup`, or has no bot. |
| 400 | `LOAD_TARGET_AMBIGUOUS` | Both `package` and `station` were sent. |
| 400 | `LOAD_TARGET_REQUIRED` | No target, and the delivery has several load actions. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 404 |  | No delivery in progress with this id. |
| 404 | `LOAD_TARGET_NOT_FOUND` | Unknown `package` or `station`. |
| 409 | `LOAD_TARGET_NOT_LOADABLE` | The target is paused, failed, skipped or canceled. Nothing changed. |
| 409 | `LOAD_TARGET_NO_ACTIONS` | The target has nothing to load. Nothing changed. |

Example request:

```json
{
  "station": "Burger Shop"
}
```

### Open the door to unload

`POST /delivery/{id}/unload/start` (scope `delivery`)

At `at_dropoff`: opens the bot door. The state does not change.

Path parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | Delivery id, or your `external_id` with `id_type=external`. |

Query parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id_type` | `'external'` | no | Treat `{id}` as your `external_id`. Resolves only active deliveries. |

Response 200: The delivery.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Delivery` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | The delivery is not `at_dropoff`, or has no bot. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 404 |  | No delivery in progress with this id. |

### Finish unloading

`POST /delivery/{id}/unload/finish` (scope `delivery`)

Confirms the hand-off: the delivery is `delivered`. On a bot whose lid a person closes (`manual_close_door`), this does nothing: the unload completes when the lid closes.

Path parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | Delivery id, or your `external_id` with `id_type=external`. |

Query parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id_type` | `'external'` | no | Treat `{id}` as your `external_id`. Resolves only active deliveries. |

Response 200: The delivery.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Delivery` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | The delivery is not `at_dropoff`, or has no bot. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 404 |  | No delivery in progress with this id. |

## Pickup-only

Milestones of orders the customer collects, with no bot.

### Start preparation

`POST /delivery/{id}/preparation/start` (scope `delivery`)

Pickup-only. Moves the delivery to `preparing`. Repeating it is a no-op.

Path parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | Delivery id, or your `external_id` with `id_type=external`. |

Query parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id_type` | `'external'` | no | Treat `{id}` as your `external_id`. Resolves only active deliveries. |

Response 200: The delivery.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Delivery` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | Not a pickup-only delivery. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 404 |  | No delivery with this id in your namespace (by `external_id`: no active one). |
| 409 | `MILESTONE_OUT_OF_ORDER` | The delivery ended before this milestone. |

### Finish preparation

`POST /delivery/{id}/preparation/finish` (scope `delivery`)

Pickup-only. Marks the order, or one `station` or `package` of it, ready. With several stations, send one call per station; the delivery is `ready_for_pickup` when all are ready. Repeating it is a no-op.

Path parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | Delivery id, or your `external_id` with `id_type=external`. |

Query parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id_type` | `'external'` | no | Treat `{id}` as your `external_id`. Resolves only active deliveries. |

Body (optional):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `package` | `string` | no | A package `reference`. |
| `station` | `string` | no | Every package of this station. |
| `all_stations` | `boolean` | no | Accepted, but has no effect today. |

Response 200: The delivery.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Delivery` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 | `MILESTONE_TARGET_AMBIGUOUS` | Both `package` and `station` were sent. |
| 400 | `MILESTONE_TARGET_REQUIRED` | The order has several stations or packages and no target was sent. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 404 |  | No delivery with this id in your namespace (by `external_id`: no active one). |
| 404 | `MILESTONE_TARGET_NOT_FOUND` | Unknown `package` or `station`. |
| 409 | `MILESTONE_OUT_OF_ORDER` | A previous milestone is missing, or the delivery ended without this one. |
| 409 | `MILESTONE_TARGET_NOT_LOADABLE` | The target is paused, failed, skipped or canceled. Nothing changed. |

Example request:

```json
{
  "station": "Burger Shop"
}
```

### Confirm pickup

`POST /delivery/{id}/pickup/confirm` (scope `delivery`)

Pickup-only. The customer took the order, or one `station` or `package` of it. The delivery is `picked_up` when every station is. The customer can also confirm from the tracker page. Repeating it is a no-op.

Path parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | Delivery id, or your `external_id` with `id_type=external`. |

Query parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id_type` | `'external'` | no | Treat `{id}` as your `external_id`. Resolves only active deliveries. |

Body (optional):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `package` | `string` | no | A package `reference`. |
| `station` | `string` | no | Every package of this station. |
| `all_stations` | `boolean` | no | Accepted, but has no effect today. |

Response 200: The delivery.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Delivery` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 | `MILESTONE_TARGET_AMBIGUOUS` | Both `package` and `station` were sent. |
| 400 | `MILESTONE_TARGET_REQUIRED` | The order has several stations or packages and no target was sent. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 404 |  | No delivery with this id in your namespace (by `external_id`: no active one). |
| 404 | `MILESTONE_TARGET_NOT_FOUND` | Unknown `package` or `station`. |
| 409 | `MILESTONE_OUT_OF_ORDER` | A previous milestone is missing, or the delivery ended without this one. |
| 409 | `MILESTONE_TARGET_NOT_LOADABLE` | The target is paused, failed, skipped or canceled. Nothing changed. |

Example request:

```json
{
  "station": "Burger Shop"
}
```

## Kitchen availability

Whether a kitchen can take orders right now.

### Check several kitchens

`GET /delivery/points/availability` (scope `delivery`)

Send exactly one of `location_id` (every pickup point there) or `point_ids` (up to 100). Unknown ids come back with `reason: unknown_point`.

Query parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `location_id` | `string` | no |  |
| `point_ids` | `string` | no |  |
| `id_type` | `'external'` | no |  |

Response 200: One entry per point.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `PointAvailability[]` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | Both or neither filter, more than 100 ids, or `id_type` with `location_id`. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |

Example response:

```json
{
  "data": [
    {
      "point_id": "V1StGXR8Z5jdHi6BmyT2q",
      "external_id": "kitchen-north",
      "name": "North Kitchen",
      "available": true,
      "last_seen_at": "2026-06-17T15:40:00.000Z",
      "reason": "ok"
    },
    {
      "point_id": "9QzXcV5bNm1LkJhGfDsAp",
      "external_id": "kitchen-south",
      "name": "South Kitchen",
      "available": false,
      "reason": "no_session"
    }
  ]
}
```

### Check one kitchen

`GET /delivery/points/{id}/availability` (scope `delivery`)

Whether the kitchen at this pickup point can take orders now: its tablet session is live. Fails closed: when unsure, `available` is false. Always 200 for a known caller.

Path parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | Point id (ours, not `external_id`). |

Query parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id_type` | `string` | no |  |

Response 200: The availability.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Availability` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | `id_type` was sent. Use the batch endpoint to look up by `external_id`. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |

Example response:

```json
{
  "data": {
    "available": true,
    "last_seen_at": "2026-06-17T15:40:00.000Z",
    "reason": "ok"
  }
}
```

## Partner

Your partner account. Each API key has one, created once.

### Get your partner

`GET /partners` (scope `delivery`)

Response 200: Your partner.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Partner` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 404 |  | You have not created your partner yet. Create it with `POST /partners`. |

Example response:

```json
{
  "data": {
    "id": "V1StGXR8Z5jdHi6BmyT2q",
    "external_id": "ext_8Fh2KpLm4NqRs7TvWxYz1",
    "namespace": "partner_acme",
    "name": "Acme Logistics",
    "enabled": true
  }
}
```

### Create your partner

`POST /partners` (scope `delivery`)

Creates the partner of your API key, which can have only one.

Body:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | `string` | yes | Display name. Must be unique. |

Response 201: The created partner.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Partner` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | Invalid body, for example a missing `name`. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 409 |  | Your key already has a partner. Use `GET` or `PATCH /partners`. |
| 409 | `PARTNER_NAME_TAKEN` | `name` is already used by another partner. |

Example request:

```json
{
  "name": "Acme Logistics"
}
```

Example response:

```json
{
  "data": {
    "id": "V1StGXR8Z5jdHi6BmyT2q",
    "external_id": "ext_8Fh2KpLm4NqRs7TvWxYz1",
    "namespace": "partner_acme",
    "name": "Acme Logistics",
    "enabled": true
  }
}
```

### Update your partner

`PATCH /partners` (scope `delivery`)

Body:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | `string` | yes | Display name. Must be unique. |

Response 200: Your updated partner.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Partner` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | Invalid body, or no field to update. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 404 |  | You have not created your partner yet. Create it with `POST /partners`. |
| 409 | `PARTNER_NAME_TAKEN` | `name` is already used by another partner. |

Example request:

```json
{
  "name": "Acme Logistics US"
}
```

Example response:

```json
{
  "data": {
    "id": "V1StGXR8Z5jdHi6BmyT2q",
    "external_id": "ext_8Fh2KpLm4NqRs7TvWxYz1",
    "namespace": "partner_acme",
    "name": "Acme Logistics US",
    "enabled": true
  }
}
```

## Locations

The operating areas of your partner, and the paths our bots can drive in them.

### List locations

`GET /locations` (scope `delivery`)

Response 200: Every location of your partner.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Location[]` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | Your partner does not exist yet. Create it with `POST /partners`. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |

Example response:

```json
{
  "data": [
    {
      "id": "7Nk2QhVpXrLmT4wZaBcDe",
      "external_id": "ext_8Fh2KpLm4NqRs7TvWxYz1",
      "partner_id": "V1StGXR8Z5jdHi6BmyT2q",
      "full_name": "Downtown Campus",
      "short_name": "DTC",
      "country_code": "CO",
      "city_name": "Bogotá",
      "state_name": null,
      "time_zone": "America/Bogota",
      "enabled": true,
      "polygon": {
        "type": "Polygon",
        "coordinates": [
          [
            -74.0712,
            4.6498
          ],
          [
            -74.0521,
            4.6498
          ],
          [
            -74.0521,
            4.6602
          ],
          [
            -74.0712,
            4.6602
          ],
          [
            -74.0712,
            4.6498
          ]
        ]
      },
      "availability_intervals": null
    }
  ]
}
```

### Create a location

`POST /locations` (scope `delivery`)

Body:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `full_name` | `string` | yes | Display name. Must be unique. |
| `short_name` | `string` | yes | Short code, 3 to 4 characters. Must be unique. Up to 4 characters. |
| `country_code` | `string` | yes | ISO 3166-1 alpha-2, for example `US`. Up to 2 characters. |
| `city_name` | `string` | no |  |
| `state_name` | `string` | no |  |
| `time_zone` | `string` | no | IANA time zone, for example `America/Bogota`. Defaults to `America/Bogota`. |
| `polygon` | `object` | yes | Operating area. `coordinates` is a flat list of `[lng, lat]` pairs, not the nested rings of standard GeoJSON. |
| `polygon.type` | `'Polygon'` | yes |  |
| `polygon.coordinates` | `number[][]` | yes |  |

Response 201: The created location.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Location` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | Invalid body, for example a `short_name` that is not 3 to 4 characters or a `polygon` with nested rings. |
| 400 |  | Your partner does not exist yet. Create it with `POST /partners`. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 409 | `LOCATION_NAME_TAKEN` | `full_name` or `short_name` is already used: names are unique across all partners. `params.field` says which. |

Example request:

```json
{
  "full_name": "Downtown Campus",
  "short_name": "DTC",
  "country_code": "CO",
  "city_name": "Bogotá",
  "polygon": {
    "type": "Polygon",
    "coordinates": [
      [
        -74.0712,
        4.6498
      ],
      [
        -74.0521,
        4.6498
      ],
      [
        -74.0521,
        4.6602
      ],
      [
        -74.0712,
        4.6602
      ],
      [
        -74.0712,
        4.6498
      ]
    ]
  }
}
```

Example response:

```json
{
  "data": {
    "id": "7Nk2QhVpXrLmT4wZaBcDe",
    "external_id": "ext_8Fh2KpLm4NqRs7TvWxYz1",
    "partner_id": "V1StGXR8Z5jdHi6BmyT2q",
    "full_name": "Downtown Campus",
    "short_name": "DTC",
    "country_code": "CO",
    "city_name": "Bogotá",
    "state_name": null,
    "time_zone": "America/Bogota",
    "enabled": true,
    "polygon": {
      "type": "Polygon",
      "coordinates": [
        [
          -74.0712,
          4.6498
        ],
        [
          -74.0521,
          4.6498
        ],
        [
          -74.0521,
          4.6602
        ],
        [
          -74.0712,
          4.6602
        ],
        [
          -74.0712,
          4.6498
        ]
      ]
    },
    "availability_intervals": null
  }
}
```

### Get a location

`GET /locations/{id}` (scope `delivery`)

Path parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | Location id. |

Response 200: The location.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Location` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | Your partner does not exist yet. Create it with `POST /partners`. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 404 |  | No location with this id in your partner. |

Example response:

```json
{
  "data": {
    "id": "7Nk2QhVpXrLmT4wZaBcDe",
    "external_id": "ext_8Fh2KpLm4NqRs7TvWxYz1",
    "partner_id": "V1StGXR8Z5jdHi6BmyT2q",
    "full_name": "Downtown Campus",
    "short_name": "DTC",
    "country_code": "CO",
    "city_name": "Bogotá",
    "state_name": null,
    "time_zone": "America/Bogota",
    "enabled": true,
    "polygon": {
      "type": "Polygon",
      "coordinates": [
        [
          -74.0712,
          4.6498
        ],
        [
          -74.0521,
          4.6498
        ],
        [
          -74.0521,
          4.6602
        ],
        [
          -74.0712,
          4.6602
        ],
        [
          -74.0712,
          4.6498
        ]
      ]
    },
    "availability_intervals": null
  }
}
```

### Update a location

`PATCH /locations/{id}` (scope `delivery`)

Send only the fields you change.

Path parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | Location id. |

Body:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `full_name` | `string` | no | Display name. Must be unique. |
| `short_name` | `string` | no | Short code, 3 to 4 characters. Must be unique. Up to 4 characters. |
| `country_code` | `string` | no | ISO 3166-1 alpha-2, for example `US`. Up to 2 characters. |
| `city_name` | `string` | no |  |
| `state_name` | `string` | no |  |
| `time_zone` | `string` | no | IANA time zone, for example `America/Bogota`. Defaults to `America/Bogota`. |
| `polygon` | `object` | no | Operating area. `coordinates` is a flat list of `[lng, lat]` pairs, not the nested rings of standard GeoJSON. |
| `polygon.type` | `'Polygon'` | yes |  |
| `polygon.coordinates` | `number[][]` | yes |  |

Response 200: The updated location.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Location` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | Invalid body, or no field to update. |
| 400 |  | Your partner does not exist yet. Create it with `POST /partners`. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 404 |  | No location with this id in your partner. |
| 409 | `LOCATION_NAME_TAKEN` | `full_name` or `short_name` is already used: names are unique across all partners. `params.field` says which. |

Example request:

```json
{
  "city_name": "Bogotá D.C."
}
```

Example response:

```json
{
  "data": {
    "id": "7Nk2QhVpXrLmT4wZaBcDe",
    "external_id": "ext_8Fh2KpLm4NqRs7TvWxYz1",
    "partner_id": "V1StGXR8Z5jdHi6BmyT2q",
    "full_name": "Downtown Campus",
    "short_name": "DTC",
    "country_code": "CO",
    "city_name": "Bogotá D.C.",
    "state_name": null,
    "time_zone": "America/Bogota",
    "enabled": true,
    "polygon": {
      "type": "Polygon",
      "coordinates": [
        [
          -74.0712,
          4.6498
        ],
        [
          -74.0521,
          4.6498
        ],
        [
          -74.0521,
          4.6602
        ],
        [
          -74.0712,
          4.6602
        ],
        [
          -74.0712,
          4.6498
        ]
      ]
    },
    "availability_intervals": null
  }
}
```

### Get the paths of a location

`GET /locations/{id}/paths` (scope `delivery`)

The paths our bots can drive at the location: sidewalks, crossings and driveways, as a GeoJSON FeatureCollection of LineStrings. A location with no map returns an empty collection. Not paginated; a change to the map can take up to 10 minutes to appear.

Path parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | Location id. |

Response 200: The path network.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `LocationPaths` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | Your partner does not exist yet. Create it with `POST /partners`. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 404 |  | No location with this id in your partner. |
| 503 |  | The map service is temporarily unavailable. Retry later. |

Example response:

```json
{
  "data": {
    "type": "FeatureCollection",
    "features": [
      {
        "type": "Feature",
        "geometry": {
          "type": "LineString",
          "coordinates": [
            [
              -74.0712,
              4.6498
            ],
            [
              -74.0689,
              4.6512
            ],
            [
              -74.0671,
              4.6527
            ]
          ]
        },
        "properties": {
          "id": 1042,
          "kind": "sidewalk"
        }
      },
      {
        "type": "Feature",
        "geometry": {
          "type": "LineString",
          "coordinates": [
            [
              -74.0671,
              4.6527
            ],
            [
              -74.067,
              4.6531
            ]
          ]
        },
        "properties": {
          "id": 1043,
          "kind": "crossing"
        }
      }
    ]
  }
}
```

## Points

Named coordinates inside a location, used as pickup and dropoff anchors.

### List points

`GET /points` (scope `delivery`)

The points of one location.

Query parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `location_id` | `string` | yes | A location you own. |

Response 200: The points of the location.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Point[]` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | `location_id` is missing. |
| 400 |  | Your partner does not exist yet. Create it with `POST /partners`. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 404 |  | No location with this id in your partner. |

Example response:

```json
{
  "data": [
    {
      "id": "Qm3LxYtR9vBnKs2FdHjWp",
      "external_id": "kitchen-north",
      "location_id": "7Nk2QhVpXrLmT4wZaBcDe",
      "partner_id": "V1StGXR8Z5jdHi6BmyT2q",
      "name": "North Kitchen",
      "description": null,
      "lat": 4.6512,
      "lng": -74.0689,
      "azimuth": null,
      "tags": [
        "pickup"
      ]
    }
  ]
}
```

### Create a point

`POST /points` (scope `delivery`)

Adds a point to one of your locations. A point without the `pickup` tag is never reported as available by the kitchen availability check (`not_pickup`).

Body:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `location_id` | `string` | yes | A location you own. |
| `lat` | `number` | yes | -90 to 90. |
| `lng` | `number` | yes | -180 to 180. |
| `name` | `string` | no |  |
| `description` | `string` | no |  |
| `azimuth` | `integer` | no | Approach heading in degrees, 0 to 360. 0 to 360. |
| `external_id` | `string` | no | Your own id for the point. Must be unique across your points. Generated when omitted. |
| `tags` | `('pickup' \| 'dropoff')[]` | no | Roles of the point: `pickup` (kitchen, where orders start) and `dropoff` (delivery destination). Up to 20 items. |

Response 201: The created point.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Point` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | Invalid body, for example a `lat` out of range or a tag other than `pickup` or `dropoff`. |
| 400 |  | Your partner does not exist yet. Create it with `POST /partners`. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 404 |  | No location with this id in your partner. |
| 409 | `POINT_EXTERNAL_ID_TAKEN` | `external_id` is already used by another of your points. |

Example request:

```json
{
  "location_id": "7Nk2QhVpXrLmT4wZaBcDe",
  "external_id": "kitchen-north",
  "name": "North Kitchen",
  "lat": 4.6512,
  "lng": -74.0689,
  "tags": [
    "pickup"
  ]
}
```

Example response:

```json
{
  "data": {
    "id": "Qm3LxYtR9vBnKs2FdHjWp",
    "external_id": "kitchen-north",
    "location_id": "7Nk2QhVpXrLmT4wZaBcDe",
    "partner_id": "V1StGXR8Z5jdHi6BmyT2q",
    "name": "North Kitchen",
    "description": null,
    "lat": 4.6512,
    "lng": -74.0689,
    "azimuth": null,
    "tags": [
      "pickup"
    ]
  }
}
```

### Get a point

`GET /points/{id}` (scope `delivery`)

Path parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | Point id, or your `external_id` with `id_type=external`. |

Query parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id_type` | `'external'` | no | Treat `{id}` as your `external_id`. |

Response 200: The point.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Point` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | Your partner does not exist yet. Create it with `POST /partners`. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 404 |  | No point with this id in your partner (by `external_id`: no point with this value). |

Example response:

```json
{
  "data": {
    "id": "Qm3LxYtR9vBnKs2FdHjWp",
    "external_id": "kitchen-north",
    "location_id": "7Nk2QhVpXrLmT4wZaBcDe",
    "partner_id": "V1StGXR8Z5jdHi6BmyT2q",
    "name": "North Kitchen",
    "description": null,
    "lat": 4.6512,
    "lng": -74.0689,
    "azimuth": null,
    "tags": [
      "pickup"
    ]
  }
}
```

### Update a point

`PATCH /points/{id}` (scope `delivery`)

Send only the fields you change. `tags` replaces the `pickup` and `dropoff` roles, so omit it to keep them. A point cannot move to another location.

Path parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | Point id, or your `external_id` with `id_type=external`. |

Query parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id_type` | `'external'` | no | Treat `{id}` as your `external_id`. |

Body:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `lat` | `number` | no | -90 to 90. |
| `lng` | `number` | no | -180 to 180. |
| `name` | `string` | no |  |
| `description` | `string` | no |  |
| `azimuth` | `integer` | no | Approach heading in degrees, 0 to 360. 0 to 360. |
| `external_id` | `string` | no | Your own id for the point. Must be unique across your points. Generated when omitted. |
| `tags` | `('pickup' \| 'dropoff')[]` | no | The complete set of roles. It replaces the current `pickup` and `dropoff` roles, so send every role you want to keep. Up to 20 items. |

Response 200: The updated point.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Point` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | Invalid body: no field to update, an unknown field (such as `location_id`), or an empty `tags`. |
| 400 |  | Your partner does not exist yet. Create it with `POST /partners`. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 404 |  | No point with this id in your partner (by `external_id`: no point with this value). |
| 409 | `POINT_EXTERNAL_ID_TAKEN` | `external_id` is already used by another of your points. |

Example request:

```json
{
  "tags": [
    "pickup",
    "dropoff"
  ]
}
```

Example response:

```json
{
  "data": {
    "id": "Qm3LxYtR9vBnKs2FdHjWp",
    "external_id": "kitchen-north",
    "location_id": "7Nk2QhVpXrLmT4wZaBcDe",
    "partner_id": "V1StGXR8Z5jdHi6BmyT2q",
    "name": "North Kitchen",
    "description": null,
    "lat": 4.6512,
    "lng": -74.0689,
    "azimuth": null,
    "tags": [
      "dropoff",
      "pickup"
    ]
  }
}
```

## Bots

Status, live telemetry, camera and remote stops of your bots.

### List bots

`GET /bots` (scope `delivery`)

Your bots: assigned to your partner, or with no partner and at one of your locations. Connected bots come first. No telemetry or control.

Response 200: Your bots.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Bot[]` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | Your partner does not exist yet. Create it with `POST /partners`. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |

Example response:

```json
{
  "data": [
    {
      "id": "4T001",
      "commercial_name": "Bot 12",
      "available": true,
      "can_take_delivery": true,
      "availability_status": "available",
      "connected": true,
      "operational": true,
      "autonomy_enabled": true,
      "manual_close_door": false,
      "location_id": "7Nk2QhVpXrLmT4wZaBcDe",
      "partner_id": "V1StGXR8Z5jdHi6BmyT2q",
      "current_action": null,
      "current_job_id": null,
      "reserved_job_id": null,
      "current_target_point_id": null,
      "last_connection_event_at": 1781710800000,
      "last_operational_event_at": 1781710200000
    }
  ]
}
```

### Get a bot

`GET /bots/{id}` (scope `delivery`)

The bot with its last telemetry and who controls it. Check `recorded_at` and `connected` before trusting a position.

Path parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | Bot id, for example `4T001`. |

Response 200: The bot.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `BotDetail` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | Your partner does not exist yet. Create it with `POST /partners`. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 404 |  | No bot with this id among your bots. |

Example response:

```json
{
  "data": {
    "id": "4T001",
    "commercial_name": "Bot 12",
    "available": true,
    "can_take_delivery": true,
    "availability_status": "available",
    "connected": true,
    "operational": true,
    "autonomy_enabled": true,
    "manual_close_door": false,
    "location_id": "7Nk2QhVpXrLmT4wZaBcDe",
    "partner_id": "V1StGXR8Z5jdHi6BmyT2q",
    "current_action": null,
    "current_job_id": null,
    "reserved_job_id": null,
    "current_target_point_id": null,
    "last_connection_event_at": 1781710800000,
    "last_operational_event_at": 1781710200000,
    "telemetry": {
      "position": {
        "lat": 4.6498,
        "lng": -74.0712,
        "heading": 87.5,
        "recorded_at": "2026-06-17T15:41:01.000Z"
      },
      "battery": {
        "percentage": 82,
        "charging": false,
        "recorded_at": "2026-06-17T15:40:52.000Z"
      },
      "speed": {
        "mps": 0.84,
        "recorded_at": "2026-06-17T15:41:00.500Z"
      },
      "door": {
        "status": "closed",
        "recorded_at": "2026-06-17T15:40:58.000Z"
      }
    },
    "control": {
      "mode": "autonomous",
      "since": null
    }
  }
}
```

### Watch a bot live

`POST /bots/{id}/video` (scope `delivery`)

Returns a short-lived link to the bot camera, to open or embed. Request one link per viewer. Works with a `delivery` key for your bots, or a `fleet` key for the bots of your fleet.

Path parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | Bot id, for example `4T001`. |

Response 200: The player link.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `object` | yes |  |
| `data.url` | `string` | yes | Player link with its own viewing credential. Do not log it. |
| `data.expires_at` | `string (date-time)` | yes | Open the link before this time. A player that is already open keeps playing. |
| `data.live` | `boolean` | yes | False when the camera is not sending now. The player starts when it does. |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | Your partner does not exist yet. Create it with `POST /partners`. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 404 |  | No bot with this id that your key may watch. |
| 409 |  | The bot has no live video source. |
| 503 |  | Live video is temporarily unavailable. Retry later. |

Example response:

```json
{
  "data": {
    "url": "https://remi.kiwi/live#s=miami&b=4T001&t=eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ2aWV3ZXIifQ.c2lnbmF0dXJl",
    "expires_at": "2027-06-17T23:40:00.000Z",
    "live": true
  }
}
```

### Stop a bot

`POST /bots/{id}/stop` (scope `delivery`)

Asks a bot that is not on a delivery in progress to halt where it is. It does not hold the bot: its next delivery moves it. Not a hardware emergency stop.

Path parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | Bot id, for example `4T001`. |

Body (optional):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `reason` | `string` | no | Optional note. Cut to 200 characters. |

Response 200: The stop was sent.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `object` | yes |  |
| `data.bot_id` | `string` | yes |  |
| `data.stopped` | `true` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | Your partner does not exist yet. Create it with `POST /partners`. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 404 |  | No bot with this id among your bots. |
| 409 | `BOT_OFFLINE` | The bot is offline. |
| 409 | `STOP_NOT_SUPPORTED` | This robot cannot be stopped through the API. |
| 409 | `ACTIVE_DELIVERY` | The bot is on a delivery in progress, and a stop would not hold. Pause the delivery instead. `params.delivery_id` names it when it is yours. |

Example request:

```json
{
  "reason": "Blocking a door"
}
```

Example response:

```json
{
  "data": {
    "bot_id": "4T001",
    "stopped": true
  }
}
```

### Hard stop a bot

`POST /bots/{id}/hard_stop` (scope `delivery`)

Sends the stop our teleoperators use: pressed, then released after one second. It works while the bot is on a delivery (operations is alerted) and does not pause the delivery. Not a hardware emergency stop: in an emergency call operations.

Path parameters:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | Bot id, for example `4T001`. |

Body (optional):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `reason` | `string` | no | Why you stopped it. Operations sees it when the bot is on a delivery. Cut to 200 characters. |

Response 200: The stop was sent and released.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `object` | yes |  |
| `data.bot_id` | `string` | yes |  |
| `data.hard_stopped` | `true` | yes |  |

Errors:

| Status | Code | When |
| --- | --- | --- |
| 400 |  | Your partner does not exist yet. Create it with `POST /partners`. |
| 401 |  | Missing or invalid API key. |
| 403 |  | The API key does not have the `delivery` scope. |
| 404 |  | No bot with this id among your bots. |
| 409 | `BOT_OFFLINE` | The bot is offline. |
| 409 | `STOP_NOT_SUPPORTED` | This robot cannot take a hard stop through the API. |

Example request:

```json
{
  "reason": "Person in the path"
}
```

Example response:

```json
{
  "data": {
    "bot_id": "4T001",
    "hard_stopped": true
  }
}
```

## Types

### Problem

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `type` | `string` | yes | Always `about:blank`. |
| `title` | `string` | yes | The HTTP status text. |
| `status` | `integer` | yes | -9007199254740991 to 9007199254740991. |
| `detail` | `string` | yes | Human-readable. Do not parse it: branch on `code`. |
| `instance` | `string` | yes | The request path. |
| `code` | `string` | no | Stable machine-readable error code, when the error has one. |
| `params` | `Record<string, unknown>` | no | Values that explain the error, keyed by name. |

### Delivery

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | Delivery id, usually like `ES-5867`. Treat it as an opaque string. |
| `name` | `string \| null` | yes |  |
| `draft` | `boolean` | yes | True while a draft. Publish with `PATCH` and `draft: false`. |
| `mode` | `'standard' \| 'pickup_only'` | yes | `standard`: a bot delivers. `pickup_only`: the customer picks up, no bot. |
| `state` | `DeliveryState` | yes |  |
| `paused` | `boolean` | yes | True while on hold. `state` keeps the leg it was on. |
| `bot` | `object \| null` | yes | The assigned bot. Null before assignment and for pickup-only. |
| `bot.id` | `string` | yes |  |
| `bot.lat` | `number \| null` | yes |  |
| `bot.lng` | `number \| null` | yes |  |
| `bot.door_status` | `string \| null` | yes |  |
| `bot.control` | `object \| null` | yes | Who drives the bot. Set on webhooks only; null on reads. |
| `bot.control.mode` | `'autonomous' \| 'teleop_requested' \| 'teleop'` | yes | `autonomous`: drives itself. `teleop_requested`: waiting for an operator. `teleop`: an operator is driving. |
| `bot.control.since` | `number \| null` | yes | Epoch milliseconds when the mode started. Null when autonomous. |
| `location_id` | `string` | yes |  |
| `arriving` | `boolean \| null` | yes | True while the bot approaches its current stop. Not the signal to load: wait for `at_pickup`. |
| `arriving_at` | `string (date-time) \| null` | yes | Estimated arrival at the current stop. |
| `options` | `object` | yes | Stored options. `tracking` is not returned. |
| `options.bots` | `string[] \| null` | yes |  |
| `options.bot_tags` | `string[] \| null` | yes |  |
| `options.require_available_bot` | `boolean` | yes |  |
| `options.webhook_url` | `string \| null` | yes |  |
| `options.webhook_headers` | `Record<string, string> \| null` | yes |  |
| `options.return_enabled` | `boolean` | yes |  |
| `options.eta_updates` | `boolean` | yes |  |
| `external_id` | `string \| null` | yes |  |
| `pickup` | `DeliveryPoint` | yes |  |
| `dropoff` | `DeliveryPoint \| null` | yes | Null for pickup-only. |
| `return_point` | `DeliveryPoint \| null` | yes |  |
| `packages` | `DeliveryPackage[]` | yes |  |
| `deliver_by` | `string (date-time) \| null` | yes |  |
| `created_at` | `string (date-time)` | yes |  |
| `metadata` | `Record<string, unknown> \| null` | yes |  |
| `event_type` | `string \| null` | yes | On a webhook, the event that sent it. Null on reads. |
| `estimates` | `object` | yes |  |
| `estimates.distance` | `number \| null` | yes | Meters left. |
| `estimates.duration` | `number \| null` | yes | Milliseconds of travel left. |
| `estimates.pickup` | `DeliveryNodeEstimate` | yes |  |
| `estimates.dropoff` | `DeliveryNodeEstimate \| null` | yes |  |
| `estimates.scheduled_at` | `string (date-time) \| null` | yes |  |
| `estimates.target_completion_at` | `string (date-time) \| null` | yes |  |
| `tracker_url` | `string \| null` | yes | Tracking page for the recipient. |
| `scheduled` | `boolean` | yes |  |
| `cancellation_reason` | `string \| null` | yes |  |
| `incomplete_reason` | `string \| null` | yes |  |

### DeliveryState

Where the delivery is. Standard: `pending` → `going_to_pickup` → `at_pickup` → `going_to_dropoff` → `at_dropoff` → `delivered`, or `going_to_return` → `at_return` → `returned`. Pickup-only: `pending` → `preparing` → `ready_for_pickup` → `picked_up`. `canceled` means someone called it off; `failed` means it could not be completed.

### DeliveryPoint

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string \| null` | yes | Registered point id, or null when the point was sent as coordinates only. |
| `name` | `string` | yes |  |
| `lat` | `number` | yes |  |
| `lng` | `number` | yes |  |
| `azimuth` | `number \| null` | yes | Approach heading in degrees, 0 to 360. |
| `contact` | `object \| null` | yes |  |
| `contact.name` | `string \| null` | yes |  |
| `contact.phone` | `string \| null` | yes |  |
| `contact.email` | `string \| null` | yes |  |
| `matching` | `{ mode: 'exact', required?: boolean } \| { mode: 'snap', radius: number, required?: boolean } \| { mode: 'associate', radius: number, required?: boolean } \| null` | yes | Link coordinates to a registered point. `exact`: a point within 5 m, use its coordinates. `snap`: the nearest point within `radius` meters, use its coordinates. `associate`: the nearest point within `radius` meters, keep your coordinates. `required: true` fails with 400 when none is found. |

### DeliveryPackage

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `reference` | `string \| null` | yes | Your reference, as sent. |
| `items` | `({ name: string, quantity: number, description: string \| null, picture_url: string \| null, metadata: Record<string, unknown> \| null })[] \| null` | yes |  |
| `items[].name` | `string` | yes |  |
| `items[].quantity` | `number` | yes |  |
| `items[].description` | `string \| null` | yes |  |
| `items[].picture_url` | `string \| null` | yes |  |
| `items[].metadata` | `Record<string, unknown> \| null` | yes |  |
| `dimensions` | `object \| null` | yes | Always null today: dimensions are accepted on create but not stored. |
| `dimensions.length` | `number \| null` | yes |  |
| `dimensions.width` | `number \| null` | yes |  |
| `dimensions.height` | `number \| null` | yes |  |
| `weight` | `number \| null` | yes | Grams. |
| `metadata` | `Record<string, unknown> \| null` | yes |  |
| `station` | `string \| null` | yes | Prep station, trimmed. Send this value back to target the station. |
| `loaded` | `boolean` | yes | True once this package's pickup load is complete. |

### DeliveryNodeEstimate

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `arrival_at` | `string (date-time) \| null` | yes | The real arrival once reached, else a projection. Null when unknown. |
| `completion_at` | `string (date-time) \| null` | yes | When the stop finishes: real once done, else a projection. |
| `source` | `'actual' \| 'derived' \| null` | yes | `actual`: `arrival_at` already happened. `derived`: a projection. |
| `unknown_reason` | `'no_route' \| 'unpriced_leg' \| 'not_departed' \| null` | yes | Set whenever `arrival_at` is null. `no_route`: no bot yet. `unpriced_leg`: leg not priced yet. `not_departed`: not on its way yet. |

### DeliveryEta

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `bot_id` | `string \| null` | yes | The bot the estimate is for. Null until a bot is assigned. |
| `pickup_eta` | `string (date-time) \| null` | yes |  |
| `dropoff_eta` | `string (date-time) \| null` | yes |  |

### DeliveryRoute

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `source` | `'estimated' \| 'robot'` | yes | Always `estimated` today. Handle other values. |
| `mapped` | `boolean` | yes | False when at least one leg is a straight-line estimate. |
| `computed_at` | `string (date-time)` | yes |  |
| `position_recorded_at` | `string (date-time) \| null` | yes | When the bot reported the start position. Null before a bot drives it. |
| `distance` | `number` | yes | Meters left, travel only. |
| `duration` | `number` | yes | Milliseconds left, travel only. |
| `points` | `[number, number][]` | yes | `[lat, lng]` pairs in driving order. Empty at the last stop. |
| `stops` | `({ name: 'pickup' \| 'dropoff' \| 'return', lat: number, lng: number, point_index: number })[]` | yes |  |
| `stops[].name` | `'pickup' \| 'dropoff' \| 'return'` | yes |  |
| `stops[].lat` | `number` | yes |  |
| `stops[].lng` | `number` | yes |  |
| `stops[].point_index` | `number` | yes | Index into `points` of this stop. |

### PointAvailability

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `available` | `boolean` | yes |  |
| `last_seen_at` | `string` | no | Present only when available. |
| `reason` | `enum` | yes | One of `ok`, `no_session`, `no_kds_session`, `not_engine_mode`, `reporting_disabled`, `not_pickup`, `unknown_point`. |
| `pds` | `object` | no | Kitchen-display locations only: the operator tablet. |
| `pds.available` | `boolean` | yes |  |
| `pds.last_seen_at` | `string` | no |  |
| `kds` | `object` | no | Kitchen-display locations only: the kitchen board. |
| `kds.available` | `boolean` | yes |  |
| `kds.last_seen_at` | `string` | no |  |
| `point_id` | `string \| null` | yes |  |
| `external_id` | `string \| null` | yes |  |
| `name` | `string \| null` | yes |  |

### Availability

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `available` | `boolean` | yes |  |
| `last_seen_at` | `string` | no | Present only when available. |
| `reason` | `enum` | yes | One of `ok`, `no_session`, `no_kds_session`, `not_engine_mode`, `reporting_disabled`, `not_pickup`, `unknown_point`. |
| `pds` | `object` | no | Kitchen-display locations only: the operator tablet. |
| `pds.available` | `boolean` | yes |  |
| `pds.last_seen_at` | `string` | no |  |
| `kds` | `object` | no | Kitchen-display locations only: the kitchen board. |
| `kds.available` | `boolean` | yes |  |
| `kds.last_seen_at` | `string` | no |  |

### PointInput

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | no | A registered point. |
| `external_id` | `string` | no | A registered point, by your id. |
| `name` | `string` | no |  |
| `lat` | `number` | no |  |
| `lng` | `number` | no |  |
| `azimuth` | `integer \| null` | no | Approach heading in degrees. 0 to 360. |
| `contact` | `object \| null` | no | Contact at this point. On the dropoff, the recipient of tracking messages. |
| `contact.name` | `string \| null` | no |  |
| `contact.phone` | `string \| null` | no | With country code. Needed for SMS tracking. |
| `contact.email` | `string (email) \| null` | no | Needed for email tracking. |
| `matching` | `{ mode: 'exact', required?: boolean } \| { mode: 'snap', radius: number, required?: boolean } \| { mode: 'associate', radius: number, required?: boolean } \| null` | no | Link coordinates to a registered point. `exact`: a point within 5 m, use its coordinates. `snap`: the nearest point within `radius` meters, use its coordinates. `associate`: the nearest point within `radius` meters, keep your coordinates. `required: true` fails with 400 when none is found. |

### PackageInput

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | `string \| null` | no |  |
| `picture_url` | `string \| null` | no |  |
| `reference` | `string \| null` | no | Your reference. Target this package by it when loading. |
| `items` | `({ name: string, quantity: integer, description?: string \| null, picture_url?: string (uri) \| null, metadata?: Record<string, unknown> \| null })[] \| null` | no |  |
| `items[].name` | `string` | yes |  |
| `items[].quantity` | `integer` | yes | At most 9007199254740991. |
| `items[].description` | `string \| null` | no |  |
| `items[].picture_url` | `string (uri) \| null` | no |  |
| `items[].metadata` | `Record<string, unknown> \| null` | no |  |
| `dimensions` | `object \| null` | no |  |
| `dimensions.length` | `number` | yes | Length in millimeters |
| `dimensions.width` | `number` | yes | Width in millimeters |
| `dimensions.height` | `number` | yes | Height in millimeters |
| `weight` | `number \| null` | no | Grams. |
| `metadata` | `Record<string, unknown> \| null` | no |  |
| `station` | `string \| null` | no | Prep station that owns this package (e.g. "Burger Shop"). Create one package per station to enable the PDS station filter. Trimmed; blank is treated as no station; max 50 characters. |

### DeliveryOptionsInput

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `bots` | `string[] \| null` | no | Pin the delivery to one bot id. |
| `bot_tags` | `string[]` | no | Only bots carrying every tag can take it. Up to 20 items. |
| `require_available_bot` | `boolean \| null` | no | Fail with 409 `NO_AVAILABLE_BOT` instead of waiting when no bot is free. Not with `deliver_by`. |
| `webhook_url` | `string (uri) \| null` | no | Where this delivery's webhooks go. No URL, no webhooks. |
| `webhook_headers` | `Record<string, string> \| null` | no | Sent with every webhook, for example your auth header. |
| `return_enabled` | `boolean \| null` | no | If canceled after loading, the bot brings the order back to `return_point`, else to the pickup. |
| `eta_updates` | `boolean \| null` | no | Also send a `node_eta_changed` webhook when an arrival time moves. |
| `tracking` | `object \| null` | no | Text or email the recipient at each step. Needs the matching contact detail. |
| `tracking.notify` | `object \| null` | no |  |
| `tracking.notify.sms` | `boolean \| null` | no |  |
| `tracking.notify.email` | `boolean \| null` | no |  |

### Partner

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes |  |
| `external_id` | `string` | yes | Assigned by REMI, starting with `ext_`. You cannot set it. |
| `namespace` | `string` | yes | Taken from your API key. |
| `name` | `string` | yes |  |
| `enabled` | `boolean` | yes |  |

### PartnerResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Partner` | yes |  |

### Location

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes |  |
| `external_id` | `string` | yes | Assigned by REMI, starting with `ext_`. You cannot set it. |
| `partner_id` | `string \| null` | yes |  |
| `full_name` | `string` | yes |  |
| `short_name` | `string` | yes |  |
| `country_code` | `string` | yes |  |
| `city_name` | `string \| null` | yes |  |
| `state_name` | `string \| null` | yes |  |
| `time_zone` | `string \| null` | yes |  |
| `enabled` | `boolean` | yes |  |
| `polygon` | `object` | yes | Operating area. `coordinates` is a flat list of `[lng, lat]` pairs, not the nested rings of standard GeoJSON. |
| `polygon.type` | `'Polygon'` | yes |  |
| `polygon.coordinates` | `number[][]` | yes |  |
| `availability_intervals` | `Record<string, { isOpen: boolean, openTime: string, closeTime: string }> \| null` | yes | Opening hours, set by REMI. Null when none are configured. |

### LocationResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Location` | yes |  |

### LocationPaths

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `type` | `'FeatureCollection'` | yes |  |
| `features` | `({ type: 'Feature', geometry: { type: 'LineString', coordinates: [number, number][] }, properties: { id: number \| null, kind: 'sidewalk' \| 'crossing' \| 'driveway' } })[]` | yes |  |
| `features[].type` | `'Feature'` | yes |  |
| `features[].geometry` | `object` | yes |  |
| `features[].geometry.type` | `'LineString'` | yes |  |
| `features[].geometry.coordinates` | `[number, number][]` | yes | `[lng, lat]` pairs in drive order. |
| `features[].properties` | `object` | yes |  |
| `features[].properties.id` | `number \| null` | yes | Id of the way in our map. Null when the map has none. |
| `features[].properties.kind` | `'sidewalk' \| 'crossing' \| 'driveway'` | yes |  |

### Point

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes |  |
| `external_id` | `string` | yes | Your `external_id`, or `ext_` followed by 21 characters when you did not set one. |
| `location_id` | `string` | yes |  |
| `partner_id` | `string \| null` | yes |  |
| `name` | `string` | yes |  |
| `description` | `string \| null` | yes |  |
| `lat` | `number` | yes |  |
| `lng` | `number` | yes |  |
| `azimuth` | `number \| null` | yes | Approach heading in degrees, 0 to 360. |
| `tags` | `('pickup' \| 'dropoff')[]` | yes | Roles of the point, the same values `PATCH` accepts. REMI may set other roles that are not shown. |

### PointResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `Point` | yes |  |

### Bot

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes |  |
| `commercial_name` | `string \| null` | yes |  |
| `available` | `boolean` | yes | In service. Stays true during a delivery: use `can_take_delivery` to know whether the bot is free. |
| `can_take_delivery` | `boolean` | yes | True when the bot is in service, connected, and free or only on work that a new delivery replaces. |
| `availability_status` | `enum \| null` | yes | One of `available`, `marketing`, `maintenance`, `mapping`, `off_duty`, `unknown`. |
| `connected` | `boolean` | yes | True while the bot is online. |
| `operational` | `boolean` | yes |  |
| `autonomy_enabled` | `boolean` | yes |  |
| `manual_close_door` | `boolean` | yes |  |
| `location_id` | `string \| null` | yes |  |
| `partner_id` | `string \| null` | yes |  |
| `current_action` | `enum \| null` | yes | Deprecated. Always null. One of `move`, `load`, `activity`, `unload`, `finish`, `panic`. |
| `current_job_id` | `string \| null` | yes | The delivery the bot is serving. Null while it is free or only on work that a new delivery replaces. |
| `reserved_job_id` | `string \| null` | yes |  |
| `current_target_point_id` | `string \| null` | yes | Deprecated. Always null. |
| `last_connection_event_at` | `number \| null` | yes | Epoch milliseconds. |
| `last_operational_event_at` | `number \| null` | yes | Epoch milliseconds. |

### BotDetail

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes |  |
| `commercial_name` | `string \| null` | yes |  |
| `available` | `boolean` | yes | In service. Stays true during a delivery: use `can_take_delivery` to know whether the bot is free. |
| `can_take_delivery` | `boolean` | yes | True when the bot is in service, connected, and free or only on work that a new delivery replaces. |
| `availability_status` | `enum \| null` | yes | One of `available`, `marketing`, `maintenance`, `mapping`, `off_duty`, `unknown`. |
| `connected` | `boolean` | yes | True while the bot is online. |
| `operational` | `boolean` | yes |  |
| `autonomy_enabled` | `boolean` | yes |  |
| `manual_close_door` | `boolean` | yes |  |
| `location_id` | `string \| null` | yes |  |
| `partner_id` | `string \| null` | yes |  |
| `current_action` | `enum \| null` | yes | Deprecated. Always null. One of `move`, `load`, `activity`, `unload`, `finish`, `panic`. |
| `current_job_id` | `string \| null` | yes | The delivery the bot is serving. Null while it is free or only on work that a new delivery replaces. |
| `reserved_job_id` | `string \| null` | yes |  |
| `current_target_point_id` | `string \| null` | yes | Deprecated. Always null. |
| `last_connection_event_at` | `number \| null` | yes | Epoch milliseconds. |
| `last_operational_event_at` | `number \| null` | yes | Epoch milliseconds. |
| `telemetry` | `BotTelemetry` | yes | The last values the robot reported. A group is null when it has not reported it. |
| `control` | `BotControl \| null` | yes | Who drives the bot. Null when it could not be read: retry. |

### BotTelemetry

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `position` | `object \| null` | yes |  |
| `position.lat` | `number` | yes |  |
| `position.lng` | `number` | yes |  |
| `position.heading` | `number \| null` | yes | Compass bearing in degrees: 0 is north, 90 is east. Null when the robot reports none. |
| `position.recorded_at` | `string (date-time)` | yes | When the robot measured it, in UTC. |
| `battery` | `object \| null` | yes |  |
| `battery.percentage` | `number` | yes |  |
| `battery.charging` | `boolean \| null` | yes | True while the battery takes current (pad or cable) or a full bot rests on the pad. Null when the robot reports no battery current. |
| `battery.recorded_at` | `string (date-time)` | yes | When the robot measured it, in UTC. |
| `speed` | `object \| null` | yes | Null while the bot is offline. |
| `speed.mps` | `number` | yes | Meters per second, never negative. |
| `speed.recorded_at` | `string (date-time)` | yes | When the robot measured it, in UTC. |
| `door` | `object \| null` | yes |  |
| `door.status` | `'opened' \| 'closed' \| 'opening' \| 'closing' \| 'stalled'` | yes |  |
| `door.recorded_at` | `string (date-time)` | yes | When the robot measured it, in UTC. |

### BotControl

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `mode` | `'autonomous' \| 'teleop_requested' \| 'teleop'` | yes | `autonomous`: drives itself. `teleop_requested`: waiting for an operator. `teleop`: an operator is driving. |
| `since` | `number \| null` | yes | Epoch milliseconds when the mode started. Null when autonomous. |
