Rental Start, Status & End

How to start a rental?

The communication between server and vehicle is asynchronous. We deal with the asynchrony by adding a status endpoint. Let us explain.

When you start rental via rental/start, you receive a synchronous response that acknowledges the incoming command. In other words, a successful response to rental/start does not mean that the rental has been started. It means the customer is allowed to start a rental, the vehicle is free to be rented and we are trying to unlock the vehicle.

Once the start has been triggered, you can check if your rental has been started successfully via the rental status endpoint.

As long as there was no confirmation by the vehicle being unlocked, the customer status is IN_RENTAL and the rental status is STARTING. Once we have the confirmation, the rental status changes to RUNNING. This means the rental has started successfully and the customer is able to enter the vehicle. In case the rental failed to start, the customer status transitions back to previous status (either IDLE or IN_RESERVATION).

3414

Rental Status Flow

Ending rentals

Similar to starting a rental, the rental/end command synchronously acknowledges the initiating of an end rental. The status is then ENDING. Once the end rental was successful, a 404 is returned (again).

πŸ“˜

End Rental Criteria

A rental can only be ended by the user, if all end rental criteria (ERC) are fulfilled. Examples of end rental criteria are:

  • driver door open
  • key not in holder
  • vehicle outside of home area.

You receive all end rental criteria (if any) synchronously in the error response to rental/end.

🚧

Manual end rental through Customer Service or Security

Keep in mind that the rental might be ended any time by our Customer Service or Security. Common cases are:

  • The vehicle reports wrong GPS position which prevents an end rental due to being outside home area. The customer calls and customer service ends the rental
  • The vehicle does not respond to commands on end rental. The customer calls and customer service ends the rental
  • A customer is suspected to be fraudulent

Therefore it is necessary to check regularly if the rental is still running.

Timeouts

We apply a maximum timeout of 45 seconds to rental/start and rental/end. If an error in the communication to the vehicle occurs earlier than the timeout, the status will change earlier as well. Examples are:

  • vehicle reports that doors could not be unlocked
  • door is opened right after triggering end rental.

🚧

Start rental auto-cancel

We initiate an end rental if the user does not interact within the vehicle in the first 60 seconds after successfully starting it (status RUNNING). In this case, the rental will not be billed.