Query vehicles

In order to see all vehicles in the vehicle database use the vehicleList query. To create fast front-ends, caching the vehicleList query response is allowed. The recommendation is to query the vehicleList at least once a day, to never to miss an update. See a live example of this query including all available output parameters here.

Query vehicle list

An example that renders a list of vehicles that can be searched and filtered.

Query vehicle list

Query

To query the vehicles in the database, call the vehicleList. Optionally configure the arguments to support filters, search, localization or pagination. The sections below describe each feature in more detail.

  • Filter
    • To filter the vehicle list use the filter argument. Filter on availability, drivetrain and connected vehicle provider. For example, use PHEV as a drivetrain filter to return all plug-in hybrids.

  • Search
    • To search in the vehicle list use the search argument to do a search over all naming fields. For example search on 'ID3' which will return all Volkswagen ID3 editions.

  • Localize
    • To apply localization to the vehicleList use the country argument. The naming, availability and specifications, if available to us, will be shown for the given country. As an example, for Portugal (PT) the naming of the Hyundai Kona would be Hyundai Kauai.

Arguments

filter VehicleListFilter

Filter vehicle result

country CountryCodeAlpha2

ISO-3166 alpha-2 country code to apply localization on vehicle data if available

Show CountryCodeAlpha2 enum values

size Int

Number of elements (count) to return, default: 10

page Int

Page number to return, default: 0

Frequently used fields

id ID

Vehicles unique ID

naming VehicleListNaming

Naming of the vehicle

connectors VehicleConnector

Connectors available for the vehicle

availability VehicleListAvailability

Availability of the vehicle

Other fields

drivetrain VehicleDrivetrain

Drivetrain of the vehicle

adapters VehicleConnector

Adapters available for the vehicle

battery VehicleListBattery

Battery of the vehicle

body VehicleListBody

Body of the vehicle

range VehicleListRange

Range of the vehicle

media VehicleListMedia

Media of the vehicle

routing VehicleListRouting

Routing of the vehicle

connect Connect

Information about vehicle connectivity

Response

A response can either contain a data or an errors object. The response header will always return 200 as a status code.

Data object

When successful, a data object will be returned with the requested fields. If there are no fields present the data object will return the operation name with the appropriate return type. If the operation was a query, this output will be an object of the schema’s query root type; if the operation was a mutation, this output will be an object of the schema’s mutation root type.

Error object

If unsuccessful, an errors object will be returned with more details in the extensions object. The error object can contain any of the following objects.