NetCore API HotelMetaSearch Flow - English
Objective
The purpose of this document is to present the services that must be executed to create a hotel flow from a metasearch engine.
Postman Collection
The files for the Postman collection and environment can be downloaded from the following documents:
All executed services must include the following header:
Header Name: x-net-metasearch
Value to Send: {{userservice}}-{{saleschannelcode}
}
Example: x-net-metasearch=demo-metaprueba
The IP addresses from which we will receive calls to our APIs must be provided, as they need to be included in a whitelist.
If the call does not meet the header requirement or is made from an IP address other than the authorized ones, the request will not be processed.
Flowchart
General Information about the Services
The following details the services used for the metasearch engine sales flow:
Service Type | Service | Features |
---|---|---|
Log in | Log in as a guest user | |
Hotel search | Used for searches with SC. The returned deeplink URL redirects to the old sales experience (Catmandu) or the new sales experience (New front), depending on the configuration in the system. | |
Used for hotel searches with SC depending on the negotiation between the agency and the metasearch engine. The returned deeplink URL redirects to the old sales experience (Catmandu) or the new sales experience (New front), depending on the configuration in the system. |
GuestSession Service [GET]
This service returns a guest user session token necessary to execute hotel search and results services. Authentication must be performed on the environment that you wish to use.
The session token is valid for 24 hours, so a single token must be used to execute all necessary services within that period. After that time, a new token will need to be generated.
Example Curl:
curl --location 'https://preprod.netactica.com/netcoreapi/Session/GetGuestSession?userservice=netactica' \
--header 'x-net-metasearch: demo-metaprueba'
Where the variable {userservice} will be provided during the implementation.
Response Example:
HotelMetaSearchV3 Service [POST]
This service initiates the search with SC for the required destination, dates, and passenger distribution. This flow allows for each hotel option in the search to display a deeplink (a parameter containing a URL that redirects to a selected product) that redirects to either the new or old sales experience based on the configuration set for the agency.
General Considerations:
To be taken into account in the service request.
In the "LocationId" field, the location ID (city, neighborhood, point of interest, airport, etc.) is sent. Validate with the implementation the list of available locations.
The "MaxResults" field is used to limit the number of results to be displayed, even if the total number of results is higher; for example, if 1000 hotels are available but 100 is entered in the "MaxResults" parameter, the system will only show the first 100 results.
Send the value true in the "IncludeHotelInfo" field if you wish to receive static hotel information.
Send the value true in the "IncludeRooms" field if you wish to receive room information and their rates.
The sales channel code must be included in the "SalesChanelCode" field within the RequestSettings section. This sales channel code will be provided during the implementation process.
A branch code can be sent if the agency requires sales to be generated for a particular branch. This parameter must be sent in the RequestSettings section under the "BranchCode" field.
Example Curl:
curl --location 'https://preprod.netactica.com/NetCoreApi/HotelMetaSearchV3' \
--header 'Content-Type: application/json' \
--header 'x-net-metasearch: netactica-' \
--data '{
"DestinationType": "location",
"LocationId": 329236,
"CheckIn": "2025-03-09",
"CheckOut": "2025-03-11",
"Rooms": [
{
"Adults": 1,
"Children": 0,
"ChildrenAges": []
}
],
"IncludeHotelInfo": false,
"IncludeRooms": false,
"MaxResults": 10,
"CurrencyCode": "USD",
"RequestSettings": {
"SaleType": "Regular",
"BranchCode": "{{branchcode}}",
"SalesChanelCode": "{{saleschannelcode}}",
"Language": "es"
},
"SessionToken": "{{sessiontoken}}"
}'
Where the variables {{branchcode}} and {{saleschannelcode}} will be provided during the implementation. The variable {{sessiontoken}} should be replaced with the session token obtained from the GetGuestSession login service.
Response Example:
HotelMetaSearchByHotelIds Service [POST]
Through this service, the search with SC is initiated for a group of hotels, required dates, and passenger distribution. This flow allows for each hotel option in the search to display a deeplink (a parameter containing a URL that redirects to a selected product) that redirects to either the new or old sales experience based on the configuration set for the agency.
General Considerations:
To be taken into account in the service request.
In the "HotelIds" field, the list of hotel IDs negotiated between the agency and the metasearch engine is sent.
The "MaxResults" field is used to limit the number of results to be displayed, even if the total number of results is higher; for example, if 1000 hotels are available but 100 is entered in the "MaxResults" parameter, the system will only show the first 100 results.
Send the value true in the "IncludeHotelInfo" field if you wish to receive static hotel information.
Send the value true in the "IncludeRooms" field if you wish to receive room information and their rates.
The sales channel code must be included in the "SalesChanelCode" field within the RequestSettings section. This sales channel code will be provided during the implementation process.
A branch code can be sent if the agency requires sales to be generated for a particular branch. This parameter must be sent in the RequestSettings section under the "BranchCode" field.
Example Curl:
curl --location 'https://preprod.netactica.com/NetCoreApi/HotelMetaSearchByHotelIds' \
--header 'Content-Type: application/json' \
--header 'x-net-metasearch: netactica-' \
--data '{
"HotelIds": [
32519,
237798,
131703,
13532,
47144
],
"CheckIn": "2025-03-09",
"CheckOut": "2025-03-11",
"Rooms": [
{
"Adults": 1,
"Children": 0,
"ChildrenAges": []
}
],
"IncludeHotelInfo": false,
"IncludeRooms": false,
"MaxResults": 10,
"CurrencyCode": "COP",
"RequestSettings": {
"SaleType": "Regular",
"BranchCode": "{{branchcode}}",
"SalesChanelCode": "{{saleschannelcode}}",
"Language": "es"
},
"SessionToken": "{{sessiontoken}}"
}'
Where the variables {{branchcode}} and {{saleschannelcode}} will be provided during the implementation. The variable {{sessiontoken}} should be replaced with the session token obtained from the GetGuestSession login service.
Response Example:
Response Model in Search Services
Below are the most relevant nodes in the response of hotel search services:
Nodo RS | Explicación |
---|---|
DeepLink | Contains a URL that redirects to a selected product under the new or old sales experience based on the search service used and the configuration set for the agency |
CheckinDate | Requested check-in date |
CheckoutDate | Requested check-out date |
HotelName | Hotel name |
HotelCode | Hotel code in the provider |
HotelId | Hotel ID in the Static Content platform |
ShortDescription | Brief hotel description |
Destination | IATA code of the requested destination city |
Category | Hotel category (stars) |
Address | Hotel address |
Images | Image array. Returned if the IncludeHotelInfo field in the request is set to true |
Latitude | Hotel latitude |
Longitude | Hotel longitude |
TotalNightsHotel | Total number of nights searched |
PriceFrom | Price from the hotel |
CurrencyCode | Currency in which the hotel amounts are returned |
RoomRates | Room rate array. Returned if the IncludeRooms field in the request is set to true |
Rooms | Room array. Returned if the IncludeRooms field in the request is set to true |
Redirection to Deeplink
The redirection of the customer to the deeplink generated in the response of the HotelMetaSearchV3 and HotelMetaSearchByHotelIds services for the option selected by the customer will allow them to be redirected to the agency's sales flow.
Netactica.com