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

# Errors

> Error codes and how to handle them.

# Errors

The Bodha API uses conventional HTTP status codes. Every error response includes
a machine-readable `error` code and a human-readable `message`.

```json theme={null}
{
  "error": "not_found",
  "message": "Route not found."
}
```

## HTTP status codes

| Code | Meaning |
| - | - |
| `200` | Success |
| `201` | Created |
| `400` | Bad request — check your parameters |
| `401` | Unauthorized — missing or invalid API key |
| `403` | Forbidden — key lacks the required scope, or IP not in allowlist |
| `404` | Not found |
| `409` | Conflict — e.g. duplicate `externalOrderId` |
| `429` | Rate limited — slow down and retry |
| `500` | Internal server error — contact support if persistent |

## Common error codes

| Error code | Description |
| - | - |
| `unauthorized` | No API key provided or key is invalid |
| `invalid_api_key` | API key is invalid, revoked, or expired |
| `insufficient_scope` | Key doesn't have the required scope |
| `ip_not_allowed` | Request IP not in the key's allowlist |
| `rate_limit_exceeded` | Too many requests |
| `not_found` | Resource doesn't exist |
| `validation_error` | Request body is missing required fields |
| `no_updates` | PATCH request with no valid fields to update |
| `duplicate` | Resource already exists (e.g. duplicate order) |
| `internal_error` | Something went wrong on our end |


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