mirror of
https://gitlab.com/t6353/sharee.bike.wiki.git
synced 2024-11-13 05:56:29 +01:00
4.3 KiB
4.3 KiB
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 |
lang | o | text | language iso code |
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
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
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",
"copri_version" : "4.1.10.2",
"user_id" : "mail@example.tld",
"lang" : "DE",
"init_map" : {
"center" : {
"longitude" : "7.825490",
"latitude" : "47.976634"
},
"radius" : "2.9"
},
"uri_primary" : "https://shareeapp-primary.copri-bike.de",
"authcookie" : "1842966_9580e08d7a627f80ab12ff8f65f1f598_87fab741bb98",
"clearing_cache" : "0",
"response" : "authorization",
"response_text" : "Welcome to the bike rental system",
"response_state" : "OK, nothing todo",
"last_used_operator" : {
"operator_phone" : "+49 761 453xxxxx7",
"operator_color" : "#009699",
"operator_name" : "Your rental name",
"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",
"response_text" : "Sorry, the login failed",
"copri_version" : "4.1.10.2",
"user_id" : "",
"agb_html" : "site/agb.html",
"response" : "authorization",
"user_group" : [],
"impress_html" : "site/impress.html",
"response_state" : "Failure, login failed",
"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"
}
}