Vehicle - Additional Vehicle Data
The Admin interface handles web service calls from the Admin web gui. The base url for this is at:
/api/vehicle-admin
A JSON file with OpenAPI data about all vehicle-related admin APIs can be downloaded here
.
Get all additional vehicle data fields
Gets the list of all the additional data fields for every existing driver
- GET /v1/additional-vehicle-data/data-fields
Gets the list of necessary fields indicating the type of Box
- Status Codes
200 OK – Success
The API will respond with ERR in case of error, or with the following data structure:
{
[
{
"DriverID": "7dd66145-1560-4bbd-8e0c-a4adc24502d4", // Guid
"DriverName": "Box driver name", // String
"DocumentationURL": "https://manufacturer.com/doc", // String (nullable)
"Fields": { // Dictionary <string, string>
{key: "field-name", value: "field value" }
}
}, { ... }
]
}
Get additional vehicle data fields for a specific driver
Gets the list of all the additional data fields for a specified driver
- GET /v1/additional-vehicle-data/data-fields/{id}
Gets the list of necessary fields indicating the type of Box
- Parameters
id (string) – The guid of the driver
- Status Codes
200 OK – Success
The API will respond with ERR in case of error, or with the following data structure:
{
[
{
"FieldName": "field-name", // String
"FieldLabels": "{"en": "Field Name", ...}" // String
}, { ... }
]
}
where FieldLabels
is a string containing the localized values for the field’s name
Get additional vehicle data list
Gets the paged list of additional vehicle data for a specified vehicle
- GET /v1/additional-vehicle-data/{id}/list
Gets the paged list of AdditionalVehicleData for a vehicle
- Parameters
id (integer) – The id of the vehicle
- Query Parameters
driver (string) –
- Status Codes
200 OK – Success
It might also take an optional query parameter driver
which may contain a DriverID to filter the list.
The API will respond with ERR in case of error, or with the following data structure:
- {
- [
- {
“VehicleID”: 1, // ID “DriverID”: “7dd66145-1560-4bbd-8e0c-a4adc24502d4”, // Guid “DriverName”: “Box driver name”, // String “CreatedDate”: ‘2022-01-01T00:00:00Z”, // DateTime “LastUpdated”: ‘2022-01-01T00:00:00Z”, // DateTime “FieldName”: “field-name”, // String “Value”: “field value” // Value
}, { … }
]
}
Get additional vehicle data list for a specified driver
Retrieves the full list of additional vehicle data for a specified vehicle and driver
- GET /v1/additional-vehicle-data/{id}/vehicle-data/{driver}
Gets the full list of AdditionalVehicleData for a vehicle and a driver
- Parameters
id (integer) – The vehicle ID
driver (string) – The driver ID
- Status Codes
200 OK – Success
The API will respond with ERR in case of error, or with the following data structure:
{
[
{
"VehicleID": 1, // ID
"DriverID": "7dd66145-1560-4bbd-8e0c-a4adc24502d4", // Guid
"DriverName": "Box driver name", // String
"CreatedDate": '2022-01-01T00:00:00Z", // DateTime
"LastUpdated": '2022-01-01T00:00:00Z", // DateTime
"FieldName": "field-name", // String
"Value": "field value" // Value
}, { ... }
]
}
Set additional vehicle data for a vehicle
Updates the additional vehicle data for a specified vehicle and driver
- POST /v1/additional-vehicle-data
Persists edits about a new or existing AdditionalVehicleData
- Status Codes
200 OK – Success
The API accepts the following request body:
{
VehicleID: 1, // ID
DriverID: "7dd66145-1560-4bbd-8e0c-a4adc24502d4", // Guid
AdditionalData: { // Dictionary <string, string>
{key: "field-name", value: "field value" }
}
}
}
If the update is accepted, a specific action log will be recorded.
The API might respond with one of the following errors:
err_NoVehicleFound
There is no vehicle corresponding to the ID provided in the request body
err_MissingVehicleData
The specified driver needs some additional vehicle data, and one or more data is missing on the vehicle