API documentation

Create Parking Access Request

POST /api/car_driver/requests

Include access_token in HTTP header:

Authorization: Bearer 09ba487fc3df...

Description

This web service creates an access request for an user to enter a parking in a certain period of time
This request must be accepted by the Parking Owners in order to be used.

REQUEST PARAMETERS

Parameter name Parameter type Description
secured_parking_id int id of the parking
start_time datetime start_time of invitation(between start and end the user can enter that parking)
end_time datetime end-time of the invitation(between start and end the user can enter that parking)
description string description of the invitation
{ "smart_key" : 
    {
        "secured_parking_id" : "101",
        "start_time" : "2014-07-15 12:00",
        "end_time" : "2014-07-25 18:00",
        "description" : "bla"
    }

}

Response

Status Code: 200 if OK

{ "smart_key" : 
    {
         "secured_parking_id" : "101",
         "start_time": "2014-07-15T09:00:00Z",
         "end_time": "2014-07-25T15:00:00Z",
         "description" : "description of the request"
         "name" : "name of the parking"
    }

}
Parameter name Parameter type Description
name string name of the parking
description string Description of the access key invitation or request
secured_parking_id int id of the parking
start_time DateTime the start time from which the access command will work
end_time DateTime the end time from which the access command will work

OR (if something went wrong)

Status Code: 404 if parking does not exit

Status Code: 401 if request not ok