Book Rate
Introduction
Perform booking by providing occupancy and payment information for any selected rate specified by the rate key.
Definition
1 | POST https://api.ratemarkt.com/v1/bookrate |
Query Object
Argument | Type | Required | Description |
---|---|---|---|
clientRef |
string |
yes | Unique transaction identifier defined by client. It is required for avoiding dupe bookings or querying missing bookings |
holder |
object[Holder] |
yes | Holder information who places the booking |
Holder.firstName |
string |
yes | Holder's first name |
Holder.lastName |
string |
yes | Holder's last name |
Holder.email |
string |
no | Holder's email address |
Holder.phone |
string |
no | Holder's phone number |
occupancies |
list[Occupancy] |
yes | Information about the occupants those will accomodate at the booked rooms. |
Occupancy.occupants |
list[Occupant] |
yes |
List of Occupant objects.The number of occupants can not be more the number of pax information of the matching room object. Each occupant should be declared by their name and age information. |
Occupant.firstName |
string |
yes | Occupant's first name |
Occupant.lastName |
string |
yes | Occupant's last name |
Occupant.age |
integer |
yes | Occupant's age |
Occupant.occupantType |
string |
yes |
Type of occupant. It can either be the value of ADULT or CHILD .
|
Occupancy.room |
object[Room] |
yes | Room object containing the only value of its sequence number |
Room.sequence |
integer |
yes | Room's sequence number. It is required for matching occupancy information with a room |
creditCard |
object[CreditCard] |
no | Credit card information used for either for DIRECT type rates or online payment required rates. |
CreditCard.firstName |
string |
yes | Card holder's first name |
CreditCard.lastName |
string |
yes | Card holder's last name |
CreditCard.number |
string |
yes | 16 digit credit card number |
CreditCard.year |
string |
yes | 4 digit year identifier. E.g 2025 |
CreditCard.month |
string |
yes | 2 digit year identifier. E.g 12 |
CreditCard.cvv |
string |
yes | Credit card verification number |
specialRequest |
string |
no | Special requests asked by the holder |
Example Query Object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | { "rateKey": "[Q9k|3|USD|US|[[2|[]]]]_[AJ62Fw|ANMdEg|NET|0|Prabrg|[jVOYrg|2|0]]", "clientRef": "qwerty123456", "holder": { "email": "[email protected]", "firstName": "john", "lastName": "doe", "phone": "+415050000000" }, "creditCard": { "firstName": "John", "lastName": "Doe", "number": "4111111111111111", "year": "2022", "month": "12", "cvv": "000" }, "occupancy": [ { "room": { "sequence": 1 }, "occupants": [ { "firstName": "john", "lastName": "doe", "occupantType": "ADULT", "age": 35 }, { "firstName": "alice", "lastName": "wonder", "occupantType": "ADULT", "age": 33 } ] } ] } |
Result Object
Argument | Type | Nullable | Description |
---|---|---|---|
Result.booking |
object[Booking] |
no | Booking object |
Booking.status |
string |
no |
Flag indicating the current status of the booking. Available values are:
|
Booking.bookingRef |
string |
no | Unique booking identifier |
Booking.clientRef |
string |
no | Unique booking identifier issued by the client |
Booking.rateKey |
string |
no | Unique rate identifier |
Booking.hotelCode |
string |
no | Unique hotel identifier |
Booking.hotelName |
string |
no | Hotel name |
Booking.destinationCode |
string |
no | Unique destination identifier |
Booking.destinationName |
string |
no | Destination name |
Booking.countryCode |
string |
no | Two letter country code (ISO 3166-1 alpha-2) |
Booking.checkin |
string |
no | YYYY-MM-DD (ISO 8601) formatted date string. Eg. 2017-11-12 |
Booking.checkout |
string |
no | YYYY-MM-DD (ISO 8601) formatted date string. Eg. 2017-11-12 |
Booking.holder |
object[Holder] |
no | Holder object contains information who places the booking |
Holder.firstName |
string |
yes | Holder' s first name |
Holder.lastName |
string |
yes | Holder' s last name |
Holder.email |
string |
no | Holder' s email address |
Holder.phone |
string |
no | Holder' s phone number |
Booking.occupancies |
list[Occupancy] |
no | Occupancy object contains information of individual occupants who will accomodate in the specified room. |
Occupancy.occupants |
list[Occupant] |
no | List of Occupant objects contains information about personal occupant information. |
Occupant.occupantType |
string |
no | Occupant type. Value can be either ADULT or CHILD |
Occupant.firstName |
string |
no | Occupant's first name |
Occupant.lastName |
string |
no | Occupant's last name |
Occupant.age |
integer |
no | Occupant's age |
room |
object[Room] |
no | Room object |
Room.numberOfAdults |
integer |
no | Number of adults can fit into the room |
Room.childrenAges |
integer |
no | Children with specified ages can be accepted for this room. |
Room.roomDescription |
integer |
no | Room description describing the type of room. |
Room.sequence |
integer |
no | Identifies the selected room for specified occupants. |
Booking.creationDate |
integer |
no | Offset date time string in YYYY-MM-DDThh:mmTZD (ISO 8601) format indicating when the booking made. |
Booking.total |
decimal |
no | Total amount of booked rate in specified currency in Booking.currency field |
Booking.currency |
string |
no | Two letter country code (ISO 3166-1 alpha-2) of the amount for booked rate. |
Booking.cancellationCost |
decimal |
yes | Charged penalty amount when the booking is cancelled. If no penalty charged, this value should be 0.00 |
Booking.balance |
decimal |
no |
if booking cancelled and any penalty applied, this field indicates the final amount after the penalty amount deducted from total amount.
If booking is not cancelled this field should be equal to Booking.total amount.
|
Booking.specialRequest |
string |
no | Special requests asked by the holder |
Booking.rateKey |
string |
no | Unique identifier of the booked rate. Refer to Check Rate documentation for further information. |
Booking.rateType |
string |
no | Type of booked rate. Refer to Check Rate documentation for further information. |
Booking.boardType |
string |
no | Board type code of booked rate. Refer to Check Rate documentation for further information. |
Booking.boardName |
string |
no | Board type name of booked rate. Refer to Check Rate documentation for further information. |
Booking.nonrefundable |
string |
no | Flag indicating wheter the booking is refundable or not. Refer to Check Rate documentation for further information. |
Booking.cancellationPolicies |
list[CancellationPolicy] |
no | List of CancellationPolicy objects.Refer to Check Rate documentation for further information. |
Booking.commission |
decimal |
yes | Amount of comission specified for commissionable rates. Refer to Check Rate documentation for further information. |
Booking.hotelRate |
decimal |
yes | Total amount of booking should be payed at hotel. Refer to Check Rate documentation for further information. |
Booking.hotelCurrency |
string |
yes | Currency value for Booking.hotelRate .Refer to Check Rate documentation for further information. |
Booking.remarks |
string |
yes | Comments from hotelier related to your booking. Refer to Check Rate documentation for further information. |
Example Result Object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | { "booking": { "status": "CONFIRMED", "bookingRef": "55cda9", "clientRef": "qwerty123456", "hotelCode": "d31d12", "checkin": "2017-07-22", "checkout": "2017-07-25", "holder": { "firstName": "john", "lastName": "doe", "email": "[email protected]", "phone": "+415000000" }, "occupancies": [ { "occupants": [ { "occupantType": "ADULT", "age": null, "firstName": "john", "lastName": "doe" }, { "occupantType": "ADULT", "age": null, "firstName": "alice", "lastName": "wonder" } ], "room": { "numberOfAdults": 2, "childrenAges": [], "roomDescription": "DOUBLE DELUXE CITY VIEW", "sequence": 1 } } ], "creationDate": "2017-05-17T12:00:00Z", "rateType": "NET", "boardType": "RO", "boardName": "Room Only", "cancellationPolicies": [ { "amount": 174.13, "fromDate": "2017-07-19T23:59:00+03:00" } ], "total": 585.08, "currency": "EUR", "balance": 522.39, "rateKey": "[Q9k|3|USD|US|[[2|[]]]]_[AJ62Fw|ANMdEg|NET|0|Prabrg|[jVOYrg|2|0]]", "hotelName": "The Marmara Taksim", "destinationCode": "c36ca9", "destinationName": "istanbul", "countryCode": "TR", "nonrefundable": false, "cancellationCost": 0, "commission": null, "hotelRate": null, "hotelCurrency": null, "specialRequest": null, "remarks": "Check-in hour 15:00" } } |