Search
Description
This method allows us to search for reservations mainly based on date filters, retrieving basic information of each matching reservation.
Considerations
We have to set a bookingDate filter or a checkinDate filter but not both at the same time (or an error will be returned).
For the bookingDate filter the dates range can’t be more than one week.
For the checkinDate filter the dates range can’t be more than one week.
Search Request (HTTP body)
Element | Cardinality | Data Type | Description |
---|---|---|---|
access | 1 | node | Acces information:
|
access/accessToken | 1 | string | Key to acces to the API. |
access/user | 1 | string | User. |
access/password | 1 | string | Password related to the user. |
checkinDate | 0,1 | node | Check-in filter. This node is set if we want to filter by check-in date. |
checkinDate/from | 1 | date | Check-in date range filter: from (inclusive). |
checkinDate/to | 1 | date | Check-in date range filter: to (inclusive). |
bookingDate | 0,1 | node | Booking filter. This node is set if we want to filter by booking date. (inclusive). |
bookingDate/from | 1 | dateTime | Booking date range filter: from (inclusive). |
bookingDate/to | 1 | dateTime | Booking date range filter: to (inclusive). |
hotels | 0..N | list(string) | Hotels filter:
|
providers | 0..N | list(string) | Providers filter:
|
clients | 0..N | list(string) | Clients filter:
|
includeCancellations | 0,1 | boolean | Cancelations inclusion filter:
|
onlyCancellations | 0,1 | boolean | Cancellations filter:
|
onlyErrors | 0,1 | boolean | Only Errors filter:
|
isTest | 0,1 | boolean | Test mode:
|
Search request structure
{
"access" : {
"accessToken" : "string",
"user" : "string",
"password" : "string"
},
"checkinDate" : {
"from" : "string",
"to" : "string"
},
"bookingDate" : {
"from" : "string",
"to" : "string"
},
"hotels" : [
"string"
],
"includeCancellations" : false,
"onlyCancellations" : true,
"isTest" : true
}
Search Request example: bookingDate search for concrete hotels and including cancellations
{
"access" : {
"accessToken" : "xxxx",
"user" : "xxxx",
"password" : "xxxx"
},
"bookingDate" : {
"from" : "2018-07-18",
"to" : "2018-07-20"
},
"hotels" : [
"1234",
"4534"
],
"includeCancellations" : true
}
Search Request example: checkinDate search for any hotel and excluding cancellations
{
"access" : {
"accessToken" : "xxxx",
"user" : "xxxx",
"password" : "xxxx"
},
"checkinDate" : {
"from" : "2018-07-18",
"to" : "2018-07-20"
}
}
Search Response (HTTP body)
Element | Cardinality | Data Type | Description |
---|---|---|---|
reservationSearchRS | 1 | list | Root node with the list of reservations. |
locators | 1 | node | This node contains the different locators of the reservation. |
locators/tgx | 1 | string | Travelgate locator. |
locators/client | 1 | string | Client locator. |
locators/provider | 0,1 | string | Provider locator. If the reservation has no provider locator then this node will be null. |
bookingDate | 1 | dateTime | Booking date. |
checkinDate | 1 | date | Check-in date. |
checkoutDate | 1 | date | Check-out date. |
cancellationDate | 0,1 | dateTime | If the reservation has been canceled this will be the cancelation date. If the reservation is not canceled this node will be null. |
status | 1 | string | Reservation status. Check reseravation status codes here. |
summaryStatus | 1 | string | Reservation summary status. Check reseravation status codes here. |
mainGuestName | 1 | string | Reservation’s main guest name. |
hotelCode | 1 | string | Code of the hotel of the reservation. |
clientCode | 1 | string | Code of the agency/client. |
providerCode | 1 | string | Code of the provider of the reservation. |
sellingPrice | 1 | price node | Selling price information. |
quoteSellingPrice | 1 | price node | Selling price at the quote/pre-booking step. |
providerPrice | 1 | price node | Provider price information. |
quoteProviderPrice | 1 | price node | Provider price at the quote/pre-booking step. |
officeCode | 0,1 | string | If returned then this will be the code of the office. |
accessCodeHX | 1 | string | Code of the access used in Hotel-X layer to access the provider. |
hotelProvCodeHX | 1 | string | Code of the hotel on the provider system (used by Hotel-X). |
correlationID | 0,1 | string | Correlation ID. |
reservationError | 0,1 | string | If 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. |
reservationWarnings | 0,1 | list string | If 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). |
cancellationWarnings | 0,1 | price node | If 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). |
error | 0,1 | node | If 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/code | 1 | string | Error code. Check error codes here. |
error/description | 1 | string | Error description. Check error descriptions here. |
Price node
Element | Cardinality | Data Type | Description |
---|---|---|---|
amount | 1 | decimal | Price amount. |
currency | 1 | string | Price currency. |
binding | 1 | boolean | Indicates if the price is binding. |
commission | 1 | decimal | Commission related to the price. |
Search response structure
{
"reservationSearchRS" : [
{
"locators" : {
"tgx" : "string",
"client" : "string",
"provider" : "string"
},
"bookingDate" : "string",
"checkinDate" : "string",
"checkoutDate" : "string",
"cancellationDate" : "string",
"status" : "string",
"mainGuestName" : "string",
"hotelCode" : "string",
"clientCode" : "string",
"providerCode" : "string",
"sellingPrice" : {
"currency" : "string",
"amount" : 0,
"binding" : true,
"commission" : 0
},
"providerPrice" : {
"currency" : "string",
"amount" : 0,
"binding" : true,
"commission" : 0
},
"quoteSellingPrice" : {
"currency" : "string",
"amount" : 0,
"binding" : true,
"commission" : 0
},
"quoteProviderPrice" : {
"currency" : "string",
"amount" : 0,
"binding" : true,
"commission" : 0
}
}
],
"error" : {
"code" : "string",
"description" : "string"
}
}
Search response: dummy response (test mode)
{
"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"
}
]
}