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 |
| 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 |
2022-12-29 11:05:13 +01:00
| system | + | text | 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 |
| rental_description | + | object | with tarif_elements and rental_info |
2022-07-15 14:36:44 +02:00
| bike_type | + | object | describes the bike with some attributes |
2022-12-29 11:09:18 +01:00
| smartlock_type | o | object | (under development) describes the smartlock with some attributes |
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-07-15 14:36:44 +02:00
**bike_type** JSON Object
| key | Required | Format | Comment |
| ------------------ | -------- | ---------------- | -------------------------- |
| category | o | text | "city" or "cargo" |
| wheels | o | text | "2" or "3" |
| engine | o | object | contains engine attributes like "manufacturer" |
2022-12-29 10:53:41 +01:00
| battery | o | object | contains bike battery attributes. "hidden=0" means not in App visible. "backend_accessible=0" means no bike charge API available |
2022-07-15 14:36:44 +02:00
2022-12-29 11:05:13 +01:00
**smartlock_type** JSON Object
| key | Required | Format | Comment |
| ------------------ | -------- | ---------------- | -------------------------- |
2022-12-30 15:40:38 +01:00
| engine | o | object | contains engine attributes like "manufacturer" |
2022-12-29 11:05:13 +01:00
| battery | o | object | contains smartlock battery attributes. |
2023-03-28 11:07:39 +02:00
**bike_group** describes at which station defined in **station_group** the bike is allowed.
Groups are identified by ID. The following groups of bicycles are defined:
2023-03-28 11:17:11 +02:00
| Defined group ID's | bike type |
2023-03-28 11:07:39 +02:00
| ------ | ------ |
2023-11-22 19:23:06 +01:00
| 300101 | cargo |
| 300103 | city |
2023-03-28 11:17:11 +02:00
Keep in mind, each ID is preceded by an operator-prefix. Data type is array.
2023-03-28 11:07:39 +02:00
2022-01-28 21:08:14 +01:00
2022-01-28 20:52:10 +01:00
Example
**REST request=bikes_available** for authorized users
```
2023-11-22 19:23:06 +01:00
https://sharee-operator.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-07-15 14:36:44 +02:00
"bike_type" : {
2022-12-29 10:53:41 +01:00
"battery" : {
"charge_current_bars" : "4",
"hidden" : "0",
"charge_max_bars" : "5",
"backend_accessible" : "0",
"charge_current_percent" : "70"
},
2022-07-15 14:36:44 +02:00
"category" : "cargo",
"wheels" : "2",
"engine" : {
"manufacturer" : "dummy"
}
},
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" : [
2022-07-19 10:10:33 +02:00
"Tracking",
"Ich stimme der Speicherung (Tracking) meiner Fahrstrecke zwecks wissenschaftlicher Auswertung und Berechnung der CO2-Einsparung zu!"
2022-06-03 17:24:17 +02:00
]
}
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",
2023-11-22 19:23:06 +01:00
"uri_operator" : "https://shareeapp-operator.example.tld",
2022-12-29 12:02:48 +01:00
"system" : "Ilockit",
"smartlock_type" : {
2022-12-30 15:40:38 +01:00
"engine" : {
"manufacturer" : "Ilockit"
},
2022-12-29 12:02:48 +01:00
"battery" : {
"charge_current_percent" : "37"
}
}
2022-01-28 20:52:10 +01:00
},
"LEC5522" : {
...
}
}
```