Booking
POST
/api/v1/generic-api-service/royal/book
The booking endpoint is used to complete the reservation.
- Request
- Response
- Request Details
- Response Details
{
"contact": {
"name": "Etscore",
"surname": "Test",
"phoneCountryCode": "+90",
"phoneNumber": "5555555555",
"email": "[email protected]"
},
"roomSearchId": "1ca0b3e8-ff7e-455e-97a1-c2f201f1c0c5",
"checkIn": "2023-05-18",
"checkOut": "2023-05-21",
"hotelCode": "sxp0727y0bu6",
"payment": {
"paymentType": "CASH_EUR",
"price": "2821.50",
"currency": "EUR"
},
"guests": [
{
"name": "Etscore",
"surname": "Test",
"birthDate": "1990-09-13",
"email": "[email protected]",
"nationality": "TR",
"phoneNumber": "5555555555",
"phoneCountryCode": "+90",
"gender": "MALE",
"type": "ADULT"
}
],
"priceCode": "56661|sxp0727y0bu6|34|2023-05-18|2023-05-21|2|Sales|29o2cd1wxnlc0a8xizr29sew8gqh599j6|1sy7nz36og9vze4yway2uowfel4yg2t06",
"additionalInfo": "additional info",
"clientReferenceId": "7y0y0bu"
}
{
"success":true,
"bookingNumber":"111951492",
"voucher":"ETSR341224736",
"createdAt":"2023-04-25T15:27:10.719187",
"checkin":"2023-05-18",
"checkout":"2023-05-21",
"hotelCode":"sxp0727y0bu6",
"destinations":[
{
"id":631,
"type":"COUNTRY",
"typeId":0,
"name":"United States"
},
{
"id":104369,
"type":"CITY",
"typeId":0,
"name":"Forsyth"
},
{
"id":98951,
"type":"TOWN",
"typeId":0,
"name":"Macon"
},
{
"id":104369,
"type":"CITY",
"typeId":0,
"name":"Forsyth"
}
],
"salesTime":"2023-04-25T15:27:18",
"price":"2821.50",
"agencyCommission": "0.48",
"currency":"EUR",
"isRefundable":true,
"cancellationPolicies":[
{
"amount": 0.0,
"currency": "EUR",
"toDate": "2023-09-05T12:00:00",
"fromDate": "2023-07-13T12:10:47.956938"
},
{
"amount": 500.0,
"currency": "EUR",
"toDate": "2023-09-10T12:00:00",
"fromDate": "2023-09-05T12:00:00"
},
{
"amount": 1000.0,
"currency": "EUR",
"toDate": "2023-09-15T12:00:00",
"fromDate": "2023-09-10T12:00:00"
}
],
"room":[
{
"pax":{
"adult":2,
"child":1,
"childAges":[
]
},
"roomCode":"3300011",
"roomName":"Standart Room",
"mealType":"Bed and Breakfast",
"confirmationCode":"547523359"
"nightlyPrices":[
{
"date":"2023-05-20",
"amount":940.5,
"currency":"EUR"
},
{
"date":"2023-05-21",
"amount":940.5,
"currency":"EUR"
},
{
"date":"2023-05-22",
"amount":940.5,
"currency":"EUR"
}
],
"roomType":"BB"
}
],
"taxes":[
{
"type":"tax_and_service_fee",
"price":38.13,
"currency":"EUR",
"description":"tax and service fee",
"included":true
}
],
"fees":[
{
"type":"hotel_fee",
"price":10.2,
"currency":"EUR",
"description":"hotel fee",
"included":true
}
],
"additionalInfo":"additional info",
"guests":[
{
"name":"Etscore",
"surname":"Test",
"birthDate":"1990-09-13",
"email":"[email protected]",
"nationality":"TR",
"phoneNumber":"5555555555",
"phoneCountryCode":"+90",
"gender":"MALE",
"type":"ADULT",
"guidId":"ab9ffd1f-74d5-4e58-b38f-39c1d0525c9c"
}
],
"contact":{
"name":"Etscore",
"surname":"Test",
"phoneNumber":"5555555555",
"phoneCountryCode":"+90",
"email":"[email protected]"
},
"clientReferenceId": "7y0y0bu"
}
Name | Type | Required | Description |
---|---|---|---|
contact | object-array | Yes | The information of the reservation's contact person must be sent in this object. |
contact/name | string | Yes | Name of the reservation's contact person must be in this field. |
contact/surname | string | Yes | Surname of the reservation's contact person must be in this field. |
contact/phoneCountryCode | string | Yes | Phone code number of the reservation's contact person, which is in the list of International phone codes must be in this field. |
contact/phoneNumber | string | Yes | Phone number of the reservation's contact person must be in this field. |
contact/email | string | Yes | Email of the reservation's contact person must be in this field. |
roomSearchId | string | Yes | The parameter that will allow us to get which room the user has chosen from the cache when user wants to complete the reservation. |
checkIn | string | Yes | 'checkIn' parameter refers to the day of check-in to the hotel. It should be sent in the format 'YYYY-MM-DD'. |
checkOut | string | Yes | 'checkout' parameter refers to the day of departure from the hotel. It should be sent in YYYY-MM-DD format. The date to be sent in the checkout parameter must be after the date to be sent in the checkin parameter. |
hotelCode | string | Yes | Code of the hotel that guest(s) will accommodate for the reservation. |
payment | object-array | Yes | Payment information must be in payment object. |
payment/paymentType | object-array | Yes | Payment type in Etstur structure |
payment/price | string | Yes | Payment price |
payment/currency | string | Yes | Payment currency. It must be sent in ISO 4217 format. |
guests | object-array | Yes | This object must provide information about the guests staying in the reservation. |
guests/name | string | Yes | Guest's name |
guests/surname | string | Yes | Guest's surname |
guests/birthDate | string | Yes | Guest's birthDate. It should be sent in the format 'YYYY-MM-DD'. |
guests/email | string | Yes | Guest's email address |
guests/nationality | string | Yes | The country of the guest who will be included in the reservation. It must be sent as a 2-digit country code. |
guests/phoneNumber | string | Yes | Guest's phone number |
guests/phoneCountryCode | string | Yes | Phone code number of the guest, which is in the list of International phone codes must be in this field. |
guests/gender | string | Yes | Guest's gender |
guests/type | string | Yes | Information whether the guest is an adult or a child |
priceCode | string | Yes | Unique value generated for that price in each room search. The validity period of the price code is 30 minutes. |
additionalInfo | string | No | If there is an additional information to be sent to the hotel during the completion of reservation, it must be sent in this field. |
clientReferenceId | string | No | [ 1 .. 20 ] characters. Internal booking reference. |
Name | Type | Required | Description |
---|---|---|---|
success | bool | Yes | Information about whether the reservation is completed successfully. It will return True if the reservation is completed, and False when an error is received. |
bookingNumber | string | Yes | Booking number that will be created in our system when the reservation is completed successfully |
voucher | string | Yes | Voucher number that will be created in our system when the reservation is completed successfully |
createdAt | string | Yes | This is the time when the reservation is complete.. It should be sent in the format 'YYYY-MM-DD hh:mm:ss tt' |
checkIn | string | Yes | 'checkIn' parameter refers to the day of check-in to the hotel. It should be sent in the format 'YYYY-MM-DD'. |
checkOut | string | Yes | 'checkout' parameter refers to the day of departure from the hotel. It should be sent in YYYY-MM-DD format. The date to be sent in the checkout parameter must be after the date to be sent in the checkin parameter. |
hotelCode | string | Yes | It is the code of the hotel that the reservation is made. |
destinations | object-array | Yes | The destinations where the hotel is located are placed in the 'destinationCode' object. |
destinations/id | int | Yes | Destination id in Etstur structure. |
destinations/type | string | Yes | Destination type in Etstur structure. |
destinations/typeId | int | Yes | Destination typeId in Etstur structure. |
destinations/name | string | Yes | Destination name in Etstur structure. |
salesTime | string | Yes | The time that the sale is completed. It should be sent in the format 'YYYY-MM-DD hh:mm:ss tt' |
price | decimal | Yes | Total price of the reservation. |
agencyCommission | decimal | Yes | The commission of the reservation. |
currency | string | Yes | Currency in which the reservation price will be displayed. It must be sent in ISO 4217 format. |
isRefundable | boolean | Yes | Information about whether the reservation is cancelled. Refundable if it is True, nonrefundable if it is False. |
cancellationPolicies | object-array | No | Object to return information for cancellation policies. |
cancellationPolicies/amount | decimal | No | Penalty amount to be paid |
cancellationPolicies/currency | string | No | Penalty amount currency to be paid |
cancellationPolicies/toDate | string | No | |
cancellationPolicies/fromDate | string | No | |
room | object-array | Yes | It is the information of the room that was reserved. Currently, only 1 room can be reserved per 1 reservation. When the multi-room feature is provided, it will be seen in the document. |
room/pax | object-array | Yes | The number of people about the reserved room should be included in this object. |
room/pax/adult | int | Yes | The number of adults that will be accommodated. |
room/pax/child | int | No | The number of children that will be accommodated. |
room/pax/childAges | int-array | No | If there are children in the reservation, ages of the children must be in this parameter |
room/roomCode | string | Yes | Room code in Etstur structure. |
room/roomName | string | Yes | Room name in Etstur structure. |
room/mealType | string | Yes | Meal type in Etstur structure. |
room/description | string | No | Room description in Etstur structure. |
room/confirmationCode | string | Yes | Parameter to use when canceling a Refundable reservation. |
room/nightlyPrices | object-array | Yes | An object that allows the room's nightly prices to be displayed separately. and Price must be big decimal type. |
room/nightlyPrices/date | string | Yes | Date of the day, date format must be YYYY-MM-DD |
room/nightlyPrices/amount | decimal | Yes | Price amount of the day |
room/nightlyPrices/currency | string | Yes | Information in which currency the reservation amount is in is returned with the 'currency' parameter. |
room/roomType | string | Yes | Room type in Etstur structure. |
room/taxes | object-array | No | If there is a tax related to accommodation, it will be included in this field. |
room/taxes/type | string | No | Tax type |
room/taxes/price | decimal | No | Tax amount |
room/taxes/currency | string | No | Tax currency |
room/taxes/description | string | No | Tax description |
room/taxes/included | boolean | No | Information whether the tax price is included in the total amount. Included if it is True and not included if it is False. |
room/fees | object-array | No | If there is an extra fee related to accommodation, it will be included in this field. |
room/fees/type | string | No | Fee type |
room/fees/price | decimal | No | Fee amount |
room/fees/currency | string | No | Fee currency |
room/fees/description | string | No | Fee description |
room/fees/included | boolean | No | Information whether the extra fee is included in the total amount. Included if it is True and not included if it is False. |
guests | object-array | Yes | This object must provide information about the guests staying in the reservation. |
guests/name | string | Yes | Guest's name |
guests/surname | string | Yes | Guest's surname |
guests/birthDate | string | Yes | Guest's birthDate. It should be sent in the format 'YYYY-MM-DD'. |
guests/email | string | Yes | Guest's email address |
guests/nationality | string | Yes | The country of the guest who will be included in the reservation. It must be sent as a 2-digit country code. |
guests/phoneNumber | string | Yes | Guest's phone number |
guests/phoneCountryCode | string | Yes | Phone code number of the guest, which is in the list of International phone codes must be in this field. |
guests/gender | string | Yes | Guest's gender |
guests/type | string | Yes | Information whether the guest is an adult or a child |
guests/guidId | string | Yes | Unique id that will be generated by us for each guest |
contact | object-array | Yes | The information of the reservation's contact person must be sent in this object. |
contact/name | string | Yes | Name of the reservation's contact person must be in this field. |
contact/surname | string | Yes | Surname of the reservation's contact person must be in this field. |
contact/phoneCountryCode | string | Yes | Phone code number of the reservation's contact person, which is in the list of International phone codes must be in this field. |
contact/phoneNumber | string | Yes | Phone number of the reservation's contact person must be in this field. |
contact/email | string | Yes | Email of the reservation's contact person must be in this field. |
clientReferenceId | string | No | [ 1 .. 20 ] characters. Internal booking reference. |