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
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
400A 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.
404Vehicle group not found in this organization.
429Too many requests. Try again later.
500Internal server error.
