XML Documentation
About Documentation
- Version: 1.0
- Creation Date: 07-07-2025
- Last Update: 07-07-2025
- Created by: Karnak IT Department
- Contact: it@karnaktravel.com.tr
GetPrice
This method allows you to get the total price, room type and boarding house code according to the information entered. To get this data, hotel id, room type id (room name id), adult number, child number and ages, check-in and check-out dates are required.
You can access the data by requesting both with the form and with the xml query. The data is transmitted in XML format.
XML Structure
Request parameters
| Elements |
Type |
Description |
<GetPriceRequest> |
|
Root Element |
<room_count_select> |
int |
Number of queries at a time (maximum 3) |
<Room> |
|
Represents a each room |
<HotelId> |
int |
Hotel id |
<RoomTypeId> |
int |
Room id |
<AdultNumber> |
int |
Adult number |
<ChildNumber> |
int |
Child number |
<ChildAgeX> |
int |
Child age |
<StartDate> |
string (YYYY-MM-DD) |
Check-in date |
<EndDate> |
string (YYYY-MM-DD) |
Check-out date |
Response parameters
| Elements |
Description |
<GetPrices> |
Root Element |
<XRoomGetPriceResponse> |
Represents each room |
<Checkin> |
Check-in date |
<Checkout> |
Check-out date |
<HotelName> |
Hotel name |
<RoomName> |
Room name |
<RoomType> |
Room type (SINGLE, DOUBLE, 1PAX+2 Chd ...) |
<PensionCode> |
Pension code |
<AdultNumber> |
Adult number |
<ChildNumber> |
Child number |
<XChildAge> |
Child age |
<TotalPrice> |
Total price |
<CurrencySymbol> |
Currency symbol |
<CurrencyName> |
Currency name |
<status> |
Response status |
TEST XML Request and Response
XML REQUEST
<?xml version="1.0" encoding="UTF-8"?>
<GetPriceRequest>
<room_count_select>3</room_count_select>
<Room>
<HotelId>100</HotelId>
<RoomTypeId>10</RoomTypeId>
<AdultNumber>1</AdultNumber>
<ChildNumber>1</ChildNumber>
<ChildAge1>11</ChildAge1>
<StartDate>2025-09-01</StartDate>
<EndDate>2025-09-06</EndDate>
</Room>
<Room>
<HotelId>200</HotelId>
<RoomTypeId>20</RoomTypeId>
<AdultNumber>1</AdultNumber>
<ChildNumber>2</ChildNumber>
<ChildAge1>11</ChildAge1>
<ChildAge2>9</ChildAge2>
<StartDate>2025-09-10</StartDate>
<EndDate>2025-09-12</EndDate>
</Room>
<Room>
<HotelId>300</HotelId>
<RoomTypeId>30</RoomTypeId>
<AdultNumber>2</AdultNumber>
<ChildNumber>1</ChildNumber>
<ChildAge1>1</ChildAge1>
<ChildAge2>9</ChildAge2>
<StartDate>2025-09-20</StartDate>
<EndDate>2025-09-24</EndDate>
</Room>
</GetPriceRequest>
XML RESPONSE
<GetPrices>
<firstRoomGetPriceResponse>
<Checkin>2025-09-01</Checkin>
<Checkout>2025-09-06</Checkout>
<HotelName>TEST HOTEL 1</HotelName>
<RoomName>TEST ROOM 1</RoomName>
<RoomType>SINGLE+1 Chd</RoomType>
<PensionCode>BB</PensionCode>
<AdultNumber>1</AdultNumber>
<ChildNumber>1</ChildNumber>
<firstChildAge>11</firstChildAge>
<TotalPrice>1150</TotalPrice>
<CurrencySymbol>€</CurrencySymbol>
<CurrencyName>EURO</CurrencyName>
<status>success</status>
</firstRoomGetPriceResponse>
<secondRoomGetPriceResponse>
<Checkin>2025-09-10</Checkin>
<Checkout>2025-09-12</Checkout>
<HotelName>TEST HOTEL 2</HotelName>
<RoomName>TEST ROOM 2</RoomName>
<RoomType>SINGLE+2 Chd</RoomType>
<PensionCode>BB</PensionCode>
<AdultNumber>1</AdultNumber>
<ChildNumber>2</ChildNumber>
<firstChildAge>11</firstChildAge>
<secondChildAge>9</secondChildAge>
<TotalPrice>800</TotalPrice>
<CurrencySymbol>€</CurrencySymbol>
<CurrencyName>EURO</CurrencyName>
<status>success</status>
</secondRoomGetPriceResponse>
<thirdRoomGetPriceResponse>
<Checkin>2025-09-20</Checkin>
<Checkout>2025-09-24</Checkout>
<HotelName>TEST HOTEL 3</HotelName>
<RoomName>TEST ROOM 3</RoomName>
<RoomType>DOUBLE+1 Chd</RoomType>
<PensionCode>HB</PensionCode>
<AdultNumber>2</AdultNumber>
<ChildNumber>1</ChildNumber>
<firstChildAge>1</firstChildAge>
<TotalPrice>2080</TotalPrice>
<CurrencySymbol>€</CurrencySymbol>
<CurrencyName>EURO</CurrencyName>
<status>success</status>
</thirdRoomGetPriceResponse>
</GetPrices>
NOTES (IMPORTANT !)
- The test values are given above in the XML Request field. The dates (StartDate and EndDate) given for each room are minimum and maximum values.
- Price requests can be made for a maximum of 3 rooms at a time.
- The maximum number of children can be 4.
- The maximum age of the child can be 14.
- The minimum number of adult can be 1.
- StartDate and EndDate values cannot be past dates
MakeBooking
This service allows you to make a reservation that you find available from GetPrice.
To get this data, agency username , password, API key, room count, hotel id, room type id (room name id), adult number, child number and ages, adult and child informations(personal title, name, surname, passport numer) check-in and check-out dates are required. PhoneNumber, email, address and notes(for reservation) are optional.
You can access the data by requesting with the xml query. The data is transmitted in XML format.
XML Structure
Request parameters
| Elements |
Type |
Description |
<MakeBooking> |
|
Root Element |
<AgencyUsername> |
String |
Agency username |
<AgencyPassword> |
String |
Agency password |
<AgencyAPIkey> |
String |
Agency API key |
<RoomCountSelect> |
int |
Number of queries at a time (maximum 3) |
<Room> |
|
Represents a each room |
<HotelId> |
int |
Hotel id |
<RoomTypeId> |
int |
Room id |
<AdultNumber> |
int |
Adult number |
<ChildNumber> |
int |
Child number |
<Adults> |
string |
PersonalTitle_name_surname_AdultPassport |
<Childs> |
string |
name_surname_childAge_childPassport |
<StartDate> |
string (YYYY-MM-DD) |
Check-in date |
<EndDate> |
string (YYYY-MM-DD) |
Check-out date |
<Email> |
string |
Email |
<PhoneNumber> |
string |
Phone Number |
<Address> |
string |
Address |
<Notes> |
string |
Notes for booking |
Adults and Childs Tags (IMPORTANT !)
Adults Tag
- For two or more adults, you should use semicolon.
Mr_Phil_Dunphy_0000000000;Mrs_Claire_Dunphy_1111111111
- If you enter just one adult, you don't use semicolon.
- Be careful number of underscore. It must be three times for each adult.
- Don't forget to check the information after writing.
- A maximum of eight adults can be registered at a time.
- Adult Passport must be at least 10 alphanumeric characters (letters and numbers only).
Childs Tag
- For two or more childs, you should use semicolon.
Luke_Dunphy_5_3333333333;Haley_Dunphy_9_4444444444
- If you enter just one child, you don't use semicolon.
- Be careful number of underscore. It must be three times for each child.
- Don't forget to check the information after writing.
- A maximum of four childs can be registered at a time.
- Child Passport must be at least 10 alphanumeric characters (letters and numbers only).
Response parameters
| Elements |
Description |
<MakeBooking> |
Root Element |
<reservation_id> |
Reservation ID. This is very important because you will be able to view reservation details with this ID. Don't forget to save it. |
<message> |
Message |
<status> |
Request status |
TEST XML Request and Response
XML REQUEST
<?xml version="1.0" encoding="UTF-8"?>
<MakeBooking>
<AgencyUsername>Test</AgencyUsername>
<AgencyPassword>test2025+</AgencyPassword>
<AgencyAPIkey>f19065833731c465654f50f6c92b68f2</AgencyAPIkey>
<RoomCountSelect>1</RoomCountSelect>
<Room>
<HotelId>100</HotelId>
<RoomTypeId>10</RoomTypeId>
<AdultNumber>1</AdultNumber>
<ChildNumber>1</ChildNumber>
<Adults>Mr_Phil_Dunphy_0000000000</Adults>
<Childs>Haley_Dunphy_9_2222222222</Childs>
<StartDate>2025-09-01</StartDate>
<EndDate>2025-09-06</EndDate>
<Email>phil@karnak.com</Email>
<PhoneNumber>0000000000</PhoneNumber>
<Address>Los Angeles</Address>
<Notes>Dunphy Family</Notes>
</Room>
</MakeBooking>
XML RESPONSE
<MakeBooking>
<reservation_id>1</reservation_id>
<message>record saved successfully</message>
<status>success</status>
</MakeBooking>
GetDetailBooking
This service allows you to get reservation details.
To get this data, agency username , password, API key and reservation id are required. You can access the data by requesting with the xml query. The data is transmitted in XML format.
XML Structure
Request parameters
| Elements |
Type |
Description |
<DetailBooking> |
|
Root Element |
<AgencyUsername> |
String |
Agency username |
<AgencyPassword> |
String |
Agency password |
<AgencyAPIkey> |
String |
Agency API key |
<ReservationId> |
int |
The Reservation ID you received from the MakeBooking |
Response parameters
| Elements |
Description |
<DetailBooking> |
Root Element |
<RoomsInformation> |
contains information about each room |
<XRoom> |
Each room |
<ReservationDate> |
the date of registration |
<HotelName> |
Hotel name |
<RoomName> |
Room name |
<Checkin> |
Check-in date |
<Checkout> |
Check-out date |
<Price> |
Total price of room |
<AdultNumber> |
Adult number |
<ChildNumber> |
Child number |
<TotalPrice> |
Total price of the all rooms |
<GuestsInformation> |
contains information about Guests |
<XRoomGuests> |
information about the guests of each room |
<XAdult> |
information of each adult |
<AdultName> |
Adult name |
<AdultPassportNumber> |
Adult passport number |
<XChild> |
information of each child |
<ChildName> |
Child name |
<ChildAge> |
Child age |
<ChildPassportNumber> |
Child passport number |
<PhoneNumber> |
Phone Number |
<Email> |
Email |
<Address> |
Address |
<Notes> |
Notes for booking |
<CancellationStatus> |
If CancellationStatus is 1, the reservation has been cancelled.
If CancellationStatus is 0, the reservation has not been cancelled. |
TEST XML Request and Response
XML REQUEST
<?xml version="1.0" encoding="UTF-8"?>
<DetailBooking>
<AgencyUsername>Test</AgencyUsername>
<AgencyPassword>test2025+</AgencyPassword>
<AgencyAPIkey>f19065833731c465654f50f6c92b68f2</AgencyAPIkey>
<ReservationId>1</ReservationId>
</DetailBooking>
XML RESPONSE
<DetailBooking>
<RoomsInformation>
<firstRoom>
<ReservationDate>2025-08-06 17:06:59</ReservationDate>
<HotelName>TEST HOTEL 1</HotelName>
<RoomName>TEST ROOM 1</RoomName>
<Checkin>2025-09-01</Checkin>
<Checkout>2025-09-06</Checkout>
<Price>1150 EURO</Price>
<AdultNumber>1</AdultNumber>
<ChildNumber>1</ChildNumber>
</firstRoom>
<TotalPrice>1.150,00 EURO</TotalPrice>
</RoomsInformation>
<GuestsInformation>
<firstRoomGuests>
<firstAdult>
<AdultName>Mr Phil Dunphy</AdultName>
<AdultPassportNumber>0000000000</AdultPassportNumber>
</firstAdult>
<firstChild>
<ChildName>Child Haley Dunphy</ChildName>
<ChildAge>9</ChildAge>
<ChildPassportNumber>2222222222</ChildPassportNumber>
</firstChild>
<PhoneNumber>0000000000</PhoneNumber>
<Email>phil@karnak.com</Email>
<Address>Los Angeles</Address>
<Notes>Dunphy Family</Notes>
</firstRoomGuests>
</GuestsInformation>
<CancellationStatus>1</CancellationStatus>
</DetailBooking>
Other XML REQUEST Values
-
ReservationId -> 5
-
ReservationId -> 13
CancelReservation
This service allows you to cancel reservation.
To cancel reservation, agency username , password, API key and reservation id are required. You can cancel the reservation by requesting with the xml query. The response is transmitted in XML format.
XML Structure
Request parameters
| Elements |
Type |
Description |
<CancelReservation> |
|
Root Element |
<AgencyUsername> |
String |
Agency username |
<AgencyPassword> |
String |
Agency password |
<AgencyAPIkey> |
String |
Agency API key |
<ReservationId> |
int |
The Reservation ID you received from the MakeBooking |
Response parameters
| Elements |
Description |
<CancelReservation> |
Root Element |
<message> |
message |
<status> |
Response status |
TEST XML Request and Response
XML REQUEST
<?xml version="1.0" encoding="UTF-8"?>
<CancelReservation>
<AgencyUsername>Test</AgencyUsername>
<AgencyPassword>test2025+</AgencyPassword>
<AgencyAPIkey>f19065833731c465654f50f6c92b68f2</AgencyAPIkey>
<ReservationId>1</ReservationId>
</CancelReservation>
XML RESPONSE
<CancelReservation>
<message>Reservation cancelled successfully</message>
<status>success</status>
</CancelReservation>
NOTES (IMPORTANT !)
- You can't use MakeBooking or CancelReservation services with AgencyTest. You can only use DetailBooking. You should enter your own Agency information to use them.