> For the complete documentation index, see [llms.txt](https://routelift.gitbook.io/routelift-api-integration/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://routelift.gitbook.io/routelift-api-integration/getting-started/errors.md).

# Errors

Sometimes, requests fail. Here's how to handle them effectively.

RouteLift uses standard HTTP status codes in all API responses:

* **2xx** → Success
* **4xx** → Problem with your request
* **5xx** → Something went wrong on our side

***

#### API Error Codes

| Status Code     | Type              | Meaning                                                         |
| --------------- | ----------------- | --------------------------------------------------------------- |
| 200             | OK                | The request was successful.                                     |
| 400             | Bad Request       | Your request was missing required fields or had invalid values. |
| 401             | Unauthorized      | The API key is missing or invalid.                              |
| 402             | Request Failed    | Valid request, but the operation failed.                        |
| 403             | Forbidden         | The API key doesn’t have permission for this request.           |
| 404             | Not Found         | The requested delivery or resource does not exist.              |
| 429             | Too Many Requests | You’ve hit the rate limit. Wait before sending more requests.   |
| 500/502/503/504 | Server Errors     | Something went wrong on our end. Retry later.                   |

***

#### Error Responses

RouteLift’s API returns structured JSON responses for both success and error states.

**Sample: Error Response**

```json
{
  "success": false,
  "message": "Missing required field: receiverAddress",
  "path": "/v1/deliveries/create"
}
```

**Sample: Success Response**

```json
{
  "success": true,
  "message": "Delivery created successfully",
  "data": {
    "order_id": "RL-123456",
    "trackingCode": "TRACK-XYZ123",
    "price": 2500
  }
}
```

***

If you have issues with integration or need support, reach out to our team. We're here to help.
