sharee.bike-Wiki/3.5.-pri-request=bikes_available.md
2022-06-03 15:24:17 +00:00

4.2 KiB

request=bikes_available

request GET of the available rental bikes with the optional specification station and/or system.

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
station_state o text station smartlock locking state
service_state o text service state for maintanance
bike_charge o text bike akku capacity
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
system + text>=1 bike lock system
uri_operator + text URI of Operator-Server
lockit_ID + text bluetooth ID
lockit_GUID + text bluetooth GUID
authed + text if 1 then authenticated request on operator
rental_description + object with tarif_elements and rental_info

rental_description JSON Object

key Required Format Comment
name + text Tarif name
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

Example REST request=bikes_available for authorized users

https://sharee-primary.example.tld/APIjsonserver?request=bikes_available&authcookie=6103_f782a208d9399291ba8d086b5dcc2509_23456789

response sharee JSON defaults + response multiple bike objects

{
   "shareejson" : {
  ***sharee JSON defaults***
 },
"bikes" : {
         "WUE5525" : {
            "gps" : {
               "latitude" : "47.987975491085045",
               "longitude" : "7.816756743460897"
            },
            "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" : [
                     "AGB",
                     "Mit der Mietrad Anmietung wird der Betreiber AGB zugestimmt."
                  ]
               }
            },
            "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",
            "uri_operator" : "https://shareeapp-op.example.tld",
            "system" : "Ilockit"
         },
  "LEC5522" : {
   ...
  }
}