Vehicle - Groups
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 Vehicle Group
Gets details about a specific vehicle group:
- GET /v1/vehicle-groups/{guid}
Gets details about a specific vehicle group
- Parameters
guid (string) – The guid of the group
- Status Codes
200 OK – Success
- DELETE /v1/vehicle-groups/{guid}
Marks a vehicle group as deleted
- Parameters
guid (string) – The guid of the group
- Status Codes
200 OK – Success
Returns a Json positive response and the details of the specified vehicle group:
{
Name: "London", // String
Description: "Description...", // String (nullable)
Guid: "e0828997-d3ce-40e2-adcd-e3248ea536e0", // Guid
Originator: "32b297a5-8180-420f-9482-84bfc7f55efe", // Guid
Communities: // List of guid of communities to which the group is linked to, if any
[
"bca0db4d-4442-4fb0-b0a7-05e74d2398bb", // Guid
"a79a50d4-61cd-4aca-84ef-b553aef9f28d", // Guid
...
]
}
Get Vehicle Groups
Gets the list of all vehicle groups:
Returns a list of all groups:
[
{
"CreatedDate": "2020-09-09T12:14:29Z", // DateTime
"LastUpdated": "2020-09-09T12:14:29Z", // DateTime
"Name": "London", // String
"Description": null, // String (nullable)
"Guid": "cd5619ac-b5bf-4ed7-95e4-e7c02029d6cd", // Guid
"VehicleCount": 0, // Int
"ID": 1 // Int
},
...
]
Get Vehicle Group list
Gets the list of all vehicle groups (it’s a Paged List APIs, as explained in the introduction):
Returns a paginated list of all vehicle groups:
[
{
"CreatedDate": "2020-09-09T12:14:29Z", // DateTime
"LastUpdated": "2020-09-09T12:14:29Z", // DateTime
"Name": "London", // String
"Description": null, // String (nunllable)
"Guid": "cd5619ac-b5bf-4ed7-95e4-e7c02029d6cd", // Guid
"VehicleCount": 0, // Int
"ID": 1 // Int
},
...
]
Add new or edit existing vehicle group
Persists edits about a new or existing vehicle group:
- POST /v1/vehicle-groups
Persists edits about a new or existing vehicle group
- Status Codes
200 OK – Success
The body of the request is:
{
Guid: "53155c4a-b2a0-412f-ab41-552d9ccdf784", // Guid
Name: "London Vehicle Group", // String
Description: "Description of the group", // Derscription (nullable)
Communities: ["4868c8c1-b10b-45b0-95d8-5cee54d6dc76", ...] // Guid Array
}
If the Guid
(vehicle group guid) of an existing record is not provided, then the request will create a new record.
The field Communities
containes a list of community guids to the group to be linked to, and is mandatory while creating a new group if the user has administrative rights limited to one or more community.
Possible error messages are:
err_InvalidElement
No group was found for the provided
Guid
, no name was provided or no community was provided and the operator is not a SuperAdminerr_NotAdministrable
The user is trying to link the new group to communities on which he has no administrative right.
Delete vehicle group
Marks a vehicle group as deleted:
- GET /v1/vehicle-groups/{guid}
Gets details about a specific vehicle group
- Parameters
guid (string) – The guid of the group
- Status Codes
200 OK – Success
- DELETE /v1/vehicle-groups/{guid}
Marks a vehicle group as deleted
- Parameters
guid (string) – The guid of the group
- Status Codes
200 OK – Success
If the request is successful, the corresponding record will be marked as deleted and a plain Json positive response will be returned.
Possible error messages are:
err_ElementDoesNotExist
There is no vehicle group corresponding to the
ID
provided in the requesterr_ElementAlreadyDeleted
The specified vehicle group as already been marked as deleted
err_GroupHasVehicles
The vehicle group has vehicles currently assigned to it
Get Group vehicles
Gets the list of vehicles belonging to a specified group (it’s a Paged List APIs, as explained in the introduction):
- GET /v1/vehicle-groups/{guid}/vehicles/list
Gets the list of vehicles belonging to a specified group
- Parameters
guid (string) – The guid of the group
- Status Codes
200 OK – Success
Returns a paged list of all vehicles assigned to the specified vehicle group:
[
{
"ID": 26, // Int
"LicensePlate": "AA000AA", // String
"VIN": "01234567890", // String
"Sticker": "10", // String
"LastSetOperativeBy": "Administrator", // String (nullable)
"IsOperative": true, // Boolean
"AdminOperativeStatus": true, // Boolean
"SystemOperativeStatus": true, // Boolean
"SystemOperativeReason": "", // String (nullable)
"OverriddenSystemOperativeStatus": true, // Boolean
"ForcedOperativeBy": "Administrator.name", // String (nullable)
"Notes": null, // String (nullable)
"CategoryLabels": "{\"en\":\"Jolly Smart\"}", // String
"CategoryID": 2, // Int
"Devices": // Device Array (nullable)
[
{
"ID": 13, // Int
"SerialNumber": "EDOXVERZKOSYXUJ", // String
"LastDeviceSync": "2001-01-01T00:00:00Z" // DateTime (nullable)
}
],
"NominalGarage": "Udine Garage", // String
"NominalGarageID": 4, // Int
"RecoveringGarage": null, // String (nullable)
"RecoveringGarageID": null, // Int (nullable)
"Latitude": 46.0838284476514, // Double (nullable)
"Longitude": 13.217754364013674, // Double (nullable)
"LastPositionUpdate": "2020-09-10T08:31:16Z", // DateTime (nullable)
"CurrentTripGuid": null, // Guid (nullable)
"DeviceID": 13, // Int (nullable)
"LastDeviceSync": null, // DateTime (nullable)
"LastNetworkSignalStrengthPct": null, // Int (nullable)
"EngineType": 0, // Int
"FuelTankCapacity": null, // Int (nullable)
"FuelLevelPct": null, // Double (nullable)
"EVBLevelPct": null, // Double (nullable)
"OdometerKm": null, // Double (nullable)
"LastOdometerReading": null, // DateTime (nullable)
"IsDamaged": true, // Boolean (nullable)
"Status": {
"CurrentReservationEnd": "2020-09-10T09:20:00Z", // DateTime (nullable)
"CurrentReservationMaxStart": "2020-09-10T08:50:00Z", // DateTime (nullable)
"CurrentReservationMinStart": "2020-09-10T08:28:41Z", // DateTime (nullable)
"LastDeviceSync": null, // DateTime (nullable)
"LastMaintenanceEnd": null, // DateTime (nullable)
"LastMaintenanceStart": null, // DateTime (nullable)
"LastMotion": null, // DateTime (nullable)
"LastPositionUpdate": "2020-09-10T08:31:16Z", // DateTime (nullable)
"LastTripEnd": "2020-09-10T08:34:33Z", // DateTime (nullable)
"LastTripStart": "2020-09-10T08:31:16Z", // DateTime (nullable)
"FuelLevelPct": null, // Double (nullable)
"ServiceBattery": null, // Double (nullable)
"LastNetworkSignalStrengthPct": null, // Int (nullable)
"AdminOperativeStatus": true, // Boolean
"SystemOperativeStatus": true, // Boolean
"IsLowFuel": true, // Boolean
"IsLowEVB": true, // Boolean
"IsLostContact": true, // Boolean
"IsPositionLost": false, // Boolean
"IsReserved": true, // Boolean
"IsOnTrip": false, // Boolean
"IsOnTripAndMoving": false, // Boolean
"IsWithoutTripsForLong": false, // Boolean
"IsInMaintenance": false, // Boolean
"IsInternetWeak": true // Boolean
},
"InternalCleaningStatus": null, // Int (nullable)
"ExternalCleaningStatus": null, // Int (nullable)
"IgnitionVoltageLevel": null // Int (nullable)
},
...
]
Values of InternalCleaningStatus
and ExternalCleaningStatus
can be one of the VehicleCleaningStatus enumeration.
Values of EngineType
can be one of the VehicleEngineTypes enumeration.
Get Group movement rules
Gets the list of movement rules applied to the vehicles in a specific group (it’s a Paged List APIs, as explained in the introduction):
- GET /v1/vehicle-groups/{guid}/movement-rules/list
Gets the list of movement rules applied to the vehicles in a specific group
- Parameters
guid (string) – The guid of the group
- Status Codes
200 OK – Success
Returns a list of all the movement rules applied to the specified vehicle group:
[
{
"ID": 6, // Int
"Group": // Group
{
"Name": "Udine", // String
"Description": "Udine Group", // String (nullable)
"Guid": "51c770b3-c4f6-4203-9067-e05666137cec", // Guid
"Originator": "32b297a5-8180-420f-9482-84bfc7f55efe" // Guid
},
"Zones": [ 11, ... ], // Int Array
"ZoneNames": "Udine, ...", // String
"Type": 0, // Int
"DayOfWeekStart": null, // Int (nullable)
"DayOfWeekEnd": null, // Int (nullable)
"MinuteOfDayStart": null, // Int (nullable)
"MinuteOfDayEnd": null, // Int (nullable)
"DayOfMonthStart": null, // Int (nullable)
"DayOfMonthEnd": null, // Int (nullable)
"DayStart": null, // Int (nullable)
"DayEnd": null // Int (nullable)
},
...
]
The property Type
can assume the value of 0 (Allow) or 1 (Deny) of the RuleType enumeration.
The properties Zones
and ZoneNames
are the list of IDs of the involved zones and a string comprised of their
names divided by a comma, respectively.
If the guid is not found, a plain Json negative response will be returned.
Get Group availability rules
Gets the list of availability applied to the vehicles in a specific group (it’s a Paged List APIs, as explained in the introduction):
- GET /v1/vehicle-groups/{guid}/availability-rules/list
Gets the list of availability applied to the vehicles in a specific group
- Parameters
guid (string) – The guid of the group
- Status Codes
200 OK – Success
Returns a list of all the availability rules applied to the specified vehicle group:
[
{
"ID": 6, // Int
"Group": // Group
{
"Name": "Udine", // String
"Description": "Udine Group", // String (nullable)
"Guid": "51c770b3-c4f6-4203-9067-e05666137cec", // Guid
"Originator": "32b297a5-8180-420f-9482-84bfc7f55efe" // Guid
},
"Type": 0, // Int
"DayOfWeekStart": null, // Int (nullable)
"DayOfWeekEnd": null, // Int (nullable)
"MinuteOfDayStart": null, // Int (nullable)
"MinuteOfDayEnd": null, // Int (nullable)
"DayOfMonthStart": null, // Int (nullable)
"DayOfMonthEnd": null, // Int (nullable)
"DayStart": null, // Int (nullable)
"DayEnd": null // Int (nullable)
},
...
]
The property Type
can assume only the value 1 (Vehicle Availability) of the RuleType enumeration.