Skip to main content

Get Registered Vehicles with Mapped Devices

Retrieves the list of registered vehicles for your company.
If a vehicle is currently in operation, you can also retrieve the list of devices mapped to that vehicle.

The identifier is a unique value that identifies each vehicle.
Its meaning may vary depending on the identifierType.

Example: When identifierType is CAR_LICENSE_NUMBER, the identifier represents the vehicle's license plate number.

Request


GET https://openapi.willog.io/hub/v1/vehicles

Query Parameters

NameTypeRequiredDescription
pageNumberfalsePage number, default: 1
sizeNumberfalseNumber of records, default: 500, max: 500
vehicleStatusStringfalseVehicle status

Vehicle Statuses

NameDescription
IDLENot in use
DRIVINGIn operation

Example Request

GET /hub/v1/vehicles?page=1&size=300&vehicleStatus=DRIVING
Authorization: Bearer apiKey

Response


Response Body

NameTypeNot-nullDescription
itemsArraytrueArray of response data
items[].identifierStringtrueVehicle identifier
items[].identifierTypeStringtrueVehicle identifier type
items[].vehicleStatusStringtrueVehicle status
items[].mappedDevicesArraytrueMapped device information
items[].mappedDevices[].serialStringtrueDevice serial number
items[].mappedDevices[].positionStringtrueDevice mounting position (vehicle, cargo, etc)
paginationObjecttruePagination metadata
pagination.pageNumbertrueRequested page number
pagination.totalPagesNumbertrueTotal page count
pagination.sizeNumbertrueRequested number of records
pagination.totalNumbertrueTotal record count

Identifier Types

NameDescription
CAR_LICENSE_NUMBERLicense plate number

MappedDevice Position Types

NameDescription
VEHICLEVehicle device
CARGOCargo bay device

Example Response

HTTP/1.1 200 OK

{
"items": [
{
"identifier": "vehicle-001",
"identifierType": "CAR_LICENSE_NUMBER",
"vehicleStatus": "DRIVING",
"mappedDevices": [
{
"serial": "device-serial-1",
"position": "VEHICLE"
}
]
},
{
"identifier": "vehicle-002",
"identifierType": "CAR_LICENSE_NUMBER",
"vehicleStatus": "IDLE",
"mappedDevices": []
}
],
"pagination": {
"page": 1,
"size": 10,
"total": 2,
"totalPages": 1
}
}

Error Responses

- Invalid Token or API Key

HTTP/1.1 400 Bad Request

{
"code": "A0010"
}

- Invalid Request Parameters

HTTP/1.1 400 Bad Request

{
"code": "E0021"
}