2022-01-28 12:21:33 +01:00
|
|
|
**standard JSON root response** after ALL requests
|
|
|
|
|
|
|
|
| key | Required | Format | Comment |
|
|
|
|
| ------------------ | -------- | -------- | ------------------------------------------------- |
|
|
|
|
| user_id | + | text | returns user_id email-address |
|
|
|
|
| user_group | + | array | user group describes user registered bike fleets |
|
|
|
|
| user_tour | o | array | user tour describes registered service tour |
|
|
|
|
| debuglevel | o | text | returns user specified debuglevel for development |
|
|
|
|
| response | + | text | return request value |
|
|
|
|
| response_state | + | text | OK or Failure with description |
|
|
|
|
| response_text | o | text | Text description for UI feedback |
|
|
|
|
| authcookie | + | text>=30 | unique encrypted key on authorization success |
|
|
|
|
| copri_version | + | text | returns COPRI Version |
|
|
|
|
| clearing_cache | o | text | returns 1 if client have to clear cached values |
|
|
|
|
| agb_checked | + | text | returns 1 if AGB checked |
|
|
|
|
| uri_primary | + | text | returns primary server URI (Authorization server) |
|
|
|
|
| impress_html | o | text | returns site/impress.html |
|
|
|
|
| tariff_info_html | o | text | returns site/tariff_info.html |
|
|
|
|
| bike_info_html | o | text | returns site/bike_info.html |
|
|
|
|
| privacy.html | o | text | returns site/privacy.html |
|
|
|
|
| agb_html | o | text | returns site/agb.html |
|
2022-01-29 10:51:01 +01:00
|
|
|
| lang | o | text | language iso code |
|
|
|
|
| co2saving | o | text | CO2 saving info on rental end |
|
2022-01-28 12:21:33 +01:00
|
|
|
| init_map | o | object | json object for init map (see example) |
|
|
|
|
| last_used_operator | o | object | json object wit last jused operator data (see example)|
|
|
|
|
|
|
|
|
keep in mind, integers will also be delivered as characters.
|
|
|
|
|
|
|
|
Example
|
|
|
|
**request** authorization
|
|
|
|
```
|
2022-01-28 12:34:44 +01:00
|
|
|
https://shareeapp-primary.example.tld/APIjsonserver?request=authorization&merchant_id=your-merchant-id&user_id=mail@example.tld&user_pw=example-pw&hw_id=unique-device-id&lang=DE
|
2022-01-28 12:21:33 +01:00
|
|
|
```
|
|
|
|
**response** on success
|
|
|
|
```
|
|
|
|
{
|
|
|
|
"shareejson" : {
|
|
|
|
"debuglevel" : "32",
|
|
|
|
"tariff_info_html" : "site/tariff_info.html",
|
|
|
|
"user_tour" : [],
|
|
|
|
"user_group" : [],
|
|
|
|
"bike_info_html" : "site/bike_info.html",
|
|
|
|
"lang" : "DE",
|
|
|
|
"agb_html" : "site/agb.html",
|
|
|
|
"impress_html" : "site/impress.html",
|
|
|
|
"privacy_html" : "site/privacy.html",
|
|
|
|
"agb_checked" : "1",
|
2022-01-28 12:34:44 +01:00
|
|
|
"copri_version" : "4.1.10.2",
|
|
|
|
"user_id" : "mail@example.tld",
|
|
|
|
"lang" : "DE",
|
2022-01-28 12:21:33 +01:00
|
|
|
"init_map" : {
|
|
|
|
"center" : {
|
|
|
|
"longitude" : "7.825490",
|
|
|
|
"latitude" : "47.976634"
|
|
|
|
},
|
|
|
|
"radius" : "2.9"
|
|
|
|
},
|
2022-01-28 12:34:44 +01:00
|
|
|
"uri_primary" : "https://shareeapp-primary.copri-bike.de",
|
2022-01-28 12:21:33 +01:00
|
|
|
"authcookie" : "1842966_9580e08d7a627f80ab12ff8f65f1f598_87fab741bb98",
|
|
|
|
"clearing_cache" : "0",
|
|
|
|
"response" : "authorization",
|
2022-01-28 12:34:44 +01:00
|
|
|
"response_text" : "Welcome to the bike rental system",
|
2022-01-28 12:21:33 +01:00
|
|
|
"response_state" : "OK, nothing todo",
|
|
|
|
"last_used_operator" : {
|
|
|
|
"operator_phone" : "+49 761 453xxxxx7",
|
|
|
|
"operator_color" : "#009699",
|
2022-01-28 12:34:44 +01:00
|
|
|
"operator_name" : "Your rental name",
|
2022-01-28 12:21:33 +01:00
|
|
|
"operator_email" : "hotline@example.tld",
|
|
|
|
"operator_hours" : "Bürozeiten: Montag, Mittwoch, Freitag 9-12 Uhr"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
**response** on authentication failure
|
|
|
|
```
|
|
|
|
{
|
|
|
|
"shareejson" : {
|
|
|
|
"authcookie" : "",
|
|
|
|
"clearing_cache" : "0",
|
|
|
|
"agb_checked" : "0",
|
2022-01-28 12:34:44 +01:00
|
|
|
"response_text" : "Sorry, the login failed",
|
2022-01-28 12:21:33 +01:00
|
|
|
"copri_version" : "4.1.10.2",
|
|
|
|
"user_id" : "",
|
|
|
|
"agb_html" : "site/agb.html",
|
|
|
|
"response" : "authorization",
|
|
|
|
"user_group" : [],
|
|
|
|
"impress_html" : "site/impress.html",
|
2022-01-28 12:34:44 +01:00
|
|
|
"response_state" : "Failure, login failed",
|
2022-01-28 12:21:33 +01:00
|
|
|
"uri_primary" : "https://shareeapp-primary.copri-bike.de",
|
|
|
|
"tariff_info_html" : "site/tariff_info.html",
|
|
|
|
"lang" : "DE",
|
|
|
|
"privacy_html" : "site/privacy.html",
|
|
|
|
"bike_info_html" : "site/bike_info.html"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|