The REST API provides programmatic access to read and write 247Parking data. All requests needs to be authorized and responses are available in JSON.
Below are the documents that will help you get going with the REST API as quickly as possible:
- Get access to the API
- Authenticate requests
- Make a reservation on the 247Parking platform
If you find any issues with the API, please let us know via api@247parking.nl. We look forward to working with you and can’t wait to see your creations.
The 247Parking API attempts to respond with appropriate HTTP status codes for every request.
| Code | Text | Description |
|---|---|---|
| 200 | OK | Success! |
| 400 | Bad Request | The request was invalid or cannot be otherwise served. An accompanying error message will provide further explanation. |
| 401 | Unauthorized | Authentication credentials were missing or incorrect. |
| 404 | Not Found | The URI requested is invalid or the resource requested does not exists. |
| 405 | Method Not Allowed | The request was received, but the used HTTP method is not allowed. Not every endpoint supports each method. An accompanying error message will explain why. |
| 500 | Internal Server Error | Something is broken. Please contact us via api@247parking.nl so we can investigate. |
| 502 | Bad Gateway | The API is down. |
| 503 | Service Unavailable | The API is up, but overloaded with requests. Try again later. |
| 504 | Gateway timeout | The API is up, but the request couldn’t be serviced due to an API failure. Try again later or contact us via api@247parking.nl. |
The meta key is used to communicate extra information about the response. If all goes well, you'll only see a code key with value 200, sometimes with an accompanying message. If things go wrong you might see a response like:
{
"data": "",
"meta": {
"status": "error",
"code": 401,
"message": "Request expired"
}
}
When you would like to get access to the 247Parking API, you can send your request to info@247parking.nl. After approval, you will get a partner account and your API credentials (API key and API secret).
You can find your API Key and API Secret in your partner account. Login to your partner account on 247parking.nl/account and go to the API page. Here you can find your current API Key and API Secret. On this page you can also reset your credentials.
The purpose of this section is to show you how to modify HTTP requests for the purpose of sending authorized requests to the 247Parking API. The implementation requires that requests contain an additional HTTP X-Authorization header. An example of a HTTP request looks like this:
GET /v1/ HTTP/1.1 Host: api.247parking.nl Connection: close X-Authorization: Key="XxYEajBjyj&PQZiLGatPbKkoU3cg6NG9)ZrW6DWghAEiqv=lM", Timestamp="1420070400", Nonce="566761a9662108025d974494a55232d14cbbe945da87d6ab", Signature="G5OSm46rLM61WQlltBpe4qB57gk="Normally the X-Authorization header would need to be on one line, but has been wrapped for legibility
The X-Authorization header contains 4 key/value pairs. For any given API request, collecting these 4 values and creating a similar header will allow you to specify authorization for the request. How each value was generated is described below.
The API Key identifies which partner account is making the request. Obtain this value from checking the settings page for your partner account on 247parking.nl/account.
Key XxYEajBjyj&PQZiLGatPbKkoU3cg6NG9)ZrW6DWghAEiqv=lM
The Timestamp parameter indicates when the request was created. This value should be the number of seconds since the Unix epoch at the point the request is generated. The API will reject requests which were created too long ago (older than 10 minutes).
Timestamp 1420070400
The Nonce parameter is a unique token your application should generate for each unique request. The API will use this value to determine whether a request has been submitted multiple times. The value for this request was generated by base64 encoding 32 bytes of random data, and stripping out all non-word characters, but any approach which produces a relatively random alphanumeric string should be OK here.
Nonce 566761a9662108025d974494a55232d14cbbe945da87d6ab
The Signature parameter contains a value which is generated by running all of the other request parameters and the API Secret through a signing algorithm. The purpose of the signature is so that 247Parking can verify that the request has not been modified in transit and verify the partner sending the request.
The process for calculating the Signature for this request is described in Creating a signature.
Signature G5OSm46rLM61WQlltBpe4qB57gk=
To build the X-Authorization header string, imagine writing to a string named DST.
Key="parameter to DST
Key to DST",Timestamp="to DST
Timestamp parameter to DST",Nonce="to DST
Nonce parameter to DST",Signature="to DST
Signature parameter to DST"to DST
Performing these steps results in the following string:
Key="Key",Timestamp="Timestamp",Nonce="Nonce",Signature="Signature"
Key="XxYEajBjyj&PQZiLGatPbKkoU3cg6NG9)ZrW6DWghAEiqv=lM",Timestamp="1420070400",Nonce="566761a9662108025d974494a55232d14cbbe945da87d6ab",Signature="G5OSm46rLM61WQlltBpe4qB57gk="
This value should be set as the X-Authorization header for the request.
This section explains how to generate a signature for a HTTP request. The signature will be suitable for passing to the 247Parking API as part of an authorized request, as described in Authorizing a request.
The request used to demonstrate signing is a GET request to https://api.247parking.nl/v1/. The raw request looks like this:
GET /v1/ HTTP/1.1 Host: api.247parking.nl Connection: close X-Authorization: Key="XxYEajBjyj&PQZiLGatPbKkoU3cg6NG9)ZrW6DWghAEiqv=lM", Timestamp="1420070400", Nonce="566761a9662108025d974494a55232d14cbbe945da87d6ab", Signature="G5OSm46rLM61WQlltBpe4qB57gk="
To produce a signature, you need the following parameters: API Secret, HTTP method, base URL, nonce and timestamp.
The API Secret identifies your application to 247Parking and can be found by going to 247parking.nl/account and viewing the settings page for your partner account. It is very important to note that these values are incredibly sensitive and should never be shared with anyone. This parameter will be the same for every request your application sends.
Secret YyZLGQZiGrW6oBjyj&WghAP9)ZEiqv=lMatPbK
The HTTP method is known when creating the request, so it is easy to obtain. The 247Parking API only accepts GET or POST requests. HTTP methods must be converted to uppercase.
HTTP method GET
The Base URL is the URL to which the request is directed, minus any query string or hash parameters. Make sure that the URL starts with "https://".
Base URL https://api.247parking.nl/
The Nonce parameter is generated when you authorize a request. The nonce is send as parameter in the X-Authorization header and is also used to generate the signature.
Nonce 566761a9662108025d974494a55232d14cbbe945da87d6ab
The last parameter is the Timestamp. This parameter is generated when you authorize a request. The timestamp is send as parameter in the X-Authorization header and is also used to generate the signature.
Timestamp 1420070400
Finally, the Signature is calculated by concatenating the parameters above and the SHA1 hashing algorithm (using the binary output). There are implementations of SHA1 available for every popular language. For example, PHP has the SHA1 function.
Concatenate the parameters in the following order:
concatenated_string =SecretHTTP methodBase URLNonceTimestamp
For the request in this example, the concatenated_string will look like this:
YyZLGQZiGrW6oBjyj&WghAP9)ZEiqv=lMatPbKGEThttps://api.247parking.nl/566761a9662108025d974494a55232d14cbbe945da87d6ab1420070400
This concatenated string is hashed with the SHA1 function, the output must be a binary string. This binary string needs to be base64 encoded to produce the signature string. That value is the signature for this request:
Signature G5OSm46rLM61WQlltBpe4qB57gk=
Should your API Key or API Secret become compromised or need to be invalidated for any reason, you can do so in your partner account. Login to your partner account on 247parking.nl/account and go to the API page. Here you can find your current API Key and API Secret. By clicking the 'Reset API credentials' button, you can invalidate your current API Key and API Secret, and create a new one.
Note: after resetting your API Key and API Secret, the previous credentials will be invalidated immediately.
Make a blank or test request to the 247Parking platform. You can use this endpoint for example to test your authorization settings.
| Response format | JSON |
| Requires authentication? | Yes |
None
GET /v1/ HTTP/1.1 Host: api.247parking.nl Connection: close X-Authorization: Key="XxYEajBjyj&PQZiLGatPbKkoU3cg6NG9)ZrW6DWghAEiqv=lM",Timestamp="1420070400",Nonce="566761a9662108025d974494a55232d14cbbe945da87d6ab",Signature="G5OSm46rLM61WQlltBpe4qB57gk="
{
"data": "",
"meta": {
"status": "success",
"code": 200,
"message": "Access authorized"
}
}
Make a new reservation in the 247Parking platform.
| Response format | JSON |
| Requires authentication? | Yes |
vertrek_timestamp |
The date and time of departure. Please provide the drop off time of the car (and not, for example, the departure time of the airplane). Example value: 23-03-2015 18:30 (dd-mm-yyyy hh:mm) |
aankomst_timestamp |
The date and time of arrival. Please provide the arrival time of the airplane (and not, for example, the desired pick up time of the car). Example value: 29-04-2015 22:45 (dd-mm-yyyy hh:mm) |
parkeerservice |
The requested parking service for the customer. You could choose one of the following options:
Example value: shuttle |
parkeerlocatie |
The requested location to deliver the parking service. At the moment, 247Parking offers their services on the following locations:
Example value: schiphol |
aantal_personen |
The number of persons who are requesting the parking service. Example value: 4 |
betalingswijze |
The chosen payment method. Transactions will be handled by the payment provider Adyen. Note: for MasterCard, VISA and Maestro transactions an additional fee is charged. At the moment, 247Parking offers the following payment methods:
Example value: mc |
overdektparkeren |
An additional option for the reservation: park a car in an indoor garage. Note: if overdektparkeren is activated, the following limits are active: Example value: 1 |
aankomst_vluchtnummer |
The arrival flight number of the airplane. Note: only relevant if parkeerlocatie is schiphol. Example value: HV 123 |
vertrek_vluchtnummer |
The departure flight number of the airplane. Note: only relevant if parkeerlocatie is schiphol. Example value: HV 456 |
auto_merk_type |
The brand, type and color of the car. Example value: Opel Astra, zwart |
auto_kenteken |
The license plate of the car. Example value: ABC-12-D |
handbagage |
If all travelers only carry hand luggage, please let us know by setting this parameter to 1. Example value: 1 |
wasservice |
We provide an additional car washing service. There are 5 options available:
Example value: 3 |
leerverzorging |
An additional option for the car wash service: a luxurious leather care treatment for the car upholstery. Note: only relevant when wasserivce is 2, 3 or 4. Example value: 1 |
opmerkingen |
A comment option to let the customer enter their requests or remarks considering the reservation. Example value: We have a baby on board. |
referentienummer |
A reference number can be used to enter details about (business) projects. Example value: Project #ZW001 |
kortingscode |
A valid discount code. Note: this field is case sensitive. Example value: NYE2015 |
label_id |
A valid label ID to link a reservation to a specific label. Example value: 1 (for 247Parking, default) |
klant_voornaam |
The first name of the customer. You can provide a full name or only their initials. Example value: John |
klant_achternaam |
The surname of the customer. Example value: de Smit |
klant_email |
The e-mail address of the customer. Example value: john.de.smit@gmail.com |
klant_mobiel |
The mobile number of the customer. Example value: 0612345678 |
sleutel_houden |
The customer keeps his car keys with him. Example value: 1 |
annuleringsverzekering |
The customer has booked a cancellation insurance. Example value: 1 |
POST /v1/reservering/ HTTP/1.1
Host: api.247parking.nl
Connection: close
Content-Type: application/json
Content-Length: 431
X-Authorization: Key="XxYEajBjyj&PQZiLGatPbKkoU3cg6NG9)ZrW6DWghAEiqv=lM",Timestamp="1420070400",Nonce="566761a9662108025d974494a55232d14cbbe945da87d6ab",Signature="G5OSm46rLM61WQlltBpe4qB57gk="
{"klant_land":"Nederland","parkeerlocatie":"schiphol","vertrek_timestamp":"20-01-2015 13:30","vertrek_vluchtnummer":"HV 123","aankomst_timestamp":"29-01-2015 21:30","aankomst_vluchtnummer":"HV 456","parkeerservice":"shuttle","auto_merk_type":"Audi A3 zwart","auto_kenteken":"97-KGT-1","klant_voornaam":"John","klant_achternaam":"de Smit","klant_email":"john.de.smit@gmail.com","klant_mobiel":"0612345678","aantal_personen":"3","betalingswijze":"contant","kortingscode":"NYE2015"}
{
"data": {
"voucher_url": "https://247parking.nl/voucher.php?id=z0126c3a55fa10ba20fa12345",
"reserveringsnummer": "S123456",
"totaalprijs": "38.99"
},
"meta": {
"status": "success",
"code": 200,
"message": "Reservering toegevoegd"
}
}
{
"data": "",
"meta": {
"status": "error",
"code": 400,
"message": "De ingevoerde kortingscode bestaat niet of is verlopen."
}
}
Update an existing reservation in the 247Parking platform.
| Response format | JSON |
| Requires authentication? | Yes |
vertrek_timestamp |
The date and time of departure. Please provide the drop off time of the car (and not, for example, the departure time of the airplane). Example value: 23-03-2015 18:30 (dd-mm-yyyy hh:mm) |
aankomst_timestamp |
The date and time of arrival. Please provide the arrival time of the airplane (and not, for example, the desired pick up time of the car). Example value: 29-04-2015 22:45 (dd-mm-yyyy hh:mm) |
parkeerservice |
The requested parking service for the customer. You could choose one of the following options:
Example value: shuttle |
parkeerlocatie |
The requested location to deliver the parking service. At the moment, 247Parking offers their services on the following locations:
Example value: schiphol |
betalingswijze |
The chosen payment method. Transactions will be handled by the payment provider Adyen. Note: for MasterCard, VISA and Maestro transactions an additional fee is charged. At the moment, 247Parking offers the following payment methods:
Example value: mc |
totaalprijs |
The total sum of the reservation. This amount includes: the parking service, car wash service and leather treatment. The price is always calculated inclusive of VAT (21%). Example value: 39.99 |
* (all other parameters) |
All other parameters listed at POST /reservering/ are optional. Only data of the provided parameters will be updated. If you omit an optional parameter, the data remains unchanged. |
PUT /v1/reservering/s123456/ HTTP/1.1
Host: api.247parking.nl
Connection: close
Content-Type: application/json
Content-Length: 233
X-Authorization: Key="XxYEajBjyj&PQZiLGatPbKkoU3cg6NG9)ZrW6DWghAEiqv=lM",Timestamp="1420070400",Nonce="566761a9662108025d974494a55232d14cbbe945da87d6ab",Signature="G5OSm46rLM61WQlltBpe4qB57gk="
{"vertrek_timestamp":"20-02-2017 05:30","aankomst_timestamp":"01-03-2017 23:30","parkeerservice":"shuttle","parkeerlocatie":"schiphol","betalingswijze":"ideal","klant_achternaam":"Test Persoon","totaalprijs":"39.99"}
{
"data": {
"voucher_url": "https://247parking.nl/voucher.php?id=123abc123abc123abc123abc",
"reserveringsnummer": "S123456",
"totaalprijs": "39.99"
},
"meta": {
"status": "success",
"code": 200,
"message": "Booking updated"
}
}
Update the status of an existing reservation in the 247Parking platform.
| Response format | JSON |
| Requires authentication? | Yes |
status |
The new status of a reservation:
Example value: noshow |
PUT /v1/reservering/s123456/status/ HTTP/1.1
Host: api.247parking.nl
Connection: close
Content-Type: application/json
Content-Length: 19
X-Authorization: Key="XxYEajBjyj&PQZiLGatPbKkoU3cg6NG9)ZrW6DWghAEiqv=lM",Timestamp="1420070400",Nonce="566761a9662108025d974494a55232d14cbbe945da87d6ab",Signature="G5OSm46rLM61WQlltBpe4qB57gk="
{"status":"noshow"}
{
"data": {
"reserveringsnummer": "S123456"
},
"meta": {
"status": "success",
"code": 200,
"message": "Booking status is updated to noshow"
}
}