Skip to main content

Blacklist

The Blacklist App allows Buyers to define business rules that block search traffic to specific hotels or suppliers. This helps streamline results and enforce your internal policies. You can create rules based on multiple conditions, such as country, hotel, date range, or rate type (packages, non-refundable, etc.).

To use the Blacklist plugin, you need to:

  1. Create your Blacklist rules (via website or SFTP file).
  2. Add the plugin to your Hotel-X search query.

1. Create your Blacklist Rules on our Travelgate website

Hotel-X will block the traffic according to the Blacklist rules you create on our Travelgate website, under Plugins → Blacklist.

In this section, you can:

  • View all your existing rules.
  • Create new rules.
  • Edit or delete rules.
  • Change the priority of rules.

Blacklist Rules Overview

Creating or editing a rule is done through a simple 3-step form in the Blacklist App section of the Plugins page. Each step defines how and when your rule will be applied.

Step 1. Rule Name

Give your rule a clear and identifiable name.
This name will help you easily recognize the rule later when managing or prioritizing your rules.

Blacklist Step 1

Step 2. Rule Configuration

This step defines both the target criteria under which your block will apply and the hotels affected.

2.1 Target Criteria

Specify the conditions that must be met for this blacklist rule to apply. You can define:

  • Clients
  • Suppliers
  • Accesses
  • Markets (optional)
  • Nationalities (optional)

You can select all clients and suppliers, or only specific ones. You can also exclude certain clients or suppliers using the checkboxes — meaning the rule will apply to all except those marked.

Blacklist Step 2.1

2.2 Hotels

In this section, you configure:

  • Whether the rule is a Blacklist or Whitelist.
  • The Buyer context (if using FastX codes, check the FastX option).
  • The hotels affected:
    • All hotels
    • Specific hotel codes
    • All hotels in one or more countries

Blacklist Step 2.2

Step 3. Review and Create the Rule

Before saving, review all configurations. Once confirmed, click Create Rule.

Blacklist Step 3

You can also:

  • Edit or delete the rule at any time.
  • Change the priority of the rule relative to other existing rules.
  • Access logs to track which user created or modified each rule and when the changes occurred.

Optional: Create your Blacklist Rules using a file

You can also create your Blacklist Rules uploading a file to our SFTP server instead of using our website.

To get started, create your blacklist file in the correct format and then upload it to your FTP account. We've provided a template file below ⬇️ to help you with this process. Just click on the file name, add your own rules, save it in CSV format, and then upload it to the corresponding folder in your FTP.

sftp://sftp.travelgate.com:22

📁HotelX
     📁HotelX_0000
         📁BusinessRules
             📄blacklist_access_hotels.csv

note

If you need assistance with requesting your credentials to access the SFTP server, determining the endpoint and directory format, or learning how to upload, update, and delete SFTP files, please refer to the overview section of Plugins.

File Format Specification

  • File Name: blacklist_access_hotels.csv
  • Directory: HotelX/HotelX_0000/BusinessRules
  • Delimiter: Comma (,)
  • Header Row:
    • IdRule: Unique identifier of the rule. You can assign one with the identifier that suits you better.
    • ClientToken: List of the client tokens you want the rule to be applied to, separated by ;. This is a dynamic parameter that you can include in your query request if you wish to enforce particular rules from the blacklist.
    • NoClientToken: List of the client tokens you don't want the rule to be applied to, separated by ;.
    • Client: List of the specific clients you want the rule to be applied to, separated by ;.
    • NoClient: List of the specific clients you don't want the rule to be applied to, separated by ;.
    • Supplier: List of the supplier codes you want the rule to be applied to, separated by ;.
    • NoSupplier: List of the supplier codes you don't want the rule to be applied to, separated by ;
    • Access: List of the access codes you want the rule to be applied to, separated by ;.
    • NoAccess: List of the access codes you don't want the rule to be applied to, separated by ;.
    • Context: List of the Buyer context codes you want the rule to be applied to, separated by ;.
    • NoContext: List of the Buyer context codes you don't want the rule to be applied to, separated by ;.
    • ContextSup: List of the Supplier context codes you want the rule to be applied to, separated by ;.
    • NoContextSup: List of the Supplier context codes you don't want the rule to be applied to, separated by ;.
    • Values: Values can be 'blacklist' or 'whitelist' with hotel codes grouped by context. The format is as follows:
      • All values should have two blocks separated by the characters ||.
      • The first block identifies the context and the second block identifies the list of hotel codes separated by ;.
      • Values in the whitelist or blacklist are separated by the characters |@|.
      • Use 'all' as a keyword when you want to choose all contexts or all hotels.
      • Format examples:
        • Blacklist: bl:(CTX1||A;B;C|@|CTX2||C;B;D;)
        • Whitelist: wl:(CTX1||A;B;C|@|CTX2||all)
        • Blacklist and Whitelist (if blacklist and whitelist are used at same time, then the CONTEXT must be exclusive): bl:(CTX1||A;B;C), wl:(CTX2||A;B;C)
caution

Keep in mind that this file contains a collection of rules, and the system will choose the first rule that matches the criteria sent in the query. You must specify the most restrictive rules at the top of the file. If there's no value for any rule criteria row, it means that any value in the request matches this row. Indicate the contexts used in values on the rule criteria to improve rule matching.

📹 Learn how to change the format of the csv file in order to edit and save it

Check Some of the Most Common Use Cases

Here are some common use cases for the Blacklist plugin, along with the CSV template file to use:

Use CaseCSV Template file
Block all hotels of two accesses📄blacklist _access _hotels.csv
Block all hotels of two suppliers📄blacklist _access _hotels.csv
Block all hotels except “A” and “B” of two suppliers📄blacklist _access _hotels.csv

2. Execute Blacklist Plugin in your Query

Once you have created your blacklist rules — either via the website or by uploading a file to the SFTP — you can activate the plugin in your HotelX search query.

To do this, add the following field to the settings node of your request. Note that the Blacklist plugin can only be executed during a search query.

  • step: "REQUEST_ACCESS"
  • type: "PRE_STEP"
  • name: "blacklist"
"settings": {
"plugins": [
{
"step": "REQUEST_ACCESS",
"pluginsType": {
"type": "PRE_STEP",
"name": "blacklist"
}
}
]
}

To apply a specific rule in a query, add the clientTokens field to the settings node of your request:

	"settings": {
"clientTokens": [
"testToken"
],
"plugins": [
{
"step": "REQUEST_ACCESS",
"pluginsType": {
"type": "PRE_STEP",
"name": "blacklist"
}
}
]
}