API documentation

Authentication

PARKING+PLUS implements the OAuth 2.0 standard for secure authentication and authorization.
For using PARKING+PLUS web services you will need to follow the three-legged OAuth 2.0 flow in order to obtain an access_token.

API TOKEN AUTHENTICATION

In order to access protected resources you can pass your API Token, called an access_token. This must be passed as an Authorization header with type Bearer.

Authorization: Bearer access_token

Step 1. CLIENT APP ID

In order to receive the client app id and the client secret for the OAuth application authorization you need to contact us at: PARKING+PLUS contact

In the Topic section please select "Business Opportunity".
Please provide us with a valid email address and phone number.
In the description field enter the name of your application, and a few details about it.
After you submit the form you will be contacted shortly by email or phone and you will receive a custom "client_app_id" and "client_secret".

Step 2. REGISTRATION

In order to use most of the web services provided by PARKING+PLUS, you need to create a user account using the Registration web service.

Example:

POST /api/car_driver

{
  "api_car_driver_fo_user": {
    "email": "your_email",
    "password": "password",
    "password_confirmation": "password_confirmation",
    "first_name": "first_name",
    "last_name": "last_name",
    "phone": "phone_number"
  },
  "client_app_id": "client_app_id",
  "client_secret": "client_secret"
}
Parameter name Parameter type Description
api_car_driver_fo_user object car driver user object
email string email of the user
password string password of the user
password_confirmation string password confirmation of the user
first_name string first name of the user
last_name string last name of the user
phone string phone number of the user
client_app_id string application id provided by PARKING+PLUS
client_secret string application secret provided by PARKING+PLUS
After this step you can use your email and password to login into the application.
*Alternatively, you can skip this step by asking us to create a valid account for you.

Step 3. AUTHENTIFICATION

Once you have created an account, use the Login web service to receive the "access_token" that you can use for the rest of the web services.

Example:

POST /api/oauth/token

{
  "grant_type"    : "password",
  "username"      : "user@example.com",
  "password"      : "sekret",
  "client_app_id" : "the_client_app_id",
  "client_secret" : "the_client_secret"
}
Parameter name Parameter type Description
grant_type string type of login strategy (only 'password' accepted)
username string email of the user
password string password of the user
client_app_id string application id provided by the PARKING+PLUS
client_secret string application secret provided by PARKING+PLUS

Response

{
  "access_token": "1f0af717251950dbd4d73154fdf0a474a5c5119adad999683f5b450c460726aa",
  "refresh_token": "ds0af717251950dbd4d73eefdf0a474a5c5119adad9993332f5b4fdsc4607266tgy"
  "token_type": "bearer",
  "expires_in": 7200
}
The access_token received should then be used in subsequent requests for authorization by including it into the HTTP header like in the example below.
Authorization: Bearer access_token