API documentation

Create Parking Invitation

POST /api/car_driver/invitations

Include access_token in HTTP header:

Authorization: Bearer 09ba487fc3df...

Description

This web service creates an invitation for an email to enter a parking in a certain period of time

REQUEST PARAMETERS

Parameter name Parameter type Description
secured_parking_id int id of the parking
email string email of the person who was invited
start_time datetime start_time of invitation of type short_access(between start and end the user can enter that parking)
end_time datetime end_time of the invitation of type short_access(between start and end the user can enter that parking)
description string description of the invitation
type string type of the invitation('permanent_access', 'short_acess', 'owner_access'); optional
{ "smart_key" : 
    {
        "secured_parking_id" : "100",
        "email" : "iulia.sincai@gmail.com",
        "start_time" : "2014-07-15 12:00",
        "end_time" : "2014-07-25 18:00",
        "description" : "bla"
    }

}

Response

Status Code: 200 if OK

{
  "name": "Test x",
  "description": "bla",
  "start_time": "2014-07-15T09:00:00Z",
  "end_time": "2014-07-25T15:00:00Z",
  "access_command": "20331db528ff39c9ce63257137d54316a22937f7a143940dd0e7f46ce4a1b8d0d403",
  "access_points": [
    "access_point" : {
          "module_id" : 6,
          "mac_address" : "00:07:80:15:3A:07"
    }
  ]
}
Parameter name Parameter type Description
name string name of the parking
description string Description of the access key invitation or request
access_command string command to be sent in order to open the barrier
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
access_points list of objects list of access point objects
access_point object object containing information about an access point
module_id in the id of the access point module
mac_address string the mac address of the access point module(must be matched with the address received by bluetooth)

OR (if something went wrong)

Status Code: 404 if parking does not exit

Status Code: 401 if request not ok