List vehicles

Returns a page of the vehicles of the application's organization: saved vehicles and unsaved ones.

Input. Every filter is optional and filters combine with AND. saved selects saved (true) or unsaved (false) vehicles; omit it for both. search matches part of the license plate, the owner or the make, ignoring case. licensePlate matches part of the license plate, ignoring case, spaces, tabs, line breaks and dashes, and needs at least 2 characters other than spaces, tabs, line breaks and dashes. makes and colors are comma-separated lists of values from List vehicle makes and List vehicle colors. groupId keeps the saved vehicles of one vehicle group. sortBy is createdAt, updatedAt, licensePlate or lastSeen (default lastSeen) and sortOrder is asc or desc (default desc). page starts at 1, unlike the zero-based page of the search and report routes, and pageSize is 1 to 100, default 25.

Response. 200 with { items, page, pageSize, total }. total counts every vehicle that matches the filters. An empty items with total: 0 means nothing matched. Vehicles without a value for the sort field come last in both orders, and vehicles with the same value are ordered by vehicleId.

Notes. An unsaved vehicle is a license plate that cameras of the organization read with high confidence in the last 7 days and that is not saved; it has no owner, no group and no audit fields. A groupId filter never returns unsaved vehicles. Private vehicles that are not shared with the access token are left out, and total does not count them. Time fields are Unix epoch milliseconds, UTC.

Request examples

GET /v3/vehicle-api/vehicles
GET /v3/vehicle-api/vehicles?saved=true&makes=Toyota,Honda&colors=WHITE,BLACK&sortBy=updatedAt&sortOrder=desc&page=2&pageSize=50
GET /v3/vehicle-api/vehicles?licensePlate=AB12&groupId=6512bd43d9caa6e02c990b0a

Required scope: read:vehicles

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
boolean

true returns only saved vehicles, false only unsaved ones. Omit it for both.

Part of the license plate, the owner or the make, ignoring case.

string
length ≤ 20

Part of the license plate, ignoring case, spaces, tabs, line breaks and dashes. At least 2 characters other than spaces, tabs, line breaks and dashes.

string

Comma-separated makes, exactly as List vehicle makes returns them. A vehicle matches any of them.

string

Comma-separated colors, as List vehicle colors returns them. A vehicle matches any of them.

string

The 24-character id of a vehicle group. Only the saved vehicles in the group are returned.

string
enum
Defaults to lastSeen

The field the page is sorted by. Defaults to lastSeen.

Allowed:
string
enum
Defaults to desc

The sort direction. Defaults to desc.

Allowed:
number
≥ 1
Defaults to 1

The page number, starting at 1. Defaults to 1.

number
1 to 100
Defaults to 25

The number of vehicles per page, 1 to 100. Defaults to 25.

Responses

400

A filter is invalid: page below 1, pageSize outside 1 to 100, an unknown sortBy, sortOrder, make or color, more than 50 makes or colors, a groupId that is not a 24-character id, a licensePlate with fewer than 2 characters other than spaces, tabs, line breaks and dashes, or a saved that is not true or false.

404

Vehicle group not found in this organization.

429

Too many requests. Try again later.

500

Internal server error.

Language
Credentials
OAuth2
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
*/*