247Parking API

The REST API provides programmatic access to read and write 247Parking data. All requests needs to be authorized and responses are available in JSON.

Documentation

Below are the documents that will help you get going with the REST API as quickly as possible:

Feedback

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.

Error codes & responses

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"
    }
}

Request credentials

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).

Find API credentials

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.

Authorizing a request

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

X-Authorization header parameters

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.

API Key

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
Timestamp

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
Nonce

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
Signature

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=

Building the X-Authorization header string

To build the X-Authorization header string, imagine writing to a string named DST.

  1. Append the string
    Key="
    parameter to DST
  2. Append the API Key to DST
  3. Append the string
    ",Timestamp="
    to DST
  4. Append the Timestamp parameter to DST
  5. Append the string
    ",Nonce="
    to DST
  6. Append the Nonce parameter to DST
  7. Append the string
    ",Signature="
    to DST
  8. Append the Signature parameter to DST
  9. Append a double quote
    "
    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.

Creating a signature

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="

Parameters for the signature

To produce a signature, you need the following parameters: API Secret, HTTP method, base URL, nonce and timestamp.

API Secret

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
HTTP method

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
Base URL

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/
Nonce

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
Timestamp

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

Calculating the signature

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 = Secret HTTP method Base URL Nonce Timestamp

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=

Reset API credentials

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.

GET /

Make a blank or test request to the 247Parking platform. You can use this endpoint for example to test your authorization settings.

Resource URL

https://api.247parking.nl/v1/

Resource Information

Response formatJSON
Requires authentication?Yes

Parameters

None

Example request

GET /v1/ HTTP/1.1
Host: api.247parking.nl
Connection: close
X-Authorization: Key="XxYEajBjyj&PQZiLGatPbKkoU3cg6NG9)ZrW6DWghAEiqv=lM",Timestamp="1420070400",Nonce="566761a9662108025d974494a55232d14cbbe945da87d6ab",Signature="G5OSm46rLM61WQlltBpe4qB57gk="

Example response

{
    "data": "",
    "meta": {
        "status": "success",
        "code": 200,
        "message": "Access authorized"
    }
}

POST /reservering/

Make a new reservation in the 247Parking platform.

Resource URL

https://api.247parking.nl/v1/reservering/

Resource Information

Response formatJSON
Requires authentication?Yes

Parameters

vertrek_timestamp
required

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
required

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
required

The requested parking service for the customer. You could choose one of the following options:
- valet
- shuttle
- combi_vs (combination of valet / shuttle)
- combi_sv (combination of shuttle / valet)

Example value: shuttle

parkeerlocatie
required

The requested location to deliver the parking service. At the moment, 247Parking offers their services on the following locations:
- schiphol (Schiphol Amsterdam Airport)
- pta (Passenger Terminal Amsterdam)
- amsterdam_centrum (Amsterdam City Centre)

Example value: schiphol

aantal_personen
required

The number of persons who are requesting the parking service.

Example value: 4

betalingswijze
required

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:

- contant (customer pays by cash at arrival)
- ideal (customer pays online via iDEAL)
- mc (customer pays online via MasterCard)
- visa (customer pays online via VISA card)
- maestro (customer pays online via Maestro card)
- via_partner (the payment transaction is handled by the partner)

Example value: mc

overdektparkeren
optional

An additional option for the reservation: park a car in an indoor garage. Note: if overdektparkeren is activated, the following limits are active:

- parkeerservice only available for value shuttle
- wasservice not possible to book in combination with overdektparkeren
- betalingswijze not possible to book with value contant

Example value: 1

aankomst_vluchtnummer
optional

The arrival flight number of the airplane. Note: only relevant if parkeerlocatie is schiphol.

Example value: HV 123

vertrek_vluchtnummer
optional

The departure flight number of the airplane. Note: only relevant if parkeerlocatie is schiphol.

Example value: HV 456

auto_merk_type
optional

The brand, type and color of the car.

Example value: Opel Astra, zwart

auto_kenteken
optional

The license plate of the car.

Example value: ABC-12-D

handbagage
optional

If all travelers only carry hand luggage, please let us know by setting this parameter to 1.

Example value: 1

wasservice
optional

We provide an additional car washing service. There are 5 options available:
- 0 (no car wash)
- 1 (car wash: outside)
- 2 (car wash: in- and outside)
- 3 (VIP Superpolish)
- 4 (VIP Showroom)

Example value: 3

leerverzorging
optional

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
optional

A comment option to let the customer enter their requests or remarks considering the reservation.

Example value: We have a baby on board.

referentienummer
optional

A reference number can be used to enter details about (business) projects.

Example value: Project #ZW001

kortingscode
optional

A valid discount code. Note: this field is case sensitive.

Example value: NYE2015

label_id
optional

A valid label ID to link a reservation to a specific label.

Example value: 1 (for 247Parking, default)

klant_voornaam
optional

The first name of the customer. You can provide a full name or only their initials.

Example value: John

klant_achternaam
optional

The surname of the customer.

Example value: de Smit

klant_email
optional

The e-mail address of the customer.

Example value: john.de.smit@gmail.com

klant_mobiel
optional

The mobile number of the customer.

Example value: 0612345678

sleutel_houden
optional

The customer keeps his car keys with him.

Example value: 1

annuleringsverzekering
optional

The customer has booked a cancellation insurance.

Example value: 1

Example request

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"}

Example response

{
    "data": {
        "voucher_url": "https://247parking.nl/voucher.php?id=z0126c3a55fa10ba20fa12345",
        "reserveringsnummer": "S123456",
        "totaalprijs": "38.99"
    },
    "meta": {
        "status": "success",
        "code": 200,
        "message": "Reservering toegevoegd"
    }
}

Response with invalid value for kortingscode

{
  "data": "",
  "meta": {
    "status": "error",
    "code": 400,
    "message": "De ingevoerde kortingscode bestaat niet of is verlopen."
  }
}

PUT /reservering/:resnr/

Update an existing reservation in the 247Parking platform.

Resource URL

https://api.247parking.nl/v1/reservering/:resnr/

Resource Information

Response formatJSON
Requires authentication?Yes

Parameters

vertrek_timestamp
required

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
required

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
required

The requested parking service for the customer. You could choose one of the following options:
- valet
- shuttle
- combi_vs (combination of valet / shuttle)
- combi_sv (combination of shuttle / valet)

Example value: shuttle

parkeerlocatie
required

The requested location to deliver the parking service. At the moment, 247Parking offers their services on the following locations:
- schiphol (Schiphol Amsterdam Airport)
- pta (Passenger Terminal Amsterdam)
- amsterdam_centrum (Amsterdam City Centre)

Example value: schiphol

betalingswijze
required

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:

- contant (customer pays by cash at arrival)
- ideal (customer pays online via iDEAL)
- mc (customer pays online via MasterCard)
- visa (customer pays online via VISA card)
- maestro (customer pays online via Maestro card)
- via_partner (the payment transaction is handled by the partner)

Example value: mc

totaalprijs
required

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)
optional

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.

Example request

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"}

Example response

{
    "data": {
        "voucher_url": "https://247parking.nl/voucher.php?id=123abc123abc123abc123abc",
        "reserveringsnummer": "S123456",
        "totaalprijs": "39.99"
    },
    "meta": {
        "status": "success",
        "code": 200,
        "message": "Booking updated"
    }
}

PUT /reservering/:resnr/status/

Update the status of an existing reservation in the 247Parking platform.

Resource URL

https://api.247parking.nl/v1/reservering/:resnr/status/

Resource Information

Response formatJSON
Requires authentication?Yes

Parameters

status
required

The new status of a reservation:
- active
- canceled
- deleted
- noshow

Example value: noshow

Example request

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"}

Example response

{
  "data": {
    "reserveringsnummer": "S123456"
  },
  "meta": {
    "status": "success",
    "code": 200,
    "message": "Booking status is updated to noshow"
  }
}