Skip to main content

Search by Destination

The Search by Destination plugin enables to search by destinations codes in the Search query. Destination codes will be converted to hotel codes, then merged with the hotel codes sent in criteria if any, and finally the request will be sent to the supplier. In order to achieve the destination to hotel conversion, a source must be specified in a plugin.

note

You don't need to create any files for this plugin. Just specify it in the settings > plugins field in your search query.

1. Execute Search by Destination Plugin in your Query

To use the plugin add the following field to the settings node of your request. Note that search by destination plugin can just be executed in search query. In order to successfully execute the search by destination plugin, you will need to create the request with the following variables.

  • step: "REQUEST"
  • type: "PRE_STEP"
  • name: "search_by_destination"
  • parameters:
    • key: "accessID"
    • value: The access used to convert destinations to hotel from its hotel list, which means that the hotel codes obtained are in the same context as the access.
"settings": {
"plugins": [
{
"step": "REQUEST",
"pluginsType": {
"type": "PRE_STEP",
"name": "search_by_destination",
"parameters": [
{
"key": "accessID",
"value": "0000"
}
]
}
}
]
}
Remember

When you're setting up your search query, be sure to include the destinations field in the criteria, not hotels. This is where you can specify your destination codes.

To discover the destination codes accessible for your access, just refer to the destinations content query.