Vehicle - Vehicles

The base url for the APIs in this page is at:

/api/vehicle-mobile

A JSON file with OpenAPI data about all vehicle-related mobile APIs can be downloaded here.

Set vehicle cleaning status

Used to set the cleaning status for the vehicle for a specified trip

POST /v1/vehicles/vehicle-cleaning-status

Set the cleaning status of a vehicle

Status Codes

The body of the request is:

{
  Trip: "53155c4a-b2a0-412f-ab41-552d9ccdf784",   // Guid
  InternalCleaningStatus: 1,                      // Int (nullable)
  ExternalCleaningStatus: 1                       // Int (nullable)
}

Value types of InternalCleaningStatus and ExternalCleaningStatus can be one of the VehicleCleaningStatus enumeration.

Returns a plain Json positive response if the the cleaning status has been successfully set for the vehicle.

Returns a plain Json negative response if there is no trip corresponding to the guid provided in the body or if the trip does not have any vehicle assigned to it.

Get vehicle cleaning status

Gets the cleaning status for a vehicle related to a specific trip

GET /v1/trips/{guid}/cleaning-status

Returns the cleaning status of the vehicle linked about a trip

Parameters
  • guid (string) – The guid of the trip

Status Codes

where guid is the guid of the trip.

If no errors occurred it will return a Json positive response with the following data:

{
  InternalCleaningStatus: 1,                      // Int (nullable)
  ExternalCleaningStatus: 1                       // Int
}

where InternalCleaningStatus and ExternalCleaningStatus can be one of the values specified in the VehicleCleaningStatus enumeration.

Possible errors are:

Possible errors are:

err_NoTrip

No trip was found for the guid provided in the query parameters

err_NoTripVehicle

No vehicle was found for the provided trip

err_NoCleaningStatus

No external cleaning status was provided

Get vehicle position

Gets the vehicle’s current position

GET /v1/vehicles/vehicle-position/{vin}

Return the vehicle’s position

Parameters
  • vin (string) –

Status Codes

where vin is the VIN of the vehicle.

The API will return a Json positive response with the following data:

{
  Latitude: 45.5745,         // Double (nullable)
  Longitude: 12.5845         // Double (nullable)
}

or a plain positive response if the vehicle has a still running trip.

Possible errors are:

err_NoVehicle

No vehicle has been found for the provided VIN