Welcome to the Fleetio API docs. Our REST API allows programmatic access to Fleetio resources (e.g. vehicles, meter entries and fuel entries) so developers can build integrations with 3rd-party and/or internal software systems. Each API resource has available actions that can be performed on it. Supported resources and their endpoints are listed on the left.
The first thing you'll need to do is set up Authentication. This is handled using API keys. Each API key is associated with a Fleetio user. Results returned from various responses are based upon the role of the user to which the API key is tied.
Step 1: Generating an API Key
Each user account can have multiple API keys. Here's to generate one.
Log in to Fleetio and navigate to your Account Menu, then User Settings:
Click Manage API Keys:
Next, click the + New API Key button:
Then add a label for your API key. A label is simply a way of allowing you to organize your keys. An API key may be revoked, making it unusable and non-recoverable.
API Key Security
API keys are secret. We strongly recommend against pasting it online or committing it to a repository. Treat it as you would your password.
Step 2: Set API Key HTTP Header
Each request to our API requires a valid API key to be passed as an HTTP header. There is no need to issue any login commands or to maintain a session. The API key must be passed as a basic
Authorization token header, with a
Authorization: Token YOUR_API_KEY
To include the word
Tokenbefore your API Key in the
Step 3: Set Account Token HTTP Header
Each request to the Fleetio API requires the presence of an Account token HTTP header. This token must be a valid token belonging to one of your user's accounts, and it must be passed using the
You can find your Account-Token in the URL when you log into Fleetio:
Step 4: Make your first API request using the API docs
You can test API calls in these online docs using the Try It Out forms. Simply navigate to an API endpoint you wish to test (for example, the Parts Index), and enter your Authorization and Account-Token. Be sure to put the word Token in front of the Authorization value.
Step 5: Make API requests using your app
Now you're ready to make requests to the Fleetio API using your programming tool of choice. Here's an example using cURL:
curl \ --header "Authorization: Token YOUR_API_KEY" \ --header "Account-Token: YOUR_ACCOUNT_TOKEN" \ "https://secure.fleetio.com/api/v1/vehicles"