Fleetr Help Centre
Fleetr customer guide
On this page

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.

  1. Open API access with an authorised account user.
  2. Create a token for the integration and choose an available role appropriate for its work.
  3. Copy the displayed token and store it securely in the receiving system. Its full value is shown only once.
  4. Send it in the request header: Authorization: Bearer YOUR_TOKEN.
  5. 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.

CapabilityExample endpointWhat an integration can do
Fleet vehiclesGET /vehiclesDiscover accessible vehicles and their identifiers
Vehicle detailsGET /vehicles/{vehicle}Read a selected vehicle's record
Vehicle creation and updatesPOST /vehicles, PUT /vehicles/{vehicle}Maintain vehicle records with editing permission
Latest locationGET /vehicles/{vehicle}/locationRetrieve the available position for a vehicle
Journeys and mileageGET /vehicles/{vehicle}/journeys, GET /vehicles/{vehicle}/mileageRead recorded activity
Device managementGET /vehicles/{vehicle}/devicesInspect attached trackers; documented write endpoints attach, edit, remove, and set primary
Device commandsGET /vehicles/{vehicle}/devices/{device}/commandsReview commands and use supported command actions with the required permissions
Sharing linksGET /vehicles/{vehicle}/share-linksList links; documented POST and DELETE operations create and revoke them
DriversGET /driversRead profiles; documented actions manage profiles and assignments
MaintenanceGET /vehicles/{vehicle}/maintenanceRead service records and use documented record, update, and completion actions
InsuranceGET /vehicles/{vehicle}/insuranceRead policies and use documented maintenance and AKI-verification actions
GeofencesGET /geofences, GET /geofences/alertsRead boundaries and recorded alerts
Fleet summariesGET /fleet/overview, GET /fleet/mileage, GET /fleet/events, GET /fleet/trendsRetrieve permitted fleet summaries and activity
NotificationsGET /notifications, GET /notifications/preferencesRead the inbox and manage supported preference actions
Reference dataGET /device-makes, GET /vehicle-types, GET /license-typesPopulate supported device and vehicle choices; authentication requirements vary
SupportGET /tickets, POST /ticketsRead 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

ResponseWhat to check
401Missing, expired, revoked, or otherwise invalid authentication
402Account subscription access; read the returned access level and billing action
403Role, account membership, feature eligibility, or selected account
404Resource ID, route, and whether the resource is available to this request
422Submitted field values and the validation errors in the response
429Request rate; back off before retrying
5xxTemporary 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.