Parking/Segments
The parking/segments
resource provides parking segments information for on-street parking within a given area and time.
Use the GET
method when making requests to this resource.
Note: You need to send an authentication token in the HTTP header of your request to authenticate with the service. For more information on authentication, see the Identity & Access Management Developer Guide.
For information on how to construct the request, see Get Started.
Format
Requests against this resource must follow the pattern summarized by the following formula:
{http_method}
{header}
{resource}/{parameter0}/{...}/{parameterN}
?{param}={value}
Parameter | Description |
bbox | mandatory String Bounding box size (width and/or high) is limited to 1000 meters. A bounding box is defined with comma separated WGS 84-compliant latitude and longitude values, indicating the top left and bottom right corners. For example, an area in Berlin can be defined as (52.49476807,13.37479349,52.49207011,13.3792247). |
geometryType | repeated one ofSelects the types of geometry to return for each parking segment. Values are case-sensitive and multiple values are supported. Defaults to only "tpegOpenLR". See the documentation for the corresponding data types Segment Anchor and TPEG OpenLR. |
Using the Resource
The following example demonstrates how to access the resource. If you run this query via a web browser, you need to encode the +
character correctly, as a time zone designator.
curl 'https://osp.cit.cc.api.here.com/parking/segments?bbox=41.389405513925354,2.127549994463742,41.38042236108416,2.139522979169079&geometryType=tpegOpenLR&geometryType=segmentAnchor'
-H 'Accept-Encoding: gzip, deflate, sdch, br' -compressed
The corresponding response is shown below
{
"parkingSegments":[
{
"id":"192191",
"capacity":8,
"paymentInfo":{
"paymentType":[
"ON_FOOT"
],
"paymentMethod":{
"CARDS":[
"UNKNOWN"
],
"CASH":[
"COINS"
],
"ELECTRONIC_PAYMENT":[
"MOBILE"
]
}
},
"priceSchema":{
"currencyCode":"EUR",
"prices":[
{
"maxStay":"PT2M",
"times":[
{
"days":31,
"timeRange":{
"startTimeOfDay":"08:00",
"endTimeOfDay":"20:00"
}
}
],
"cost":[
{
"type":"NONE",
"amount":2.75,
"duration":"PT1H"
}
]
}
]
},
"address":{
"street":"Carrer de Galileu, 314",
"city":"Barcelona",
"postalCode":"08028",
"countryCode":"ESP"
},
"tpegOpenLR":{
"binary":"CCgBEAAkIwGEFR1t4AAJBQQFA/EACgQDBWAA/9gAUQAJBQQFA3EAMBcL",
"sideOfRoad":"RIGHT"
},
"availability":{
"availableSpots":3,
"trend":"STATIC",
"lastUpdatedTimestamp":"2019-01-21T09:40:03Z"
}
},
{
"id":"6205098",
"capacity":8,
"priceSchema":{
"currencyCode":"EUR",
"prices":[
{
"times":[
{
"days":127,
"timeRange":{
"startTimeOfDay":"00:00",
"endTimeOfDay":"00:00"
}
}
],
"cost":[
{
"type":"NONE",
"amount":0,
"duration":"PT1H"
}
]
}
]
},
"address":{
"street":"Calle de Joan Güell",
"city":"Barcelona",
"postalCode":"08028",
"countryCode":"ESP"
},
"features":[
"MOTORCYCLE"
],
"parkingRestrictions":[
{
"type":"NO_PARKING",
"exceptions":[
{
"type":"MOTORCYCLES_ONLY"
}
]
}
],
"tpegOpenLR":{
"binary":"CCkBEAAlJAGEFB1tZgAJBQQFA3IACgUEBYEjAAA9/3QACQUEBQPzADBmLg==",
"sideOfRoad":"LEFT"
},
"probability":[
{
"probability":31
}
]
}
]
}