2022-01-29 10:08:46 +01:00
|
|
|
### request=booking_request
|
|
|
|
|
2022-03-28 13:07:18 +02:00
|
|
|
**request** POST bike reservation.
|
2022-01-29 10:08:46 +01:00
|
|
|
|
|
|
|
| key | Required | Format | Comment |
|
|
|
|
| ---------- | ----------- | -------- | ---------------------------- |
|
|
|
|
| authcookie | + | text | unique encrypted key |
|
2022-03-28 13:07:18 +02:00
|
|
|
| bike | + | text | bike prefix+number |
|
2022-01-29 10:08:46 +01:00
|
|
|
|
|
|
|
**response** like **request=user_bikes_occupied** with "bikes_occupied" JSON-Objects
|
|
|
|
|
|
|
|
Example
|
2022-01-29 10:09:51 +01:00
|
|
|
**REST request=booking_request** from authorized users
|
2022-01-29 10:08:46 +01:00
|
|
|
```
|
|
|
|
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"
|
|
|
|
},
|
2022-06-03 17:28:00 +02:00
|
|
|
"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."
|
|
|
|
]
|
|
|
|
}
|
2022-01-29 10:08:46 +01:00
|
|
|
},
|
|
|
|
"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" : {
|
|
|
|
...
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
2022-03-28 13:07:18 +02:00
|
|
|
|
|
|
|
|
2022-03-28 17:51:09 +02:00
|
|
|
**request POST bike reservation and rental start at once.**
|
2022-03-28 13:07:18 +02:00
|
|
|
|
|
|
|
| key | Required | Format | Comment |
|
|
|
|
| ---------- | ----------- | -------- | ---------------------------- |
|
|
|
|
| authcookie | + | text | unique encrypted key |
|
|
|
|
| bike | + | text | bike prefix+number |
|
2022-03-28 18:14:46 +02:00
|
|
|
| state | o | text | on rental start state=occupied |
|
|
|
|
| lock_state | o | text | on rental start lock_state=unlocking (BLE unlocked) |
|
|
|
|
|
2022-03-28 13:07:18 +02:00
|
|
|
|
|
|
|
**response** like **request=user_bikes_occupied** with "bikes_occupied" JSON-Objects
|
|
|
|
|
|
|
|
Example
|
|
|
|
**REST request=booking_request** from authorized users
|
|
|
|
```
|
2022-03-28 18:14:46 +02:00
|
|
|
https://shareeapp-fr01.copri-bike.de/APIjsonserver?request=booking_request&bike=1006&state=occupied&lock_state=unlocking&authcookie=1b2771663e0b7eb3519ab0_12345678
|
2022-03-28 13:07:18 +02:00
|
|
|
```
|
|
|
|
**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"
|
|
|
|
},
|
2022-07-15 14:40:45 +02:00
|
|
|
"bike_type" : {
|
|
|
|
"category" : "cargo",
|
|
|
|
"engine" : {
|
|
|
|
"manufacturer" : "dummy"
|
|
|
|
},
|
|
|
|
"wheels" : "2"
|
|
|
|
}
|
|
|
|
},
|
2022-06-03 17:27:10 +02:00
|
|
|
"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."
|
|
|
|
]
|
|
|
|
}
|
2022-03-28 13:07:18 +02:00
|
|
|
},
|
|
|
|
"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" : {
|
|
|
|
...
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|