From ce392ec677a573fcf06ccfa72eaed8eeabc7407e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rainer=20G=C3=BCmpelein?= Date: Thu, 29 Dec 2022 08:22:48 +0000 Subject: [PATCH] Update 4.2. op request=booking_update --- 4.2.-op-request=booking_update.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/4.2.-op-request=booking_update.md b/4.2.-op-request=booking_update.md index 3f53f94..7a432a1 100644 --- a/4.2.-op-request=booking_update.md +++ b/4.2.-op-request=booking_update.md @@ -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. |