Response Codes

These are the most common server responses you will encounter when using the Fleetio API.

Status CodeDescription
200 OKEverything went as expected! Used on index and show actions.
201 CreatedUsed on create actions. A 201 means that a record was created successfully. Check the location header for the url of the newly created object.
204 No ContentDenotes that an action was successful, but the API does not need to return any data. Used on update and delete actions.
401 UnauthorizedYour credentials syntax is not correct, or your credentials are invalid. If you are getting this error, please review the Getting Started guide.
403 ForbiddenYou are trying to access an endpoint for which the user associated with your API key does not have permissions to access. There will not be anything in the response body. If you are getting this error, please check that the endpoint is correct and check the permissions of the user and be sure they can actually do the action you are attempting. You can learn more in the Help Center article about User Roles & Permissions as well as the Full Permissions Reference.
422 Unprocessable EntityThis is returned if a record cannot be created or updated, usually due to validation errors. If you receive this response code check the response body for error messages.

This hash will have one key for each field with errors. Each field will have an array of human readable error messages, as shown below:

{ "errors": { "name": [ "can't be blank" ], "meter_unit": [ "can't be blank", "is not a valid value. Please specify one of the predefined values for this field." ] } }
429 Too Many RequestsThe Fleetio API returns HTTP 429 when too many requests are received in a short period of time. See the page on Rate Limiting for specific details and for tips on how to handle these scenarios.
500 Internal Server ErrorIdeally you should never see this, but if you do, you've probably found a bug. Yes it's true, we make bugs too. We have automated monitoring of these errors, and we try to fix them proactively, but if its a problem and its messing up your day, please tell us about it. It is also possible that our servers are down, so be sure to check out our System Status page for information about our servers and their current health.