sharee.bike-Wiki/5.2.-tool-request=bikes_all.md
2022-12-29 10:59:47 +00:00

5.2 KiB

request=bikes_all

request GET all rental bikes with the optional limitations of station and/or bike number

key Required Format Comment
authcookie + text unique encrypted key
station o text station prefix+number
bike o text bike prefix+number

response "bikes" by JSON-Objects

key Required Format Comment
state + text bike available state
lock_state + text smartlock locking state
service_state o text service state for maintanance
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, describes bike dependent fleets
todo_info o text key if Aufgaben defined
system + text bike lock system (BC or Ilockit)
uri_operator + text URI of Operator-Server
lockit_ID + text bluetooth ID
lockit_GUID + text bluetooth GUID
service_code o array color keys, only available for servicetool users
bike_type + object describes the bike with some attributes
smartlock_type + object (under development) describes the smartlock with some attributes

bike_type JSON Object

key Required Format Comment
category o text "city" or "cargo"
wheels o text "2" or "3"
engine o object contains engine attributes like "manufacturer"
battery o object contains bike battery attributes. "hidden=0" means not in App visible. "backend_accessible=0" means no bike charge API available

smartlock_type JSON Object

key Required Format Comment
system o text ex. "Ilockit"
battery o object contains smartlock battery attributes. Look at example response

Example request to get all bikes with states

https://shareeapp-primary.copri-bike.de/APIjsonserver?request=bikes_all&authcookie=6103_f782a208d9399291ba8d086b5dcc2509_23456789

response sharee JSON defaults + response multiple bike objects

{
   "shareejson" : {
  ***sharee JSON defaults***
 },
"bikes" : {
        "FR4781" : {
            "bike" : "FR4781",
            "smartlock_type" : {
               "system" : "Ilockit",
               "battery" : {
                  "charge_current_percent" : "37"
               }
            },
            "system" : "Ilockit",
            "state" : "available",
            "station" : "FR105",
            "rental_description" : {
               "id" : "5533",
               "reserve_timerange" : "15",
               "name" : "E-Lastenrad",
               "rental_info" : {
                  "1" : [
                     "Tracking",
                     "Ich stimme der Speicherung (Tracking) meiner Fahrstrecke zwecks wissenschaftlicher Auswertung und Berechnung der CO2-Einsparung zu!"
                  ]
               },
               "tarif_elements" : {
                  "4" : [
                     "Max. Gebühr",
                     "24,00 € / Tag"
                  ],
                  "1" : [
                     "Mietgebühr",
                     "2,00 € / 30 Min "
                  ]
               }
            },
            "bike_type" : {
               "engine" : {
                  "manufacturer" : "dummy"
               },
               "category" : "cargo",
               "wheels" : "2",
               "battery" : {
                  "charge_current_bars" : "4",
                  "hidden" : "0",
                  "charge_current_percent" : "70",
                  "backend_accessible" : "0",
                  "charge_max_bars" : "5"
               }
            },
            "Ilockit_ID" : "ISHAREIT-2404781",
            "authed" : "1",
            "gps" : {
               "longitude" : "7.973855",
               "latitude" : "47.927738"
            },
            "uri_operator" : "https://shareeapp-operator.example.tld",
            "lock_state" : "locked",
            "Ilockit_GUID" : "00000000-0000-0000-0000-fea583da99f8",
            "bike_group" : [
               "FR300101"
            ],
            "description" : "E-Lastenrad"
         },
         "WUE5525" {
            ...
         }
    }
}