/booking/ - CreateBooking
POST {{host}}/booking/
A request that allows you to create a booking within the Booking API.
Note that the email
and phone
parameters within the booking payload are optional. Removing them will mean the booking API will not make a call to the Message API.
Authorisation
To use this request you must be authorised.
Authorisation is achieved by creating a Cookie
header with the value token=abc123
. To get a valid token, you send a request to POST /auth
using the Auth
API in restful-booker-platform.
Simply run the request once with the default credentials to have Qodex add a token
to the Cookies manager.
Request Body
{"roomid"=>1, "firstname"=>"James", "lastname"=>"Dean", "depositpaid"=>true, "email"=>"test@email.com", "phone"=>"07123456789", "bookingdates"=>{"checkin"=>"2020-02-01", "checkout"=>"2020-02-05"}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
accept | string | ||
Content-Type | string |