Vehicle - Trips =============== .. Last update: 07/04/2022 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 :download:`here `. Get ongoing vehicle trip data ----------------------------- Returns data about an ongoing trip: .. openapi:: /openapi/srv-vehicle/api-src-WebMobile.json :paths: /v1/trips/{guid}/trip-data | guid: The guid of the ongoing trip (Guid) If there is a trip corresponding the ``guid`` provided in the request, the response will be a Json positive response with the CANbus/dashboard data:: { ActualDurationSeconds: 1800, // Int RemainingSeconds: 450, // Int ActualMileageKm: 9, // Int (nullable) FuelLevelPct: 72 // Double (nullable) } 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 Extend reservation ------------------ Allows the user to ask for an extension of the trip's reservation .. openapi:: /openapi/srv-vehicle/api-src-WebMobile.json :paths: /v1/trips/{guid}/extend | guid: Trip Guid (Guid) The API accepts a request body in the following format:: { EndTime: '2021-01-01 00:00:00' // DateTime } and will respond with a response body in the following format:: { Result: true // Boolean, true if extension accepted, false if refused Remaining: 1 // Int, remaining extensions allowed for this reservation } The API will respond with one of the following errors: ``err_NoRunningTrip`` No trip has been found for the provided guid, or the trip was already closed ``err_TripUserMismatch`` The provided trip is not related to the current user ``err_InvalidEndTime`` No EndTime has been provided, or its value is less or equal to the current authority end time ``err_MaxExtensionsReached`` The reservation already reached the maximum number of allowed extensions, expressed in the MAMaxExtensions :ref:`environment variable` ``err_TooLongExtension`` The required extension is more than the maximum extension duration, expressed in minutes in the MAMaxExtensionTime :ref:`environment variable` ``err_TooShortExtension`` The required extension is less than the minimum extension duration, expressed in minutes in the MAMinExtensionTime :ref:`environment variable`