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
| Name | Type | Required | Description |
|---|---|---|---|
| page | Number | false | Page number, default: 1 |
| size | Number | false | Number of records, default: 500, max: 500 |
| vehicleStatus | String | false | Vehicle status |
Vehicle Statuses
| Name | Description |
|---|---|
| IDLE | Not in use |
| DRIVING | In operation |
Example Request
GET /hub/v1/vehicles?page=1&size=300&vehicleStatus=DRIVING
Authorization: Bearer apiKey
Response
Response Body
| Name | Type | Not-null | Description |
|---|---|---|---|
| items | Array | true | Array of response data |
| items[].identifier | String | true | Vehicle identifier |
| items[].identifierType | String | true | Vehicle identifier type |
| items[].vehicleStatus | String | true | Vehicle status |
| items[].mappedDevices | Array | true | Mapped device information |
| items[].mappedDevices[].serial | String | true | Device serial number |
| items[].mappedDevices[].position | String | true | Device mounting position (vehicle, cargo, etc) |
| pagination | Object | true | Pagination metadata |
| pagination.page | Number | true | Requested page number |
| pagination.totalPages | Number | true | Total page count |
| pagination.size | Number | true | Requested number of records |
| pagination.total | Number | true | Total record count |
Identifier Types
| Name | Description |
|---|---|
| CAR_LICENSE_NUMBER | License plate number |
MappedDevice Position Types
| Name | Description |
|---|---|
| VEHICLE | Vehicle device |
| CARGO | Cargo 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"
}