Skip to content

Locked

This event is fired when a spot is locked on the station (a scooter is back in).

Body parameters

  • event: locked
  • station (integer): The identifier of the station where the spot was locked.
  • data: (json object).
    • spot (integer): The number of the locked spot. The range is between 1 and 32 (included).
    • vehicle (integer): The identifier of the scooter locked in. 0 if the identifier cannot be read.
    • cache_accepted (boolean): Indicate if the scooter was directly accepted by the station (green LED + sound) without waiting for server confirmation. This behavior is disabled by default, it allows a faster feedback for the end user but can be a problem for some use case (for example when we want to deny the return of the scooter according to certain hours or other conditions).
    • time (integer): The time (milliseconds since epoch) when the scooter was returned. It's recommended to use this value as the end time of rental, so even in case the station temporary loose the network, the correct time will be billed to the end user.

Body example

{
    "event": "locked",
    "station": 156,
    "data": {
        "spot": 1,
        "vehicle": 411,
        "cache_accepted": false,
        "time": 1588171211824
    }
}