Skip to main content

Search

This method allows searching for reservations primarily based on date filters, returning basic information for each matching reservation.

Request

Mandatory criteria:

To make a search, it is essential to set either a bookingDate filter or a checkinDate filter, but not both at the same time (as this will result in an error). In both cases, the date range for the bookingDate filter and the checkinDate filter cannot exceed one week.

Optional criteria:

Optionally, you can filter your search by specifying specific hotels, providers, and clients. You can also choose to includeCancellations, onlyCancellations, onlyErrors, onlyLocators, orderBy and/or isTest.

{
"access" : {
"accessToken" : "xxxx",
"user" : "xxxx",
"password" : "xxxx"
},
"bookingDate" : {
"from" : "2018-07-18",
"to" : "2018-07-20"
},
"hotels" : [
"1234",
"4534"
],
"includeCancellations" : true
}

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.
checkinDate0..1nodeCheck-in filter. This node is set if we want to filter by check-in date.
checkinDate/from1dateCheck-in date range filter: from (inclusive).
checkinDate/to1dateCheck-in date range filter: to (inclusive).
bookingDate0..1nodeBooking filter. This node is set if we want to filter by booking date. (inclusive).
bookingDate/from1dateTimeBooking date range filter: from (inclusive).
bookingDate/to1dateTimeBooking date range filter: to (inclusive).
hotels0..Nlist(string)Hotels filter:
  • If we just want the reservations of concret hotels then we can set this list with the codes of those hotels.
  • If not given or if it is empty then it will not be applied the filter by hotel code.
providers0..Nlist(string)Providers filter:
  • If we just want the reservations of a specific set of providers then we can set this list with the codes of those providers.
  • If not given or if it is empty then the filter by provider code will not be applied.
clients0..Nlist(string)Clients filter:
  • If we just want the reservations of a specific set of clients then we can set this list with the codes of those clients.
  • If not given or if it is empty then the filter by client code will not be applied.
includeCancellations0..1booleanCancelations inclusion filter:
  • If set to true then cancelled reservations that match the filters will be included in the response.
  • If not set to true or not given then only not cancelled bookings will be returned.
onlyCancellations0..1booleanCancellations filter:
  • If set to true then only the bookings that have been cancelled in the specific time interval indicated will be returned.
  • If not set to true, then (depending on the value of the includeCancellations tag) only the reservations booked between the time interval indicated will be returned.
onlyErrors0..1booleanOnly Errors filter:
  • If set to true then only the bookings that have a status indicating some type of error will be returned (bookings with status OK or CN will not be returned). Also, if this filter is applied, both includeCancellations and onlyCancellations will be ingnored.
  • If not set to true, then (depending on the value of the includeCancellations tag) only the reservations booked between the time interval indicated will be returned.
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 gie 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

{
"reservationSearchRS" : [
{
"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",
"clientCode" : "c1",
"providerCode" : "p1",
"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
}
},
{
"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",
"clientCode" : "c2",
"providerCode" : "p2",
"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
}
},
{
"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",
"clientCode" : "c3",
"providerCode" : "p3",
"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
}
},
{
"locators" : {
"tgx" : "45",
"client" : "232-555",
"provider" : "283-212-334"
},
"status" : "ERROR"
}
]
}

Response Data Breakdown

ElementRelTypeDescription
reservationSearchRS1listRoot 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.
clientCode1stringCode of the agency/client.
providerCode1stringCode of the provider of 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.
officeCode0..1stringIf returned then this will be the code of the office.
accessCodeHX1stringCode of the access used in Hotel-X layer to access the provider.
hotelProvCodeHX1stringCode of the hotel on the provider system (used by Hotel-X).
correlationID0..1stringCorrelation ID.
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.
reservationWarnings0,1list stringIf returned then it contains a list of tgx locators of reservations that have had problems registering on the main system and that have been stored on an auxiliary system. This information is indepent from the searching dates (will be given for any dates range).
cancellationWarnings0..1If returned then it contains a list of tgx locators of cancellations that have had problems registering on the main system and that have been stored on an auxiliary system. This information is indepent from the searching dates (will be given for any dates range).
cancellationWarnings/amount1decimalPrice amount.
cancellationWarnings/currency1stringPrice currency.
cancellationWarnings/binding1booleanIndicates if the price is binding.
cancellationWarnings/commision1decimalCommission related to the price.
error0..1nodeIf there has been any error executing the operation we can receive this node with information about that error.
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.