> ## 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.

# API reference

> Fire REST API reference — inject orders and query your integration configuration.

The Fire API allows your system to inject orders into Fire and manage related operations. All endpoints are REST, accept and return JSON, and require authentication via Bearer token.

<CardGroup cols={2}>
  <Card title="Inject order" icon="paper-plane" href="/en/api-reference/orders">
    Send an order from any aggregator or source into Fire for processing.
  </Card>
</CardGroup>

## Environments

| Environment    | Base URL                    |
| -------------- | --------------------------- |
| **Staging**    | `https://stg.api.fire.rest` |
| **Production** | `https://api.fire.rest`     |

Start your integration against **staging** — it mirrors production but is isolated from live data. The API playground in this reference defaults to staging. Switch to production only when you are ready to go live.

## Authentication

Every request requires a Bearer token obtained from the [Login](/en/api-reference/login) endpoint, plus three identification headers:

```http theme={null}
x-api-key: <your_api_key>
x-client-channel: integration
account: <your_account_id>
Authorization: Bearer <accessToken>
```

See [Authentication](/en/authentication) for full details on obtaining and refreshing tokens.

## Request and response format

* All request bodies must be JSON with `Content-Type: application/json`
* All responses are JSON
* Dates and timestamps use ISO 8601 format (`2024-11-15T14:30:00Z`)

## Errors

Fire uses standard HTTP status codes. All error responses include a JSON body with a machine-readable `code` and a human-readable `message`.

```json theme={null}
{
  "error": {
    "code": "validation_error",
    "message": "channel_id is required"
  }
}
```

| Status | Meaning                                                |
| ------ | ------------------------------------------------------ |
| `200`  | Success                                                |
| `400`  | Bad request — invalid or missing fields in the payload |
| `401`  | Unauthorized — missing or invalid API key              |
| `404`  | Resource not found                                     |
| `409`  | Conflict — duplicate `external_order_id`               |
| `429`  | Rate limit exceeded — back off and retry               |
| `5xx`  | Fire-side error — retry with exponential backoff       |

## Rate limits

Requests are rate-limited per API key. If you exceed the limit, Fire returns `429 Too Many Requests`. Implement exponential backoff starting at 1 second.
