Get started
This section outlines how to get started quickly using the On-Street Parking API. To use the On-Street Parking API, you need to supply a token in the HTTP Authorization header of your REST requests as a bearer token.
- Get a HERE account
- Create a project
- Get an OAuth token
- Send a Request
Note
This section provides information on the minimum setup required to begin quickly using the On-Street Parking API. For more detailed information on HERE account setup, app registration, and authentication, see the Identity & Access Management Guide.
The On-Street Parking API is only available to automotive OEMs for in-vehicle applications. Before authenticating into the On-Street Parking API, contact your HERE representative.
Get a HERE account
To start using the On-Street Parking API, contact your organization admin who can invite you to join the HERE platform organization established for your company.
Create a project
To create a project, follow these steps:
- Sign in to the HERE platform using your HERE account.
- Open the Projects Manager from the launcher.
- Click Create new project.
- Enter a name for the project. Project names don't have to be unique.
- Enter a project ID. Project IDs must be unique within an organization and cannot be changed for the lifetime of the organization. Project IDs must be between 4 and 16 characters in length.
- Optional: Enter a description.
- Click Save.
Get an OAuth token
Token credentials conform to the OAuth 2.0 industry standard protocol for Bearer Access Tokens. HERE provides REST APIs to obtain these secure access tokens that may be used for up to 24 hours by your application for the purpose of authenticating requests to the HERE platform. For information on getting an OAuth token, see the Identity & Access Management Guide.
Use the token to send an On-Street Parking API request.
Send a request
The example below describes how to get parking information for a particular area in Barcelona, Spain.
Include a bearer token in your HTTP Header.
Authorization: Bearer <token>
Send a GET request as follows:
https://osp.cc.api.here.com/parking/segments
?bbox=41.389405513925354,2.127549994463742,41.38042236108416,2.139522979169079
The bbox
parameter specifies a bounding box for a search area.
The response to the request above delivers the following high-level elements:
- The parkingSegments array contains all parking segments in the bounding box specified in your request, for which parking availability or parking rules information is available. For each segment, the full on-street parking information is given, including parking restrictions. For more information, see Parking Segments.
{
"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
}
]
}
]
}
Next steps
We encourage you to further browse the On-Street Parking API Reference that describes the parameters used in the API requests and the data provided in the responses.