mirror of
https://gitlab.com/t6353/sharee.bike.wiki.git
synced 2024-05-08 11:16:34 +02:00
Compare commits
15 commits
cdc5b12896
...
586a96f6c1
Author | SHA1 | Date | |
---|---|---|---|
586a96f6c1 | |||
c8f7707bb0 | |||
6a042c145a | |||
1396dcc123 | |||
1c2005b432 | |||
deb7dbc542 | |||
878b569bf3 | |||
6b31238304 | |||
15b01708d2 | |||
da880ee8ea | |||
6380bb9bed | |||
ccd52f0a50 | |||
7b7fbcd047 | |||
94e70c840c | |||
459e242f64 |
|
@ -1,5 +1,5 @@
|
|||
## sharee.bike API description
|
||||
Version 4.1.10.2
|
||||
Version 4.1.23.22
|
||||
|
||||
The document serves as a technical reference for the sharee.bike rental bike platform for rental bike client development. The rental bike management server COPRI serves as the backend system.
|
||||
|
||||
|
@ -17,11 +17,11 @@ The primary server (uri_primary) is used for:
|
|||
- request=authentication
|
||||
- request=authout
|
||||
- request=stations_available
|
||||
- request=bikes_available
|
||||
- request=user_bikes_occupied
|
||||
- request=user_minianswer
|
||||
|
||||
During rental bike, the operator server responsible for the rental process (uri_operator) is delivered in the rental bike JSON object. It is usesd for:
|
||||
The operator server (uri_operator) responsible for the rental process is used for:
|
||||
- request=bikes_available
|
||||
- request=booking_request
|
||||
- request=booking_update
|
||||
- request=user_feedback
|
||||
|
|
|
@ -15,20 +15,20 @@
|
|||
| description | o | text<=20 | short station description |
|
||||
| gps | + | array | GPS: latitude, longitude |
|
||||
| station | + | text | station prefix_number |
|
||||
| station_group | + | array | station_group describes which bike_groups are allowed at the station |
|
||||
| authed | o | text | return 1 if user is authenticated on operator |
|
||||
| station_group | + | array | deprecated, it is substituted by station_type object |
|
||||
| gps_radius | + | text | geofencing by meters around station, for bike return. |
|
||||
| uri_operator | + | text | URI of operator-server |
|
||||
| bike_count | + | text | Amount of available bikes on station |
|
||||
| station_type | + | object | station values (see example). It can be "cargo" and/or "city" bike objects |
|
||||
| operator_data | o | object | operator values (see example) |
|
||||
| bikes_occupied | o | object | Implicit returns the json object which is defined in "request=user_bikes_occupied" |
|
||||
|
||||
|
||||
**station_group** describes which **bike_group** are allowed at the station.
|
||||
**station_type** describes which **bike_group** are allowed at the station.
|
||||
Groups are identified by ID. The following groups of bicycles are defined:
|
||||
| Defined group ID's | bike type |
|
||||
| ------ | ------ |
|
||||
| 300101 | Cargobike |
|
||||
| 300103 | Citybike |
|
||||
| 300101 | cargo |
|
||||
| 300103 | city |
|
||||
Keep in mind, each ID is preceded by an operator-prefix. Datatype is array, because each station can have more byke_group
|
||||
|
||||
Example
|
||||
|
@ -56,18 +56,20 @@ https://shareeapp-primary.example.tld/APIjsonserver?request=stations_available&a
|
|||
"operator_color" : "#009699"
|
||||
},
|
||||
"station" : "WUE9301",
|
||||
"station_group" : [
|
||||
"WUE300101",
|
||||
"WUE300103"
|
||||
],
|
||||
"gps" : {
|
||||
"latitude" : "47.99814334149303",
|
||||
"longitude" : " 7.765779379576922"
|
||||
},
|
||||
"gps_radius" : "100",
|
||||
"bike_count" : "2"
|
||||
"station_type" : {
|
||||
"cargo" : {
|
||||
"bike_group" : "WUE300101",
|
||||
"bike_count" : "2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"WUE9302" : {
|
||||
...
|
||||
}
|
||||
},
|
||||
"bikes_occupied" : {}
|
||||
```
|
|
@ -26,6 +26,7 @@
|
|||
| rental_description | + | object | with tarif_elements and rental_info |
|
||||
| bike_type | + | object | describes the bike with some attributes |
|
||||
| smartlock_type | o | object | (under development) describes the smartlock with some attributes |
|
||||
| bikes_occupied | o | object | Implicit returns the json object which is defined in "request=user_bikes_occupied" |
|
||||
|
||||
**rental_description** JSON Object
|
||||
| key | Required | Format | Comment |
|
||||
|
@ -53,15 +54,15 @@
|
|||
Groups are identified by ID. The following groups of bicycles are defined:
|
||||
| Defined group ID's | bike type |
|
||||
| ------ | ------ |
|
||||
| 300101 | Cargobike |
|
||||
| 300103 | Citybike |
|
||||
| 300101 | cargo |
|
||||
| 300103 | city |
|
||||
Keep in mind, each ID is preceded by an operator-prefix. Data type is array.
|
||||
|
||||
|
||||
Example
|
||||
**REST request=bikes_available** for authorized users
|
||||
```
|
||||
https://sharee-primary.example.tld/APIjsonserver?request=bikes_available&authcookie=6103_f782a208d9399291ba8d086b5dcc2509_23456789
|
||||
https://sharee-operator.example.tld/APIjsonserver?request=bikes_available&authcookie=6103_f782a208d9399291ba8d086b5dcc2509_23456789
|
||||
```
|
||||
|
||||
**response** sharee JSON defaults + **response** multiple bike objects
|
||||
|
@ -125,7 +126,7 @@ https://sharee-primary.example.tld/APIjsonserver?request=bikes_available&authcoo
|
|||
"WUE300029"
|
||||
],
|
||||
"Ilockit_ID" : "00000000-0000-0000-0000-fc3c002a2add",
|
||||
"uri_operator" : "https://shareeapp-op.example.tld",
|
||||
"uri_operator" : "https://shareeapp-operator.example.tld",
|
||||
"system" : "Ilockit",
|
||||
"smartlock_type" : {
|
||||
"engine" : {
|
||||
|
@ -138,7 +139,8 @@ https://sharee-primary.example.tld/APIjsonserver?request=bikes_available&authcoo
|
|||
},
|
||||
"LEC5522" : {
|
||||
...
|
||||
}
|
||||
},
|
||||
"bikes_occupied" : {}
|
||||
}
|
||||
```
|
||||
|
|
@ -40,7 +40,7 @@ The following lock states are implemented:
|
|||
Example
|
||||
**request** starts bike rental and unlock smartlock at once. lock_state=unlocked can also be done on second request.
|
||||
```
|
||||
https://sharee-zr01.example.tld/APIjsonserver?request=booking_update&bike=FR1540&state=occupied&lock_state=unlocked&authcookie=6103_7dc3c95028d06c9663378f6d44346de7_12345678
|
||||
https://sharee-operator.example.tld/APIjsonserver?request=booking_update&bike=FR1540&state=occupied&lock_state=unlocked&authcookie=6103_7dc3c95028d06c9663378f6d44346de7_12345678
|
||||
```
|
||||
|
||||
**response** sharee JSON defaults + **response** rental states in `user_bikes_occupied` JSON-objects
|
|
@ -20,7 +20,7 @@
|
|||
Example
|
||||
**REST request=user_feedback**
|
||||
```
|
||||
https://shareeapp-fr01.copri-bike.de/APIjsonserver?request=user_feedback&bike=FR_1538&message=alles%20gut&bike_broken=1&authcookie=6103_ad720ed63bd40039e4abe8a9ad7315e1_23456789
|
||||
https://shareeapp-operator.example.tld/APIjsonserver?request=user_feedback&bike=FR1538&message=alles%20gut&bike_broken=1&authcookie=6103_ad720ed63bd40039e4abe8a9ad7315e1_23456789
|
||||
```
|
||||
|
||||
**response** is just the **sharee JSON default** with user_feedback
|
Loading…
Reference in a new issue