Update 4.2. op request=booking_update

This commit is contained in:
Rainer Gümpelein 2022-12-29 08:22:48 +00:00
parent 982a87a5f5
commit ce392ec677

View file

@ -3,14 +3,21 @@
**request** PUSH start, pause, cancel and end bike rental is implemented via this update request. Prerequisite is the reservation via the initial "request=booking_request".
The following booking states are implemented:
`state=canceled` booking request will be canceled. The bike is set to `state=available` in the COPRI backend.
`state=occupied` bike rental starts.
`state=occupied` bike rental starts. `state=occupied` marks the start of the rental in copri. A multiple "occupied" will be acknowledged with an error, because a rental can only be started once. So that the rental start is recorded in any case in the backend, please set the `state=occupied` in the first request.
`state=available` end the bike rental, which makes the bike `state=available` again in the COPRI backend.
The following lock states are implemented:
`lock_state=unlocking` start unlocking signal, smartlock was triggered to unlock.
`lock_state=unlocked` successfully unlocking the lock.
`lock_state=locking` start locking signal, smartlock was triggered to close.
`lock_state=locked` closed successfully.
| key | Required | Format | Comment |
@ -18,8 +25,8 @@ The following lock states are implemented:
| authcookie | + | text | unique encrypted key |
| bike | + | text | bike prefix+number |
| state | + | text | one of the bike states: canceled, occupied, available |
| lock_state | o/+ | text | one of the lock states: locked, locking, unlocked |
| station_state | + | text | station smartlock locking state |
| lock_state | o/+ | text | one of the lock states: unlocking, unlocked, locking, locked |
| station_state | o | text | station smartlock locking state |
| latitude | + | text | App GPS only necessary on state=available |
| longitude | + | text | App GPS only necessary on state=available |
| gps_age | o/+ | text | App GPS age only necessary on state=available. value in milliseconds. |