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

# Errors & limits

> Error format, status codes, idempotency and rate limits.

```json theme={null}
{ "error": { "code": "prep_time_out_of_range", "message": "Preparation time must be between 5 and 120 minutes.", "details": { "min": 5, "max": 120 } } }
```

Use `code` in your program. `message` is for people and may change.

| Status | Meaning |
| - | - |
| `400` | The body is not valid JSON, or an integrator key sent no `X-XFaster-Store` (`store_header_required`) |
| `401` | Missing, wrong or revoked key, or a key of the other environment |
| `403` | Not allowed for this key (for example closing the store), or a store that is not linked to your integrator key (`store_not_linked`) |
| `404` | No such order or item for this store |
| `409` | The order's status doesn't allow it. `details.status` holds the current status. |
| `422` | A value is missing, has the wrong type or breaks a rule. `details.fields` lists them. |
| `429` | Too many requests. Wait `Retry-After` seconds. |
| `5xx` | Our side failed. Retry with the same `Idempotency-Key`. |

## Idempotency

Send `Idempotency-Key` (any unique string) on every `POST`, `PUT` and `PATCH`. A repeat within 24 hours returns the first answer (`Idempotent-Replayed: true`).

* The same key on a different call: `422 idempotency_key_reused`.
* A repeat while the first is still running: `409 idempotency_in_progress`.
* With an integrator key, a key also belongs to the store it was used for: the same key for another store is `422 idempotency_key_reused`.

## Rate limits

**60 requests per minute per key** (300 for an [integrator key](/basics/authentication#integrator-keys)). Every reply carries `X-RateLimit-Limit` and `X-RateLimit-Remaining`. Bulk updates go through the batch (100 changes per call) or [Import the menu](/restaurant/menu/import) (1000 lines per call).

## Versioning

The version is in the path (`/v1`). New fields, events and endpoints are not breaking, so ignore fields you don't know. Breaking changes come as `/v2`, with `/v1` kept for at least 6 months.


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