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

# API reference

> Every Fleet API endpoint, generated from the OpenAPI document.

This reference is generated from the Fleet API's OpenAPI 3.1 document, which is produced from the same schemas that validate requests. You can also fetch it yourself without an API key:

```bash theme={null}
curl https://partners.chargeexpressltd.com/api/public/v1/openapi.json
```

## Base URL

| Environment | Base URL | Keys |
| - | - | - |
| Production | `https://partners.chargeexpressltd.com/api/public/v1` | Live keys (`cxk_live_…`) |
| Stage | `https://stage.partners.chargeexpressltd.com/api/public/v1` | Sandbox keys (`cxk_test_…`) |

Each URL takes only its own kind of key; a key sent to the other is rejected with `wrong_environment`. The key decides whether a request acts on your [sandbox](/guides/sandbox) or your real fleet. See [Authentication](/authentication).

## Authentication

Send `Authorization: Bearer <your API key>` on every request. Each endpoint page lists the scope it needs; a key without it gets `403 missing_scope`.

| Area | Read | Write |
| - | - | - |
| Fleet | `fleet:read` | `wallet:write` (`PATCH /fleet`, low-balance alert) |
| Drivers | `fleet:read` | `drivers:write` |
| Vehicles | `fleet:read` | `vehicles:write` |
| Limits | `fleet:read` | `limits:write` |
| Charge points and sessions | `fleet:read` | Read only |
| Wallet, fundings and invoices | `fleet:read` | `wallet:write` |
| Webhook endpoints and events | `fleet:read` | `webhooks:write` |

## Requests and responses

* Send JSON bodies with `Content-Type: application/json`. Bodies are limited to 1 MB. Send only documented fields: most endpoints reject unknown fields with `parameter_invalid`, and the rest ignore them.
* Photo and image uploads (`POST /drivers/{driverId}/photo`, `POST /vehicles/{vehicleId}/image`) are `multipart/form-data`, with a single image of up to 5 MB in the `photo` or `image` field.
* Money and kWh values in responses are decimal strings. See [conventions](/#conventions-at-a-glance).
* Lists are [paginated](/pagination). Errors use the [error object](/errors). `POST`s accept an [`Idempotency-Key`](/idempotency), and two require it.
* Every response carries `X-Request-Id`, and [rate-limit](/rate-limits) headers.

## Limits

Limits cap how much energy (`metric: "kwh"`) or money (`metric: "ghs"`) a driver can use per `session`, `day`, `week` or `month`. Days, weeks (starting Monday) and months are calendar periods in UTC (Ghana time).

* `PUT /limits` replaces the fleet's default limits, which apply to every driver.
* `PUT /drivers/{driverId}/limits` replaces one driver's overrides. An override with `amount: null` exempts the driver from that fleet default.
* `GET /drivers/{driverId}/limits` returns the driver's `overrides` and the effective `limits`, with `source` (`fleet` or `driver`) on each.

A set holds at most 8 limits, at most one per metric and period. When a limit caps or blocks a session start you get a [`limit.reached`](/webhooks/events#limit-reached) event.


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