2022-01-28 20:52:10 +01:00
|
|
|
### request=bikes_available
|
|
|
|
|
2022-01-28 21:30:18 +01:00
|
|
|
**request** GET of the available rental bikes with the optional specification **station** and/or **system**.
|
2022-01-28 20:52:10 +01:00
|
|
|
|
|
|
|
| key | Required | Format | Comment |
|
|
|
|
| ---------- | -------- | ------- | ----------------------------------- |
|
|
|
|
| authcookie | + | text>=8 | unique encrypted key OR merchant_id |
|
|
|
|
| system | o | text | bike lock system |
|
|
|
|
| station | o | text | station prefix+number |
|
|
|
|
|
|
|
|
**response** list of bikes by JSON-Objects
|
|
|
|
|
|
|
|
| key | Required | Format | Comment |
|
|
|
|
| -------------- | -------- | -------- | -------------------------------------- |
|
|
|
|
| state | + | text | bike available state |
|
|
|
|
| lock_state | + | text | bike smartlock locking state |
|
|
|
|
| station_state | o | text | station smartlock locking state |
|
|
|
|
| service_state | o | text | service state for maintanance |
|
|
|
|
| bike_charge | o | text | bike akku capacity |
|
|
|
|
| description | o | text | short bike description |
|
|
|
|
| bike | + | text | bike prefix+number |
|
|
|
|
| gps | + | array | GPS: latitude, longitude |
|
|
|
|
| station | + | text | station prefix+number |
|
|
|
|
| bike_group | + | array | bike group |
|
|
|
|
| system | + | text>=1 | bike lock system |
|
2022-06-03 17:24:17 +02:00
|
|
|
| uri_operator | + | text | URI of Operator-Server |
|
|
|
|
| lockit_ID | + | text | bluetooth ID |
|
|
|
|
| lockit_GUID | + | text | bluetooth GUID |
|
2022-01-28 20:52:10 +01:00
|
|
|
| authed | + | text | if 1 then authenticated request on operator |
|
2022-06-03 17:24:17 +02:00
|
|
|
| rental_description | + | object | with tarif_elements and rental_info |
|
2022-01-28 20:52:10 +01:00
|
|
|
|
2022-06-03 17:24:17 +02:00
|
|
|
**rental_description** JSON Object
|
2022-01-28 21:08:14 +01:00
|
|
|
| key | Required | Format | Comment |
|
|
|
|
| ------------------ | -------- | ---------------- | -------------------------- |
|
|
|
|
| name | + | text | Tarif name |
|
2022-06-03 17:24:17 +02:00
|
|
|
| id | + | text | Tarif number |
|
|
|
|
| tarif_elements | + | object with array | contains an indexed array with tarif data |
|
|
|
|
| rental_info | + | object with array | contains an indexed array with rental information |
|
2022-01-28 21:08:14 +01:00
|
|
|
|
|
|
|
|
2022-01-28 20:52:10 +01:00
|
|
|
Example
|
|
|
|
**REST request=bikes_available** for authorized users
|
|
|
|
```
|
2022-06-03 17:24:17 +02:00
|
|
|
https://sharee-primary.example.tld/APIjsonserver?request=bikes_available&authcookie=6103_f782a208d9399291ba8d086b5dcc2509_23456789
|
2022-01-28 20:52:10 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
**response** sharee JSON defaults + **response** multiple bike objects
|
|
|
|
```
|
|
|
|
{
|
|
|
|
"shareejson" : {
|
|
|
|
***sharee JSON defaults***
|
|
|
|
},
|
|
|
|
"bikes" : {
|
|
|
|
"WUE5525" : {
|
|
|
|
"gps" : {
|
|
|
|
"latitude" : "47.987975491085045",
|
|
|
|
"longitude" : "7.816756743460897"
|
|
|
|
},
|
2022-06-03 17:24:17 +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-28 20:52:10 +01:00
|
|
|
},
|
|
|
|
"state" : "available",
|
|
|
|
"authed" : "1",
|
|
|
|
"description" : "Lastenrad Sabine",
|
|
|
|
"bike" : "WUE5525",
|
|
|
|
"lock_state" : "locked",
|
|
|
|
"station" : "WUE302",
|
|
|
|
"Ilockit_GUID" : "",
|
|
|
|
"bike_group" : [
|
|
|
|
"WUE300029"
|
|
|
|
],
|
|
|
|
"Ilockit_ID" : "00000000-0000-0000-0000-fc3c002a2add",
|
2022-06-03 17:24:17 +02:00
|
|
|
"uri_operator" : "https://shareeapp-op.example.tld",
|
2022-01-28 20:52:10 +01:00
|
|
|
"system" : "Ilockit"
|
|
|
|
},
|
|
|
|
"LEC5522" : {
|
|
|
|
...
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
|