Booking (prepaymentCard)
POST {{secure_endpoint}}/hotel-api/1.0/bookings
Standard Booking operation. In 'examples' you can find different cases of requests and responses.
Request Body
{"holder"=>{"name"=>"HolderFirstName", "surname"=>"HolderLastName"}, "rooms"=>[{"rateKey"=>"20190615|20190616|W|1|1533|DBL.ST|CG BAR RO|RO||1~2~0||N@03DE28CA7DB742F1542362926996AAES0000008000000000725fb2", "paxes"=>[{"roomId"=>1, "type"=>"AD", "name"=>"First Adult Name", "surname"=>"Surname"}, {"roomId"=>1, "type"=>"AD", "name"=>"Second Adult Name", "surname"=>"Surname"}]}], "clientReference"=>"IntegrationAgency", "remark"=>"Booking remarks are to be written here.", "tolerance"=>2, "paymentData"=>{"paymentCard"=>{"cardHolderName"=>"CardHolderName", "cardType"=>"VI", "cardNumber"=>"4444333322221111", "expiryDate"=>"0320", "cardCVC"=>"123"}, "contactData"=>{"email"=>"integration@hotelbeds.com", "phoneNumber"=>"654654654"}, "billingAddress"=>{"address1"=>"Cambridge Science Park", "address2"=>"Milton Road", "city"=>"Cambridge", "state"=>"Cambridgeshire", "postalCode"=>"CB4 0FZ", "countryCode"=>"GB"}, "webPartner"=>"1", "device"=>{"id"=>"abcd", "ip"=>"123.12.12.12.21"}}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Api-key | string | API Key used in the request | |
X-Signature | string | SHA256 hash in Hex format from your API Key, your secret plus current timestamps in seconds | |
Accept | string | Defines response format, posible values: application/xml, application/json | |
Accept-Encoding | string | Defines type of encoding used on the data | |
Content-Type | string | Defines request format, posible values: application/xml, application/json |