mirror of
https://gitlab.com/t6353/sharee.bike.wiki.git
synced 2024-12-22 07:36:26 +01:00
5.5 KiB
5.5 KiB
request=booking_request
request POST bike reservation.
key | Required | Format | Comment |
---|---|---|---|
authcookie | + | text | unique encrypted key |
bike | + | text | bike prefix+number |
response like request=user_bikes_occupied with "bikes_occupied" JSON-Objects
Example REST request=booking_request from authorized users
https://shareeapp-fr01.copri-bike.de/APIjsonserver?request=booking_request&bike=FR1540&authcookie=6103_7dc3c95028d06c9663378f6d44346de7_12345678
response sharee JSON defaults + response multiple bikes_occupied objects
{
"shareejson" : {
***sharee JSON defaults***
},
"bikes_occupied" : {
"155898" : {
"bike" : "FR1540",
"total_price" : "0.00",
"gps" : {
"longitude" : "7.825490",
"latitude" : "47.976634"
},
"rental_description" : {
"tarif_elements" : {
"1" : [
"Mietgebühr",
"3,00 € / 1 Std "
],
"2" : [
"Gratiszeit",
"1 Std / Tag"
],
"4" : [
"Max. Gebühr",
"20,00 € / Tag"
]
},
"id" : "5519",
"name" : "Cargo-Bikes",
"rental_info" : {
"2" : [
"AGB",
"Mit der Mietrad Anmietung wird der Betreiber AGB zugestimmt."
]
}
},
"state" : "occupied",
"Ilockit_ID" : "ISHAREIT-2200540",
"end_time" : "2021-10-28 20:08:15",
"station" : "FR101",
"Ilockit_GUID" : "00000000-0000-0000-0000-fc3c002a2add",
"lock_state" : "unlocked",
"description" : "Vauban-bike (Ilockit)",
"request_time" : "2021-10-28 20:03:29.231426+02",
"start_time" : "2021-10-28 20:06:36.412847+02",
"unit_price" : "2.00",
"uri_operator" : "https://shareeapp-fr01.copri-bike.de",
"computed_hours" : "0",
"system" : "Ilockit",
"real_hours" : "0.0333333333333333",
"K_u" : "[-66, 27, -35, 67, -62, 67, 53, 84, -71, 54, -119, 13, 86, -19, 35, -23, -61, 7, 105, -92, 0, 0, 0, 0]",
"K_seed" : "[110, -106, -90, -65, 90, 47, 25, -112, -8, -115, 109, -69, 108, 56, -77, 88]",
"bike_group" : [
"FR300001"
]
},
"155899" : {
...
}
}
request POST bike reservation and rental start at once.
key | Required | Format | Comment |
---|---|---|---|
authcookie | + | text | unique encrypted key |
bike | + | text | bike prefix+number |
state | o | text | on rental start state=occupied |
lock_state | o | text | on rental start lock_state=unlocking (BLE unlocked) |
response like request=user_bikes_occupied with "bikes_occupied" JSON-Objects
Example REST request=booking_request from authorized users
https://shareeapp-fr01.copri-bike.de/APIjsonserver?request=booking_request&bike=1006&state=occupied&lock_state=unlocking&authcookie=1b2771663e0b7eb3519ab0_12345678
response sharee JSON defaults + response multiple bikes_occupied objects
{
"shareejson" : {
***sharee JSON defaults***
},
"bikes_occupied" : {
"155898" : {
"bike" : "FR1006",
"total_price" : "0.00",
"gps" : {
"longitude" : "7.825490",
"latitude" : "47.976634"
},
"bike_type" : {
"category" : "cargo",
"engine" : {
"manufacturer" : "dummy"
},
"wheels" : "2"
}
},
"rental_description" : {
"tarif_elements" : {
"1" : [
"Mietgebühr",
"3,00 € / 1 Std "
],
"2" : [
"Gratiszeit",
"1 Std / Tag"
],
"4" : [
"Max. Gebühr",
"20,00 € / Tag"
]
},
"id" : "5519",
"name" : "Cargo-Bikes",
"rental_info" : {
"2" : [
"AGB",
"Mit der Mietrad Anmietung wird der Betreiber AGB zugestimmt."
]
}
},
"state" : "occupied",
"end_time" : "2021-10-28 20:08:15",
"station" : "FR101",
"lock_state" : "unlocking",
"description" : "Vauban-bike",
"request_time" : "2021-10-28 20:03:29.231426+02",
"start_time" : "2021-10-28 20:06:36.412847+02",
"unit_price" : "2.00",
"uri_operator" : "https://shareeapp-fr01.copri-bike.de",
"computed_hours" : "0",
"system" : "sigo",
"real_hours" : "0.0333333333333333",
"bike_group" : [
"FR300001"
]
},
"155899" : {
...
}
}