Skip to main content

Read

This method allows retrieving complete information about reservations primarily based on locators filters, returning complete information for each matching reservation. Please be aware that only 50 reservations can be retrieved at once; requesting more than this limit will result in an error.

Request

Mandatory criteria:

To make a read, it is essential to set either a tgxLocators, providerLocators and clientsLocators, but not all three at the same time (as this will result in an error).

Optional criteria:

Optionally, you can filter your read by specifying specific searchCancellationsCorrelationID. You can also choose to filter by isTest.

{
"access" : {
"accessToken" : "xxxx",
"user" : "xxxx",
"password" : "xxxx"
},
"tgxLocators" : [
"123"
]
}

Request Data Breakdown

ElementRelTypeDescription
access1nodeAcces information:
  • It will be validated to grant acces to the API and to the operation.
  • If there is any problem then an error will be returned.
access/accessToken1stringKey to acces to the API.
access/user1stringUser.
access/password1stringPassword related to the user.
tgxLocators0..Nlist(string)TGX locators to search for.
providerLocators0..Nlist(string)Provider locators to search for.
clientLocators0..Nlist(string)Agency/Client locators to search for.
correlationIDs0..Nlist(string)CorrelationIDs to search for.
isTest0,1booleanTest mode:
  • If set to true the operation will be executed in "test mode". This means that the response will include dummy information (no real reservations information).
  • If not set to true or not given then the operation will execute as normally.
In order to test the API, we still need to give a real access information. Note that even in test mode all operations will execute its own request validations, so the requests must be well formed.

Response

{
"reservationReadRS" : [
{
"locators" : {
"tgx" : "1",
"client" : "111-222",
"provider" : "12312313"
},
"bookingDate" : "2018-07-11 8:50:48",
"checkinDate" : "2018-08-14",
"checkoutDate" : "2018-08-21",
"status" : "OK",
"mainGuestName" : "Smith, Martin",
"hotelCode" : "h1",
"hotelName" : "Hotel 1 Name",
"clientCode" : "c1",
"clientName" : "Client 1 Name",
"providerCode" : "p1",
"providerName" : "Provider 1 Name",
"cityCode" : "Hotel 1 City Code",
"cityName" : "Hotel 1 City Name",
"chainCode" : "Hotel 1 Chain Code",
"chainName" : "Hotel 1 Chain Name",
"countryCode" : "ES",
"mealPlanCode" : "MP",
"mealPlanName" : "Half board",
"market" : "ES",
"sellingPrice" : {
"currency" : "EUR",
"amount" : 234.5,
"binding" : false,
"commission" : 0
},
"providerPrice" : {
"currency" : "EUR",
"amount" : 204.99,
"binding" : false,
"commission" : 0
},
"quoteSellingPrice" : {
"currency" : "EUR",
"amount" : 234.5,
"binding" : false,
"commission" : 0
},
"quoteProviderPrice" : {
"currency" : "EUR",
"amount" : 204.99,
"binding" : false,
"commission" : 0
},
"rooms" : [
{
"code" : "R14",
"description" : "test room 1",
"pax" : [
{
"name" : "Martin",
"surname" : "Smith",
"age" : "30"
},
{
"name" : "Susan",
"surname" : "Smith",
"age" : "30"
}
]
},
{
"code" : "R32",
"description" : "test room 2",
"pax" : [
{
"name" : "Rob",
"surname" : "Conors",
"age" : "30"
},
{
"name" : "Sara",
"surname" : "Conors",
"age" : "30"
}
]
}
],
"quoteNonRefundable" : false,
"quoteCancelPenalties" : [
{
"penaltyType" : "Amount",
"paymentType" : "MerchantPay",
"hoursBefore" : "24",
"currency" : "EUR",
"value" : 25.5
}
]
},
{
"locators" : {
"tgx" : "2",
"client" : "222-333",
"provider" : "456456456"
},
"bookingDate" : "2018-08-21 10:11:17",
"checkinDate" : "2018-12-01",
"checkoutDate" : "2018-12-07",
"cancellationDate" : "2018-08-26 11:01:47",
"status" : "CN",
"mainGuestName" : "Redford, Charles",
"hotelCode" : "h2",
"hotelName" : "Hotel 2 Name",
"clientCode" : "c2",
"clientName" : "Client 2 Name",
"providerCode" : "p2",
"providerName" : "Provider 2 Name",
"cityCode" : "Hotel 2 City Code",
"cityName" : "Hotel 2 City Name",
"chainCode" : "Hotel 2 Chain Code",
"chainName" : "Hotel 2 Chain Name",
"countryCode" : "ES",
"mealPlanCode" : "MP",
"mealPlanName" : "Half board",
"market" : "ES",
"sellingPrice" : {
"currency" : "EUR",
"amount" : 234.5,
"binding" : false,
"commission" : 0
},
"providerPrice" : {
"currency" : "EUR",
"amount" : 204.99,
"binding" : false,
"commission" : 0
},
"quoteSellingPrice" : {
"currency" : "EUR",
"amount" : 234.5,
"binding" : false,
"commission" : 0
},
"quoteProviderPrice" : {
"currency" : "EUR",
"amount" : 204.99,
"binding" : false,
"commission" : 0
},
"rooms" : [
{
"code" : "Rd45",
"description" : "test room 2-b",
"pax" : [
{
"name" : "Charles",
"surname" : "Redford",
"age" : "40"
}
]
}
],
"quoteNonRefundable" : true
},
{
"locators" : {
"tgx" : "3",
"client" : "444-555",
"provider" : "789-987-789"
},
"bookingDate" : "2018-08-09 18:00:00",
"checkinDate" : "2019-01-26",
"checkoutDate" : "2019-01-27",
"status" : "OK",
"mainGuestName" : "Clancy, Tom",
"hotelCode" : "h3",
"hotelName" : "Hotel 3 Name",
"clientCode" : "c3",
"clientName" : "Client 3 Name",
"providerCode" : "p3",
"providerName" : "Provider 3 Name",
"cityCode" : "Hotel 3 City Code",
"cityName" : "Hotel 3 City Name",
"chainCode" : "Hotel 3 Chain Code",
"chainName" : "Hotel 3 Chain Name",
"countryCode" : "IT",
"mealPlanCode" : "HD",
"mealPlanName" : "Bed & breakfast",
"market" : "UK",
"sellingPrice" : {
"currency" : "EUR",
"amount" : 234.5,
"binding" : false,
"commission" : 0
},
"providerPrice" : {
"currency" : "EUR",
"amount" : 204.99,
"binding" : false,
"commission" : 0
},
"quoteSellingPrice" : {
"currency" : "EUR",
"amount" : 234.5,
"binding" : false,
"commission" : 0
},
"quoteProviderPrice" : {
"currency" : "EUR",
"amount" : 204.99,
"binding" : false,
"commission" : 0
},
"rooms" : [
{
"code" : "R14",
"description" : "test room 3-c",
"pax" : [
{
"name" : "Tom",
"surname" : "Clancy",
"age" : "35"
},
{
"name" : "Ingrid",
"surname" : "Clancy",
"age" : "38"
}
]
}
],
"quoteNonRefundable" : false,
"quoteCancelPenalties" : [
{
"penaltyType" : "Amount",
"paymentType" : "MerchantPay",
"hoursBefore" : "48",
"currency" : "EUR",
"value" : 54.75
},
{
"penaltyType" : "Amount",
"paymentType" : "MerchantPay",
"hoursBefore" : "24",
"currency" : "EUR",
"value" : 25.5
}
]
},
{
"locators" : {
"tgx" : "4",
"client" : "555-666",
"provider" : "888-999-777"
},
"bookingDate" : "2018-08-09 18:00:00",
"checkinDate" : "2019-01-26",
"checkoutDate" : "2019-01-27",
"status" : "ERROR",
"mainGuestName" : "Fisher, Sam",
"hotelCode" : "h4",
"clientCode" : "c4",
"rooms" : [
],
"quoteNonRefundable" : false
},
{
"locators" : {
"provider" : "1010-2020-3030"
},
"status" : "NOTFOUND",
"quoteNonRefundable" : false
}
]
}

Response Data Breakdown

ElementRelTypeDescription
reservationReadRS1listRoot node with the list of reservations.
locators1nodeThis node contains the different locators of the reservation.
locators/tgx1stringTravelgate locator.
locators/client1stringClient locator.
locators/provider0,1stringProvider locator. If the reservation has no provider locator then this node will be null.
bookingDate1dateTimeBooking date.
checkinDate1dateCheck-in date.
checkoutDate1dateCheck-out date.
cancellationDate0,1dateTimeIf the reservation has been canceled this will be the cancelation date. If the reservation is not canceled this node will be null.
status1string
Reservation Status
Code Explanation
OK The reservation was created successfully.
KO The reservation process failed and the reservation was not created on the provider.
KOP The reservation process failed but the reservation was created on the provider.
KUN The reservation process failed and we don’t know the final status on the provider.
CN The reservation was cancelled successfully.
CK The cancellation process failed and the reservation was not cancelled on the provider.
CKP The cancellation process failed but the reservation was cancelled on the provider.
CUN The cancellation process failed and we don’t know the final status on the provider.
ERROR There has been an error while recovering the reservation from the system. Returned data can be incompleted.
NOTFOUND The reservation has not been found on the system. Returned data has to be ignored.
summaryStatus1string
Reservation Summary Status
Code Explanation
OK The reservation was created successfully.
CN The reservation was cancelled successfully.
RQ The reservation was created successfully put is pending on provider.
UN The reservation is on an unknown status because some error on the last operation executed on it.
mainGuestName1stringReservation's main guest name.
hotelCode1stringCode of the hotel of the reservation.
hotelName1stringName of the hotel of the reservation.
clientCode1stringCode of the agency/client.
clientName1stringName of the agency/client.
providerCode1stringCode of the provider of the reservation.
providerName1stringName of the provider of the reservation.
cityCode0,1stringCode of the city corresponding to the hotel.
cityName0,1stringName of the city corresponding to the hotel.
chainCode0,1stringCode of the hotel's chain.
chainName0,1stringName of the hotel's chain.
countryCode0,1stringCountry code corresponding to the hotel.
mealPlanCode0,1stringMeal plan code for the reservation.
mealPlanName0,1stringMeal plan name for the reservation.
market0,1stringMarket corresponding to the reservation.
sellingPrice1Selling price information.
sellingPrice/amount1decimalPrice amount.
sellingPrice/currency1stringPrice currency.
sellingPrice/binding1booleanIndicates if the price is binding.
sellingPrice/commision1decimalCommission related to the price.
quoteSellingPrice1Selling price at the quote/pre-booking step.
quoteSellingPrice/amount1decimalPrice amount.
quoteSellingPrice/currency1stringPrice currency.
quoteSellingPrice/binding1booleanIndicates if the price is binding.
quoteSellingPrice/commision1decimalCommission related to the price.
providerPrice1Provider price information.
providerPrice/amount1decimalPrice amount.
providerPrice/currency1stringPrice currency.
providerPrice/binding1booleanIndicates if the price is binding.
providerPrice/commision1decimalCommission related to the price.
quoteProviderPrice1Provider price at the quote/pre-booking step.
quoteProviderPrice/amount1decimalPrice amount.
quoteProviderPrice/currency1stringPrice currency.
quoteProviderPrice/binding1booleanIndicates if the price is binding.
quoteProviderPrice/commision1decimalCommission related to the price.
rooms1..NlistList of rooms of the reservation.
rooms/code1stringRoom code.
rooms/description1stringRoom description.
rooms/pax1listList of pax of the room.
rooms/pax/name1stringName of the pax.
rooms/pax/surname1stringSurname of the pax.
rooms/pax/age1stringAge of the pax.
quoteNonRefundable1booleanIndicates if the reservation was non refundable (true) or if it was refundable (false) on the quote/pre-booking step:
  • If the reservation was refundable then we can have a list of penalties related to the cancellation.
  • If the reservation was non refundable then we will not have a list of penalties (the list node will be null).
This information can have changed on the booking step.
quoteCancelPenalties0..NCP nodeList of cancel penalties on the quote/pre-booking step. Only if the reservation was refundable (nonRefundable = false).
quoteCancelPenalties/penaltyType1enumType of penalty:
  • Nights
  • Percentage
  • Amount
quoteCancelPenalties/paymentType1enumType of payment:
  • LaterPay
  • MerchantPay
  • MixedPay
  • CardBookingPay
  • CardCheckInPay
quoteCancelPenalties/isCalculatedDeadline1booleanSpecifies if the deadline has been taken from the seller’s response (false) or has been calculated by TravelgateX (true)
quoteCancelPenalties/deadline0..1dateCancellation fees will be applied between this date and the check-in date
quoteCancelPenalties/hoursBefore0..1intNumber of hours before the check-in, in which this penalty is applied.
quoteCancelPenalties/currency1stringCurrency of the penalty
quoteCancelPenalties/value1decimalValue of the pentalty: will depend on the type of penalty.
officeCode0,1stringIf returned then this will be the code of the office.
officeName0,1stringIf returned then this will be the name of the office.
accessCodeHX1stringCode of the access used in HotelX layer to access the provider.
hotelProvCodeHX1stringCode of the hotel on the provider system (used by HotelX).
correlationID0,1stringCorrelation ID.
priceBreakdown0,1nodeInformation about how selling price has been calculated.
priceBreakdown/comissionMarkupType1enumType of calculation:
  • C → Commission
  • M → Markup
priceBreakdown/totalComission1decimalTotal Commission/Markup applied to obtain the selling price. It is calculated as the sumatory of:
  • baseCommission
  • baseRappel
  • rulesCommission
  • officeCommission
There are some distribution rules that can affect this calculation.
priceBreakdown/baseComission1decimalBase commission/markup (if any).
priceBreakdown/baseRappel1decimalBase rappel (if any).
priceBreakdown/rulesComission1decimalCommission/Markup obtained from applying the "Selling Pricing Rules".
priceBreakdown/officeComission1decimalCommission/markup of the office (if any).
priceBreakdown/tax1decimalTax (if any). It is applied apart from the totalCommission.
priceBreakdown/currencyExchange0,1nodeIf there has been a currency change then this field will give information about the exchange.Currency conversion is done before aplying any pricing calculation.
currencyExchange/fromCurrency1stringPurchasing currency (ISO "Alpha-3").
currencyExchange/toCurrency1stringSelling currency (ISO "Alpha-3").
currencyExchange/exchange1decimalExchange used on the conversion. New currency amount = original currency amount * exchange.
paymentInfo0,1nodeInformation about payment (includes VCC payment info).
paymentInfo/paymentTypeProvider1enumType of payment obtained from the final provider:
  • LaterPay
  • MerchantPay
  • MixedPay
  • CardBookingPay
  • CardCheckInPay
paymentInfo/paymentTypeClient1enumType of payment returned to the client:
  • LaterPay
  • MerchantPay
  • MixedPay
  • CardBookingPay
  • CardCheckInPay
paymentInfo/vccInfo0,1stringTextual information about VCC payment.
paymentInfo/vccCardType0,1stringVCC card type.
paymentInfo/vccSupplierCode0,1stringVCC supplier code.
paymentInfo/vccTransactionId0,1stringIdentifier of VCC transaction.
reservationError0,1stringIf the reservation is not on a well finished status (reservation or cancellation) then we can have some textual information about the error that caused that not well finished status.
error0,1nodeIf there has been any error executing the operation we can receive this node with information about that error. We can also receive errors with the http status.
error/code1string
Error Codes and Description

The following errors will be returned in this node:

Code Explanation
010 Exception/Unexpected Error.
020 Error validating the RQ.
030 No results.
040 Incorrect AccessToken.
error/description1string
Error Codes and Description

The following errors will be returned in this node:

Code Explanation
010 Exception/Unexpected Error.
020 Error validating the RQ.
030 No results.
040 Incorrect AccessToken.