Vehicle - Movement Authorities
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 movement authorities of vehicle
Gets the list of movement authorities for a specific vehicle (it’s a Paged List APIs, as explained in the introduction):
- GET /v1/movement-authorities/list-by-vehicle/{id}
Gets the list of movement authorities still to be executed for a specific vehicle
- Parameters
id (integer) – The id of the vehicle
- Status Codes
200 OK – Success
Returns the list of all the movement authorities currently active on the specified vehicle:
[
{
"CreatedDate": "2020-09-11T14:26:25Z", // DateTime
"StartTime": "2020-09-11T14:30:00Z", // DateTime
"EndTime": "2020-09-11T15:30:00Z", // DateTime
"EndLocationName": "Udine", // String
"EndLocationAddress": "Via Rialto, 1", // String
"StartLocationName": "Udine", // String
"StartLocationAddress": "Via Rialto, 1", // String
"StartLocationLatitude": 46.0838284476514, // Double (nullable)
"StartLocationLongitude": 13.217754364013674, // Double (nullable)
"EndLocationLatitude": 46.0838284476514, // Double (nullable)
"EndLocationLongitude": 13.217754364013674, // Double (nullable)
"OriginatorKey": "c8f0ff575299ba1a7cd414f46b882e4a2...", // String
"OriginatorModule": "32b297a5-8180-420f-9482-84bfc7f55efe", // Guid
"Guid": "5b02f055-4fa4-4d02-9ae9-bc9186ca10e2", // Guid
"IsConfirmed": true, // Boolean
"IsReadyToStart": true, // Boolean
"MaxTripCount": 1, // Int
"MinValidStartTime": "2020-09-11T14:26:25Z", // DateTime
"MaxValidEndTime": "2020-09-11T16:00:00Z", // DateTime
"MaxValidStartTime": "2020-09-11T14:45:00Z", // DateTime
"EquipmentReference": "AA000AA;;01234567890", // String (nullable)
"ServiceReference": null, // String (nullable)
"DeletionDate": null, // DateTime (nullable)
"ID": 5, // Int
},
...
]
Get allowed vehicle categories
Gets the list of allowed vehicle categories guid given a reservation’s base data
- POST /v1/movement-authorities/allowed-categories
Gets the list of usable categories for a given movement authority
- Status Codes
200 OK – Success
The API accept a JsonBody with the following format:
{
StartLocationQuery: "London Gatwick", // String
EndLocationQuery: "London Heathrow", // String
StartTime: "2020/01/01 10:00:00", // DateTime
EndTime: "2020/01/01 11:00:00", // DateTime
ResourceGroups: ["b16eba05-725e-4491-b734-23e25e6b03fd", ...] // Guid array
}
where ResourceGroups
is the list of the guid of the resource groups visible to the reservation’s user.
The API will return the list of allowed vehicle categories’ guid:
[ "6df1d8da-bb55-4dd1-b612-ecc9e9d1a7f6", "1eea2c3f-0ac6-4bd9-9ccb-e3ff15a5ef80", ... ]
Possible error messages are:
err_InvalidStartDate
The start date is either not valid or is in the past
err_InvalidEndDate
The end date is either not valid or is earlier than the start date