[Carpool]: Added POST /carpool/bookings to create a Carpool booking for a driver from the main account. The request is checked against vehicle availability, the account's Carpool settings and the driver's other bookings, as on the Carpool booking screen, and every request carries an Idempotency-Key header so a retry cannot create the same booking twice. Added GET /carpool/booking-purposes, GET /carpool/locations and GET /carpool/booking-form to read the IDs a booking needs.
[Carpool]: Added GET /carpool/vehicles/availability to check, before creating a booking, whether a vehicle, or the vehicle Carpool would pick from a category, can be booked for a window. It runs the checks POST /carpool/bookings runs and refuses with the same reasons.
[Carpool]: Added POST /carpool/bookings/{booking_id}/cancel and POST /carpool/bookings/{booking_id}/force-terminate for the main account, with GET /carpool/cancel-reasons for the cancellation reason. A cancel sends the driver the account's configured cancellation SMS and email. A booking whose status does not allow the action returns HTTP 409 Conflict and is left unchanged.
[Carpool]: Added POST /carpool/bookings/{booking_id}/approve, /decline, /check-out and /check-in for the main account, to move a booking through approval, vehicle handover and return. Check-out and check-in follow the vehicle's booking start and stop method as the Carpool booking screen does, and return HTTP 409 Conflict when that method handles the step.
[Carpool]: Added PATCH /carpool/bookings/{booking_id} to change a booking that is waiting for approval from the main account. Only the fields sent are changed, the resulting booking is checked as on create, and the account's approval step and notifications run again.
[Carpool]:GET /carpool/bookings and GET /carpool/bookings/{booking_id} now return pickup_site_location_id, return_site_location_id and booking_purpose_id.
[Vehicles]:total_break_time_trimmed on GET /vehicles/activity is now the time from the first trip's start to the last trip's end, minus the working time, so it stays correct on days with a daylight saving change. It can read up to one minute lower than before.
[General]: A GET request that waits more than 120 seconds for the database now returns HTTP 503 Service Unavailable with error.reasondb_busy and a Retry-After header, where it used to wait up to 15 minutes and then return HTTP 500 Internal Server Error. This happens mainly during database maintenance windows, and retrying after the Retry-After delay is expected to succeed.
[Health]:GET /health now returns the running API version in version.
[Fuel]:GET /fuel/fills and GET /fuel/fills/{registration} now document page and limit. page must be 1 or more and limit must be from 1 to 1000 (default 50). A page or limit of 0, or a limit above 1000, now returns HTTP 422 Unprocessable Entity. Use page to retrieve more than the first page of fuel fills.
[MiFleet]: A MiFleet request from an account that has no MiFleet access now returns HTTP 403 Forbidden, where it used to return empty results.
[General]: Various internal improvements and under-the-hood tweaks.
[Authentication]: Fixed an issue where a request with valid credentials could occasionally return HTTP 401 Unauthorized.
[Vehicles]: Fixed an issue where GET /vehicles/activity did not list a driver who has no surname. The driver is now returned with last_name set to null.
[Vehicle Commands]: Fixed an issue where POST /vehicles/commands/{registration} and PUT /vehicles/{registration}/central-locking returned HTTP 409 Conflict for up to 30 seconds after a command that never reached the vehicle.
[Vehicles]: Fixed an issue where GET /vehicles/status left out a vehicle that has not reported a status yet, and GET /vehicles/{registration}/status returned no status for it. Such a vehicle is now returned like any vehicle that has not reported.
[Vehicles]: Fixed an issue where filter[ignition]=false on GET /vehicles/status was ignored and every vehicle was returned.
[Events]: Fixed an issue where GET /vehicles/events, GET /vehicles/{registration}/events, POST /fuel/consumed, GET /fuel/consumed/{registration}, POST /vehicles/range, GET /vehicles/{registration}/range, POST /vehicles/soc and GET /vehicles/{registration}/soc could leave out events received late, for a period that ended within the last day.