Skip to content

Locked

This event is fired when a spot is locked on the station (a vehicle 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 vehicle locked in. 0 if the identifier cannot be read.
    • cache_accepted (boolean): Indicate if the vehicle 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 vehicle according to certain hours or other conditions).
    • time (integer): The time (milliseconds since epoch) when the vehicle 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.
    • identifiedByLocation (boolean, optional): Indicate if the vehicle id could not be read, but we could identify it based on it's location in relation to the station.

Body example

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