API documentation

Create Booking without Payment V1

When a SecuredParking is configured for Bookings without Payment, the Booking is created and then a Confirm Booking request needs to be sent to the server to confirm it.

POST /api/car_driver/smart_keys/create_booking

Include access_token in HTTP header:

Authorization: Bearer 09ba487fc3df...

REQUEST PARAMETERS

Parameter name Parameter type Description
return_url string only used when Bookings are with Payment
secured_parking_id int id of the parking on what the user does the booking
smart_key object object containing the booking form data
start_time datetime start_time of booking
end_time datetime end-time of the booking
email string the email of the user
description string this is optional
{
  "return_url" : "aHR0cHM6Ly93d3cuZXhhbXBsZS5jb20v",
  "smart_key" : {
    "email" : "email@example.com",
    "start_time" : "2015-04-28 15:00:00",
    "end_time" : "2015-04-28 17:00:00",
    "secured_parking_id" : 187,
    "description" : "description text"
  }
}

Response

Status Code: 201 if OK

{
  "smart_key": {
    "id": 12,
    "secured_parking_id": 1756,
    "name": "name",
    "description": "description text",
    "start_time": "2014-10-10T10:33:19Z",
    "end_time": "2014-10-10T12:03:19Z",
    "duration_minutes": 90,
    "price": "3.0",
    "currency": "RON",
    "type": "actual",
    "with_payment": false
  }
}

Response parameters

Parameter name Parameter type Description
smart_key object object containing information about the booking created
id int id of the payment
secured_parking_id int ...
name string the name of the secured_parking
description string description of the booking
start_time string parking start time
end_time string parking end time
duration_minutes int desired duration for the parking in minutes
price string price of the parking
currency string currency configured on the parking
type string one of: actual/past/future
with_payment boolean whether Bookings are with Payment