Skip to content

Authentication and scopes

Every request needs an API key. Create keys in Settings → Developers (you need the Developers → Manage permission). Create one key per integration, so you can revoke one without breaking the others.

Send it as a bearer token:

GET /v1/vehicles HTTP/1.1
Host: api.get-fleet.com
Authorization: Bearer flt_live_3fQ...

curl -u flt_live_3fQ...: (HTTP Basic, key as the username) and an X-Api-Key header also work.

A key can only do what its scopes allow. A :write scope includes the matching :read. A missing scope returns 403 insufficient_scope with the scope you need in required_scope.

You can only grant scopes whose permission your own role has, so a key never has more access than the person who created it. All keys in an organization also share a ceiling: the API integrations role in Settings → Users & Roles. An administrator can narrow that role to restrict every key at once (403 permission_denied).

ScopeAllows
branches:readRead branches.
vehicles:readRead vehicles.
vehicles:writeCreate and update vehicles.
users:readRead people in the organization (name, email, phone, branch).
contacts:readRead contacts.
contacts:writeCreate, update and delete contacts.
vendors:readRead vendors.
vendors:writeCreate, update and delete vendors.
assignments:readRead vehicle assignments.
assignments:writeCreate, update and delete vehicle assignments.
meter_entries:readRead odometer and hour-meter readings.
meter_entries:writeRecord and void meter readings.
fuel_logs:readRead fuel logs.
fuel_logs:writeCreate, update and delete fuel logs.
work_orders:readRead work orders and their line items.
work_orders:writeCreate and update work orders and add line items.
issues:readRead issues.
issues:writeCreate, update and delete issues.
inspections:readRead inspection templates and submitted inspections.
service_reminders:readRead service reminders.
parts:readRead parts, part locations, stock levels and inventory movements.
parts:writeCreate, update and delete parts.
purchase_orders:readRead purchase orders and their line items.
purchase_orders:writeCreate draft purchase orders and record their accounting status.
telematics:readRead vehicle positions.
telematics:writeSend vehicle positions (GPS) from your telematics system.
costs:readRead the cost ledger and cost summaries.
costs:writeAcknowledge cost entries exported to your ERP.
expenses:readRead vehicle expenses and expense types.
expenses:writeCreate, update and delete vehicle expenses and expense types.
renewals:readRead vehicle renewals (insurance, licences, inspections).
renewals:writeCreate, update and delete vehicle renewals.
fleet_requests:readRead fleet requests, their lines and financial status.
fleet_requests:writeRaise, edit, submit, approve and progress fleet requests.
financial_events:writeWrite ERP outcomes back to fleet requests: commitment, PO, bill, payment, rejection.
accounting:readRead accounting dimensions, ERP references and accounting settings.
accounting:writeManage dimensions and their values, ERP references, and period close.
webhooks:readRead webhook endpoints, deliveries and events.
webhooks:writeCreate, update and test webhook endpoints.

When you create a key you can restrict it to IP addresses or CIDR ranges (for example 203.0.113.10 or 10.0.0.0/8); calls from elsewhere fail with 403 ip_not_allowed. You can also give it an expiry date, after which calls fail with 401 api_key_expired.

Rolling issues a new key with the same name and access, and keeps the old one working for a grace period you choose (immediately, 1 hour, 24 hours or 7 days). Deploy the new key everywhere within the grace period. Roll keys periodically and whenever someone with access to them leaves.

Changes made through the API are attributed to the key, not to a person. The request log shows which key made each call, and where Fleet records a creator (work orders, meter entries) the API’s records are marked as created by the API. Fleet’s normal rules apply: the API cannot do anything that the organization’s permissions don’t allow.