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

# Order injection

> Inject orders into Fire via the API.

Your system can inject orders into Fire using the Orders API. Fire then manages the order lifecycle and sends status updates back via webhooks.

## Flow

```
Your system receives an order → Your system injects it into Fire → Fire confirms
```

## Injecting an order

```http theme={null}
POST /v1/orders
Authorization: Bearer <your_api_key>
Content-Type: application/json
```

```json theme={null}
{
  "channel_id": "channel_abc123",
  "external_order_id": "uber_order_9876",
  "customer": {
    "name": "Jane Doe",
    "phone": "+1555000111"
  },
  "items": [
    {
      "product_id": "prod_001",
      "quantity": 2,
      "unit_price": 1200,
      "modifiers": []
    }
  ],
  "delivery": {
    "type": "delivery",
    "address": "123 Main St"
  },
  "total": 2400
}
```

### Required fields

| Field               | Description                                                                                                                                                                                      |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `channel_id`        | The Fire sales channel ID (from publication webhooks such as [`channel.updated`](/en/webhook-reference/channel-updated) or [Aggregator integrations](/en/configuration/backoffice-integrations)) |
| `external_order_id` | Your own order ID — used to correlate status updates                                                                                                                                             |
| `items`             | Array of ordered products with quantities and prices                                                                                                                                             |

### Response

```json theme={null}
{
  "id": "fire_order_abc",
  "external_order_id": "uber_order_9876",
  "status": "received",
  "created_at": "2025-01-15T14:30:00Z"
}
```

Store the `id` returned by Fire to correlate future `order.status_changed` events.

## Error handling

| Status | Meaning                                              |
| ------ | ---------------------------------------------------- |
| `400`  | Invalid payload — check required fields              |
| `404`  | Unknown `channel_id` — re-fetch channels             |
| `409`  | Duplicate `external_order_id` — order already exists |
| `5xx`  | Fire-side error — retry with exponential backoff     |

<Warning>
  Do not send the same order twice with the same `external_order_id`. Fire will reject duplicates with a `409`.
</Warning>
