Fleetr API Integration Guide
Bring your fleet information into the systems your business already uses.
Last updated: .
Fleetr provides a REST API for developers who want to integrate tracking data into their own systems.
Documentation
Full API documentation is available at fleetr.co.ke/api/docs, powered by interactive Swagger UI. You can explore endpoints and test requests directly from the browser.
Account Integration Tokens
For a business system connecting to your fleet, open Account → Integrations → API access. Account API access is a plan-gated feature; the page shows whether it is included.
- Open API access with an authorised account user.
- Create a token for the integration and choose an available role appropriate for its work.
- Copy the displayed token and store it securely in the receiving system. Its full value is shown only once.
- Send it in the request header:
Authorization: Bearer YOUR_TOKEN. - Use the token controls to rotate credentials or revoke access when the integration is no longer needed.
These tokens belong to the account and use a role to determine access. They are separate from a person's normal browser session. Never put a real token in a public page, screenshot, or support message. Rotation invalidates the old token immediately; update the consuming system with the replacement.
For application login flows and endpoint-specific requirements, follow the interactive API documentation. A valid token does not bypass account permissions, plan restrictions, or subscription access checks.
Event Forwarding
Open Account → Integrations → Event forwarding to manage configured event destinations. Where your permissions and plan allow it, you can add or edit a destination, enable or disable forwarding, send a test, rotate its secret, or delete it.
Coordinate the destination configuration with the receiving system's administrator. Use a test to confirm that it accepts deliveries before depending on forwarding for an operational workflow. If you rotate a secret, update the receiver as well. Event forwarding connects systems; personal email, SMS, and push preferences are managed under notification settings.
What's Available
The API covers vehicles, devices, real-time locations, journeys, drivers, geofences, fleet statistics, maintenance, insurance, and more. Refer to the API Documentation for complete details.
Make Your First API Request
Use the production base URL https://fleetr.co.ke/api. Start with a read-only request to confirm authentication and account selection before implementing changes in an external system.
GET /api/vehicles HTTP/1.1
Host: fleetr.co.ke
Authorization: Bearer YOUR_ACCOUNT_API_TOKEN
Accept: application/json
X-Account-ID: YOUR_ACCOUNT_ID
Replace the placeholders with your integration token and account ID. X-Account-ID selects the account on endpoints that support account context; it does not grant access to an account the token cannot use. Without this header, those endpoints can use the user's first associated account, so set it explicitly in a multi-account integration.
Follow response pagination and the endpoint's documented filters. Do not assume that a single response contains an entire fleet or every historical record. Use JSON request bodies and Content-Type: application/json for endpoints expecting JSON writes.
Customer API Capability Map
Paths below are relative to /api. Each operation still requires its applicable role, subscription, and feature access.
| Capability | Example endpoint | What an integration can do |
|---|---|---|
| Fleet vehicles | GET /vehicles | Discover accessible vehicles and their identifiers |
| Vehicle details | GET /vehicles/{vehicle} | Read a selected vehicle's record |
| Vehicle creation and updates | POST /vehicles, PUT /vehicles/{vehicle} | Maintain vehicle records with editing permission |
| Latest location | GET /vehicles/{vehicle}/location | Retrieve the available position for a vehicle |
| Journeys and mileage | GET /vehicles/{vehicle}/journeys, GET /vehicles/{vehicle}/mileage | Read recorded activity |
| Device management | GET /vehicles/{vehicle}/devices | Inspect attached trackers; documented write endpoints attach, edit, remove, and set primary |
| Device commands | GET /vehicles/{vehicle}/devices/{device}/commands | Review commands and use supported command actions with the required permissions |
| Sharing links | GET /vehicles/{vehicle}/share-links | List links; documented POST and DELETE operations create and revoke them |
| Drivers | GET /drivers | Read profiles; documented actions manage profiles and assignments |
| Maintenance | GET /vehicles/{vehicle}/maintenance | Read service records and use documented record, update, and completion actions |
| Insurance | GET /vehicles/{vehicle}/insurance | Read policies and use documented maintenance and AKI-verification actions |
| Geofences | GET /geofences, GET /geofences/alerts | Read boundaries and recorded alerts |
| Fleet summaries | GET /fleet/overview, GET /fleet/mileage, GET /fleet/events, GET /fleet/trends | Retrieve permitted fleet summaries and activity |
| Notifications | GET /notifications, GET /notifications/preferences | Read the inbox and manage supported preference actions |
| Reference data | GET /device-makes, GET /vehicle-types, GET /license-types | Populate supported device and vehicle choices; authentication requirements vary |
| Support | GET /tickets, POST /tickets | Read accessible support tickets or submit an issue |
Use the interactive API reference and OpenAPI specification for exact fields, filters, response shapes, and endpoint-specific account behaviour. Not every browser workflow has a matching public write endpoint; for example, the listed geofence API routes provide reading and alerts, while the web application supplies its creation workflow.
Manage Integration Credentials
Give each integration a recognisable token name and choose Account Member for permitted viewing or Account Administrator when the integration genuinely needs its account-management capabilities. There is a maximum of 10 account API tokens; revoke an unused one before creating another if the limit is reached.
The full token is displayed once. If you lose it, rotate it and update the consuming system. Review last-used information when deciding whether a token is still needed. Revocation ends access for that credential; it does not delete the fleet records the integration previously read.
Handle API Errors
| Response | What to check |
|---|---|
| 401 | Missing, expired, revoked, or otherwise invalid authentication |
| 402 | Account subscription access; read the returned access level and billing action |
| 403 | Role, account membership, feature eligibility, or selected account |
| 404 | Resource ID, route, and whether the resource is available to this request |
| 422 | Submitted field values and the validation errors in the response |
| 429 | Request rate; back off before retrying |
| 5xx | Temporary service failure; record the time and request context and retry cautiously |
Do not blindly retry writes or vehicle commands: check whether the first request took effect before repeating it. Keep tokens out of logs and send support a redacted request, response status, and time if a problem persists.
Fleetr Help Centre