1. Home
  2. API
  3. getOffStreetParkingOptions
  1. Home
  2. Swagger API documentation
  3. getOffStreetParkingOptions

getOffStreetParkingOptions

This article describes the behavior of /getOffstreetParkingOptions.

Request format

Required parameters

Example for a minimal viable request (ID Request)

{
   "mapLayers":[
      "RULES",
      "PREDICTION"
   ],
   "requestType":{
      "dataType":"IDRequest",
      "value":[
         {
            "id":5653774,
            "timestampDescription":{
               "unixSeconds":1562932800
            }
         },
         {
            "id":5653774,
            "timestampDescription":{
               "unixSeconds":1562939800
            }
         }
      ]
   }
}

Note on fallback behavior: If requested information is not available, an empty response will be returned. 

Optional parameters

Example for a full request with all optional parameters (ID Request)

{
   "localeDefinition":{
      "contentLanguage":"EN",
      "currencyCode":"EUR",
      "unitSystem":"METRIC"
   },
   "outputFormat":"GEO_JSON",
   "mapLayers":[
      "RULES",
      "PREDICTION"
   ],
   "includeTags":[
      "FREE"
   ],
   "excludeTags":[
      "RESTRICTED"
   ],
   "requestType":{
      "dataType":"IDRequest",
      "value":[
         {
            "id":3217654,
            "timestampDescription":{
               "unixSeconds":1562932800
            }
         },
         {
            "id":3217654,
            "timestampDescription":{
               "unixSeconds":1562939800
            }
         }
      ]
   }
}

Request Parameters

 

Name Value Type Required
localeDefinition A dictionary that specifies contentLanguage, currency and height units:

default:

“contentLanguage”: “EN”,
“currencyCode”: “EUR”,
“unitSystem”: “METRIC” (or “IMPERIAL”

for currently supported values, see here.

{String:String} no
outputFormat Specifies the output format in which the response is returned.

Allowed Values: “GEO_JSON” (default), “REGULAR_JSON”,”PREDICTION_ONLY”

Note: “PREDICTION_ONLY” is designed to retrieve occupancy values of parking areas without requesting additional overhead. It works only, when the “mapLayers” parameter is set to mapLayers=[“PREDICTION”]

String no
mapLayers A comma-separated list of map layers, which should be included in the response.

Allowed values are:

[“RULES”,”PREDICTION”,”LIVE”]

mapLayers must not be empty!

[String] yes
includeTags A comma-separated list of parkingAreaTags. Returned parkingArea must be flagged with these tags.

Allowed values are: [“FREE”,”PAID”,”CUSTOMER”,”PRIVATE”]

[String] no
excludeTags A comma-separated list of parkingAreaTags. Returned parkingArea must not be flagged with these tags.

Important! excludeTags overrule includeTags in case of conflicting tags.

Allowed values are: [“FREE”,”PAID”,”CUSTOMER”,”PRIVATE”]

[String] no
timestampDescription Dictionary to specify the time for when the results should be requested.

Allowed values:

  • “unixSeconds”: 1563008400 (default)
  • “dateString”: “2019-07-13T11:00:00+02:00”
  • “unixMilliSeconds”: 1563008400048

Attention: timestampDescription is not allowed in combination with ID request

{String: Any} required,
requestType Allowed values:

  • Next To Point Request
  • ID Request
  • Polygon Request
  • Map Tile Request

See here for details.

{String: Any} yes

 

Response

Behavior in Free Plan

getOffStreetOptions will only return limited “rules” results in Free Plan.

Rules data available in free plan:

  • Geometry (shape of parking area)
  • centerPoint
  • ID
  • parkingEntityName
  • capacity
  • openingHours: limited (only “open” or “closed”)
  • priceInformation: limited (only “free” or “paid”)

A statusMessage notifies about the limited functionalities in Free Plan.

Example for a response with limited rules data

{
   "type":"FeatureCollection",
   "features":[
      {
         "type":"Feature",
         "id":5072717,
         "geometry":{
            "type":"MultiPolygon",
            "coordinates":[
               [
                  [
                     [
                        13.3637757,
                        52.5229332
                     ],
                     [
                        13.3635885,
                        52.5228409
                     ],
                     [
                        13.3631951,
                        52.5228881
                     ],
                     [
                        13.3631442,
                        52.5228942
                     ],
                     [
                        13.3633391,
                        52.5229937
                     ],
                     [
                        13.3637757,
                        52.5229332
                     ]
                  ]
               ]
            ]
         },
         "properties":{
            "parkingEntity":{
               "id":5072717,
               "parkingEntityName":"Cinema",
               "capacity":12,
               "centerPoint":{
                  "type":"Point",
                  "coordinates":[
                     10.505094300799556,
                     52.26486835536122
                  ]
               },
               "openingHours":{
                  "simpleOpeningStatus":"OPEN"
               },
               "priceInformation":{
                  "simplePriceStatus":"PAID"
               },
               "occupancy":{
                  "timestampDescription":{
                     "unixSeconds":1562932800
                  },
                  "predictedOpenSpots":4,
                  "parkingProbability":90,
                  "color":"GREEN"
               }
            }
         }
      }
   ],
   "responseMetaData":{
      "statusMessage":"Results are limited in Free Plan. To unlock full rules and live occupancy, upgrade to Starter plan."
   }
}

Example for an error message indicating attempted request of permitted attributes.

{
    "statusMessage": "Free plan does not allow requests for live data! Please upgrade your plan within AIPARK Studio Account Management (https://studio.aipark.io/personal-account-management) or adjust your request!"
}

Behavior in Starter Plan

For information about permitted use and display of results, see AIPARK API use and display requirements.

Example for a GeoJSON Response:

{
   "type":"FeatureCollection",
   "features":[
      {
         "type":"Feature",
         "id":5072717,
         "geometry":{
            "type":"MultiPolygon",
            "coordinates":[
               [
                  [
                     [
                        13.3637757,
                        52.5229332
                     ],
                     [
                        13.3635885,
                        52.5228409
                     ],
                     [
                        13.3631951,
                        52.5228881
                     ],
                     [
                        13.3631442,
                        52.5228942
                     ],
                     [
                        13.3633391,
                        52.5229937
                     ],
                     [
                        13.3637757,
                        52.5229332
                     ]
                  ]
               ]
            ]
         },
         "properties":{
            "parkingEntity":{
               "id":5072717,
               "parkingEntityName":"Cinema",
               "capacity":112,
               "capacityFamilyFriendly":13,
               "capacityHandicapped":10,
               "centerPoint":{
                  "type":"Point",
                  "coordinates":[
                     10.505094300799556,
                     52.26486835536122
                  ]
               },
               "orientation":"PARALLEL",
               "tags":[
                  "PAID"
               ],
               "entrancePoints":[
                  {
                     "entrancePoint":{
                        "type":"Point",
                        "coordinates":[
                           13.40135620203,
                           52.51107498225
                        ]
                     },
                     "entranceHeight":2
                  }
               ],
               "openingHours":{
                  "schedules":[
                     {
                        "schedule":{
                           "priority":0
                        },
                        "scheduleType":"OPEN"
                     }
                  ],
                  "simpleOpeningStatus":"OPEN"
               },
               "priceInformation":{
                  "schedules":[
                     {
                        "schedule":{
                           "priority":0
                        },
                        "priceModel":{
                           "interval":1440,
                           "prices":[
                              {
                                 "currencyCode":"EUR",
                                 "price":"-1.00",
                                 "maxPrice":"100.00"
                              }
                           ]
                        }
                     }
                  ],
                  "simplePriceStatus":"FREE"
               },
               "occupancy":{
                  "color":"GREEN",
                  "occupancyLive":{
                     "lastUpdated":{
                        "unixSeconds":1565250329
                     },
                     "minimumOpenSpots":10,
                     "occupancyRange":{
                        "fromOpenSpots":10,
                        "toOpenSpots":20
                     }
                  },
                  "occupancyPredicted":{
                     "occupancyRange":{
                        "fromOpenSpots":10,
                        "toOpenSpots":20
                     },
                     "openSpots":10,
                     "parkingProbability":80
                  },
                  "state":"CLOSED",
                  "timestampDescription":{
                     "unixSeconds":1565250329
                  }
               }
            }
         }
      }
   ]
}

Explanation: The response contains geometric features. Every features’ properties contain rules data as well as occupancy information.

Endpoint

https://api.aipark.io:443/aipark/v2/getOffStreetParkingOptions

Headers

Header Description
Content-Type application/json;charset=UTF-8
apikey API key of your application. For better traceability, please use one API key per application / platform
uuid Unique identifier of your user. A uuid is required in order to avoid unintended use of the API.

Remember that the Terms of Use require compliance with all applicable laws, including regarding use of these headers. For example, in certain jurisdictions, such as Europe, there are requirements to obtain user consent before placing certain tracking devices on user devices.

Mobile SDKs

Developing on iOS or Android? If so, you are required to use our Mobile SDKs, which handle all the heavy lifting for you and don’t require you to interact with the bare API.

Updated on August 10, 2019

Was this article helpful?

Related Articles

Bitnami