Requests and responses
Base URL and format
Section titled “Base URL and format”All endpoints live under https://api.get-fleet.com/v1. Send and receive JSON (Content-Type: application/json).
Paths use lowercase with underscores: /v1/fuel_logs, /v1/work_orders/{id}/line_items.
Every response carries a Fleet-Request-Id header (req_…). Include it when you contact support; it is also
searchable in the request log.
Send a User-Agent that names your integration, such as User-Agent: acme-odoo-sync/1.4. Requests with the
default agent of Python’s urllib or Perl’s libwww are refused at the network edge with a 403 (error 1010)
before they reach Fleet. Python’s requests, Node, Java, Go, .NET and Postman are not affected.
Objects
Section titled “Objects”Every object has an id (a UUID) and an object field naming its type, so you can tell objects apart in mixed
lists:
{ "id": "6f1c2b0e-8a43-4c1e-9d55-0c2b7f3e9a10", "object": "fuel_log", ... }| Kind of value | Format | Example |
|---|---|---|
| Timestamps | ISO 8601, UTC | "2026-11-01T08:30:00.000Z" |
| Calendar dates | YYYY-MM-DD |
"2026-11-01" |
| Money and quantities | Decimal strings, so no precision is lost | "8881.80" |
| Currencies | ISO 4217 | "KES" |
| Missing values | null (keys are always present) |
"vin": null |
When you send decimals you can use a JSON number or a string: 45.2 and "45.20" are both accepted.
Filtering, searching and sorting
Section titled “Filtering, searching and sorting”List endpoints take filters as query parameters. Each endpoint’s filters are in the API reference. Common ones:
| Parameter | Meaning |
|---|---|
q |
Free-text search over the main text fields (number, name, plate…). |
created_after, created_before |
Creation time range. |
updated_since |
Objects changed at or after a time. The basis of incremental sync. |
vehicle_id, status, … |
Exact matches. |
sort |
A sort field, - prefix for descending, e.g. sort=-date. |
curl "https://api.get-fleet.com/v1/work_orders?status=open&priority=urgent&sort=-issued_at" \ -H "Authorization: Bearer $FLEET_API_KEY"Expanding related objects
Section titled “Expanding related objects”Objects refer to each other by id (vehicle_id, driver_id). Add expand to include a summary of the related
object in the same response:
curl "https://api.get-fleet.com/v1/fuel_logs?expand=vehicle,driver" -H "Authorization: Bearer $FLEET_API_KEY"{ "id": "…", "object": "fuel_log", "vehicle_id": "6f1c…", "vehicle": { "id": "6f1c…", "object": "vehicle", "vehicle_number": "KDA-001", "license_plate": "KDA 123A", "name": null, "make": "Toyota", "model": "Hilux" }, "driver": { "id": "…", "object": "user", "full_name": "Wanjiku Kamau", "email": "wanjiku@example.co.ke" }}Each endpoint lists what it can expand. GET /v1/inspections/{id}?expand=responses returns every answer on an
inspection.
Using your own ids
Section titled “Using your own ids”Your ERP or source system has its own ids for vehicles, vendors, fuel transactions and bills. Give them to Fleet once and use them everywhere, so you never have to store Fleet’s ids.
On create, send external_system and external_id. Sending the same pair again returns the record Fleet
already has (200 with Idempotent-Replayed: true) instead of creating a duplicate, so re-running an import is
always safe:
POST /v1/fuel_logs{ "vehicle_id": "6f1c…", "date": "2026-11-01", "quantity": 45.2, "unit_price": "196.50", "external_system": "rubis_card", "external_id": "TXN-88231" }In paths, write system:id wherever a Fleet id goes, on every resource that has external_ids:
curl https://api.get-fleet.com/v1/vehicles/odoo:77 -H "Authorization: Bearer $FLEET_API_KEY"const vehicle = await (await fetch('https://api.get-fleet.com/v1/vehicles/odoo:77', { headers: { Authorization: `Bearer ${process.env.FLEET_API_KEY}` },})).json()vehicle = requests.get("https://api.get-fleet.com/v1/vehicles/odoo:77", headers=HEADERS).json()In lists, filter with external_id=odoo:77. Every such object carries its ids in external_ids
({"odoo": "77"}). To link records that already exist, use PUT /v1/external_references (see
Costs and your ERP). URL-encode ids that contain /, such as BILL%2F2026%2F0042.
Receipts, invoices and photos attach to fuel logs, expenses, work orders, vehicle renewals and vehicles. Upload
with multipart/form-data and a file field (up to 10 MB; PDF, JPEG, PNG, WebP, HEIC, GIF, CSV, Excel or Word).
The file shows on the record in Fleet straight away, and behind its cost in the
cost ledger.
curl https://api.get-fleet.com/v1/fuel_logs/$FUEL_LOG_ID/attachments \ -H "Authorization: Bearer $FLEET_API_KEY" \ -H "Idempotency-Key: receipt-TXN-88231" \ -F file=@receipt.pdf \ -F description="Pump receipt"const form = new FormData()form.append('file', new Blob([await fs.readFile('receipt.pdf')], { type: 'application/pdf' }), 'receipt.pdf')form.append('description', 'Pump receipt')const attachment = await (await fetch(`https://api.get-fleet.com/v1/fuel_logs/${fuelLogId}/attachments`, { method: 'POST', headers: { Authorization: `Bearer ${process.env.FLEET_API_KEY}`, 'Idempotency-Key': 'receipt-TXN-88231' }, body: form, // fetch sets the multipart Content-Type with its boundary})).json()with open("receipt.pdf", "rb") as f: attachment = requests.post( f"https://api.get-fleet.com/v1/fuel_logs/{fuel_log_id}/attachments", headers={**HEADERS, "Idempotency-Key": "receipt-TXN-88231"}, files={"file": ("receipt.pdf", f, "application/pdf")}, data={"description": "Pump receipt"}, ).json()GET …/attachments lists them with signed download links valid for 15 minutes; DELETE …/attachments/{id} removes
one. A retried upload with the same Idempotency-Key is stored once.
Creating
Section titled “Creating”POST to the collection. Unknown fields are rejected (400 validation_failed), which catches typos early. A
successful create returns 201 Created, the object, and a Location header.
Resources that integrations create in bulk (vehicles, contacts, vendors, fuel logs, meter entries) also have a
POST …/batch endpoint that takes up to 100 objects as { "data": [ … ] }.
Updating
Section titled “Updating”PATCH changes only the fields you send. Send null to clear an optional field.
curl -X PATCH https://api.get-fleet.com/v1/work_orders/$ID \ -H "Authorization: Bearer $FLEET_API_KEY" -H "Content-Type: application/json" \ -d '{"status": "completed", "actual_end": "2026-11-01T15:30:00Z"}'Avoiding lost updates
Section titled “Avoiding lost updates”Every single-object response has an ETag header. Send it back as If-Match and the update only applies if the
object has not changed since you read it; otherwise you get 412 precondition_failed. Use this when people may
edit the same object in Fleet while your integration does.
Deleting
Section titled “Deleting”Where deletion is allowed, DELETE returns { "id": "…", "object": "contact", "deleted": true }. Vehicles and
work orders are not deleted through the API: set status to disposed or cancelled instead, which keeps their
history.