End a rental
POST/v1/rental/:rentalID/end
Locks the vehicle, makes it available to other users, and returns the total cost of the rental. The partner typically starts the payment process when ending the rental.
After 10 minutes of inactivity during an ongoing rental (the vehicle hasn't moved), the vehicle locks automatically and the rental ends — provided it is somewhere ending the rental is permitted.
Location: if a start/end location is provided via the API, the phone's location is used to define the end-ride position; otherwise the vehicle's own location (updated every 15 seconds) is used.
Parking photo: the response includes a pre-signed photoUploadURL — PUT a photo of the parked vehicle to it (see Validate parking photo).
Errors: when the vehicle cannot be parked at the end location the endpoint responds with 405 Method Not Allowed and a ResponseError body whose error field identifies the reason:
| HTTP status | error | detail |
|---|---|---|
405 | VehicleIsNotUpright | Vehicle is not upright |
405 | NoParkingSpotNearbyMPZ | No parking spot nearby |
405 | OutsideOfOpsArea | Outside of operational area |
405 | InsideNoParkingArea | Inside no parking area |
405 | InsideNoRidingArea | Inside no riding area |
405 | NoParkingSpotNearbySMPZ | No parking spot nearby |
405 | ParkingSpotFull | Parking spot full |
500 | FailedToEndRental | Failed to end rental |
See Payments for fines, short-ride rules and refunds.
Request
Responses
- 200
- 400
- 401
- 404
- 405
- 500
Successfully return rental data
Bad request
Unauthorized
Not found
Method not allowed (e.g. vehicle cannot be parked here)
Internal server error