Skip to main content

Filtering and Sorting Usage Examples

You can apply filters to any of our index endpoints.

Get all Fuel Entries since January 1, 2016:

https://secure.fleetio.com/api/v1/fuel_entries?q[created_at_gteq]=2016-01-01

Get all Submitted Inspection Forms from January 1, 2016:

https://secure.fleetio.com/api/v1/submitted_inspection_forms?q[submitted_at_gteq]=2016-01-01&q[submitted_at_lt]=2016-01-02

Get all Meter Entries where the void flag is set to true:

https://secure.fleetio.com/api/v1/meter_entries?q[void_true]=1

Get all Work Orders with status names containing the word 'priority':

https://secure.fleetio.com/api/v2/work_orders?q[work_order_status_name_cont]=priority

Get all blue Vehicles with a fuel type of Diesel, sorted by year descending:

https://secure.fleetio.com/api/v1/vehicles?q[color_eq]=blue&q[fuel_type_name_matches]=diesel&q[s]=year+desc

Want to know if the number of Freds you have working in your company is too high?

https://secure.fleetio.com/api/v1/contacts?q[first_name_eq]=Fred

The possibilities are endless!*

*Possibilities actually finite