Quickstart
Get a key and make your first call in about five minutes — plus the four things that will give you a wrong number if nobody says them.
Connecting an assistant instead?
You do not need any of this. Connect an assistant is the page you want.
1. Get a key
Settings → API & MCP → Create key
Name it after whatever will use it — “Marketplace sync”, “Accounting export”. The name is what you will be looking at in six months when deciding whether it is still needed.
Copy it now
The key is shown once. It cannot be recovered afterwards, including by us — only a hash is stored. If you lose it, revoke it and make another.
Keys look like cf_live_sk_…. You choose at minting whether a key is read-only or read-write; read-write reaches reference data only — vehicles, add-ons, charge types, invoice settings — and only over MCP. Every REST endpoint below reads. Nothing you build against this API can take a payment, issue an invoice, change a booking or message a customer.
2. Make a call
Start with /v1/me. It confirms the key works and reads none of your data, which is what makes it the safe first call.
curl https://carfleet.ae/api/v1/me \
-H "Authorization: Bearer cf_live_sk_YOUR_KEY_HERE"{
"workspace": { "slug": "your-workspace", "status": "active" },
"role": "custom:api-readonly"
}Then something real:
curl https://carfleet.ae/api/v1/fleet/summary \
-H "Authorization: Bearer cf_live_sk_YOUR_KEY_HERE"Every endpoint, with its parameters and a runnable example, is in the API reference. It is generated from the same declarations the server runs on, so it cannot describe an API we do not serve.
3. Four things that will bite you
Money is in fils — always
Minor units, AED × 100. 45000 is AED 450.00. Divide before showing it to a human; never round in the middle of a calculation.
A draft invoice has no number, correctly
Numbers are allocated on issue and must be gapless under UAE tax rules, so a draft cannot hold one. A null number is not missing data — do not fill it in yourself.
A booking’s day count is not the rental length
It is the billed period of the original booking. An extended rental keeps its original count and gains an extension. Use the pick-up and drop-off dates to work out how long somebody actually had the car.
A receipt header is a container, not a payment
It holds the rows that allocate money to bookings and invoices. Adding a header to its own rows counts the same money twice — the single most expensive mistake available in this data model.
4. Conventions
| Thing | How it works |
|---|---|
| Authentication | Bearer token on every request. No sessions, no cookies. |
| Amounts | Integer minor units (fils), never a float. |
| Dates | ISO 8601. Timestamps are UTC; date-only fields are calendar dates. |
| Paging | limit and offset. Limits are clamped server-side — ask for more than the cap and you get the cap, not an error. |
| Errors | Conventional status codes with a JSON body carrying a code and a message meant for a human. |
| Writes | Any write requires an Idempotency-Key header, so a retry after a timeout cannot do the thing twice. |
Next
- API reference — every endpoint, runnable in the page.
- Webhooks — be told when something happens instead of polling for it.
- Connect an assistant — the same key, in Claude or ChatGPT.
Plain text, for an agent: /docs/quickstart.md.