2022-01-28 12:58:48 +01:00
|
|
|
### request=stations_available
|
|
|
|
|
2022-01-28 21:41:10 +01:00
|
|
|
**request** GET of the available stations depending on the rental bike groups assigned to the registered user.
|
2022-01-28 12:58:48 +01:00
|
|
|
|
2022-01-28 20:53:03 +01:00
|
|
|
| key | Required | Format | Comment |
|
|
|
|
| ---------- | -------- | ------- | ----------------------------------- |
|
|
|
|
| authcookie | + | text>=8 | unique encrypted key OR merchant_id |
|
|
|
|
| station | o | text | station prefix+number |
|
|
|
|
|
2022-01-28 12:58:48 +01:00
|
|
|
**response** list of stations by JSON-Objects
|
|
|
|
|
|
|
|
| key | Required | Format | Comment |
|
|
|
|
| ------------- | -------- | -------- | ----------------------------------------------------- |
|
|
|
|
| state | + | text>=8 | available-state |
|
|
|
|
| description | o | text<=20 | short station description |
|
|
|
|
| gps | + | array | GPS: latitude, longitude |
|
|
|
|
| station | + | text | station prefix_number |
|
2023-11-22 19:18:28 +01:00
|
|
|
| station_group | + | array | deprecated, it is substituted by station_type object |
|
2022-01-28 12:58:48 +01:00
|
|
|
| gps_radius | + | text | geofencing by meters around station, for bike return. |
|
2023-03-28 10:46:06 +02:00
|
|
|
| uri_operator | + | text | URI of operator-server |
|
2023-11-22 19:12:33 +01:00
|
|
|
| station_type | + | object | station values (see example). It can be "cargo" and/or "city" bike objects |
|
2022-01-28 12:58:48 +01:00
|
|
|
| operator_data | o | object | operator values (see example) |
|
2023-11-22 19:20:08 +01:00
|
|
|
| bikes_occupied | o | object | Implicit returns the json object which is defined in "request=user_bikes_occupied" |
|
2022-01-28 12:58:48 +01:00
|
|
|
|
2023-03-28 10:55:34 +02:00
|
|
|
|
2023-11-22 19:12:33 +01:00
|
|
|
**station_type** describes which **bike_group** are allowed at the station.
|
2023-03-28 10:55:34 +02:00
|
|
|
Groups are identified by ID. The following groups of bicycles are defined:
|
2023-03-28 11:15:31 +02:00
|
|
|
| Defined group ID's | bike type |
|
2023-03-28 10:55:34 +02:00
|
|
|
| ------ | ------ |
|
2023-11-22 19:12:33 +01:00
|
|
|
| 300101 | cargo |
|
|
|
|
| 300103 | city |
|
2023-03-28 11:14:19 +02:00
|
|
|
Keep in mind, each ID is preceded by an operator-prefix. Datatype is array, because each station can have more byke_group
|
2023-03-28 10:55:34 +02:00
|
|
|
|
2022-01-28 12:58:48 +01:00
|
|
|
Example
|
|
|
|
**REST request=stations_available** for authorized users
|
|
|
|
```
|
2023-03-28 10:46:06 +02:00
|
|
|
https://shareeapp-primary.example.tld/APIjsonserver?request=stations_available&authcookie=6103_0f667aa7f234fe317a2705ee89fde0c3_1234567998
|
2022-01-28 12:58:48 +01:00
|
|
|
```
|
|
|
|
|
2022-01-28 20:53:03 +01:00
|
|
|
**response** sharee JSON defaults + **response** multiple station objects
|
2022-01-28 12:58:48 +01:00
|
|
|
```
|
2022-01-28 20:25:57 +01:00
|
|
|
{
|
|
|
|
"shareejson" : {
|
|
|
|
***sharee JSON defaults***
|
|
|
|
},
|
2022-01-28 12:58:48 +01:00
|
|
|
"WUE9301" : {
|
|
|
|
"state" : "available",
|
2023-03-28 10:46:06 +02:00
|
|
|
"uri_operator" : "https://shareeapp-wue.example.tld",
|
2023-03-28 11:00:54 +02:00
|
|
|
"description" : "Cargo and Citybike Station",
|
2022-01-28 12:58:48 +01:00
|
|
|
"operator_data" : {
|
|
|
|
"operator_hours" : "Montag, Mittwoch, Freitag 9-12 Uhr",
|
|
|
|
"operator_logo" : "",
|
|
|
|
"operator_name" : "Test GmbH",
|
|
|
|
"operator_email" : "hotline@wuerzburg.demo",
|
|
|
|
"operator_phone" : "09876-122222",
|
|
|
|
"operator_color" : "#009699"
|
|
|
|
},
|
|
|
|
"station" : "WUE9301",
|
|
|
|
"gps" : {
|
|
|
|
"latitude" : "47.99814334149303",
|
|
|
|
"longitude" : " 7.765779379576922"
|
|
|
|
},
|
2023-02-14 18:35:00 +01:00
|
|
|
"gps_radius" : "100",
|
2023-11-22 19:06:10 +01:00
|
|
|
"station_type" : {
|
|
|
|
"cargo" : {
|
|
|
|
"bike_group" : "WUE300101",
|
|
|
|
"bike_count" : "2"
|
|
|
|
}
|
|
|
|
}
|
2022-01-28 12:58:48 +01:00
|
|
|
},
|
2022-01-28 20:27:26 +01:00
|
|
|
"WUE9302" : {
|
|
|
|
...
|
2023-11-22 19:18:28 +01:00
|
|
|
},
|
|
|
|
"bikes_occupied" : {}
|
2022-01-28 12:58:48 +01:00
|
|
|
```
|