Retrieve regions’ dump

Retrieve regions’ dump

#b2b

https://api-sandbox.worldota.net/api/b2b/v3/hotel/region/dump/
https://api.worldota.net/api/b2b/v3/hotel/region/dump/

The call gets the dump with the hotels of all available ETG regions.

ℹ️
The dump should be updated every week.

The ETG generates one archive only.

⚠️
  • The dump download link you receive from the API is temporary and will expire 1 hour after being issued. To download the dump, you must call the API method each time to obtain a fresh, valid link.
  • Content indexing isn’t allowed.

Sandbox limitations

⚠️
Use only field values, IDs, API keys, and any static content from the sandbox environment within the sandbox. Do not use sandbox data in test or production environments, and do not mix data or configuration between different environments.
  • In the dump, the number of items is 1000.
  • For all objects with the region_id field, the possible values are: 2011, 2395, 2734, and 6053839.
  • For all objects containing the currency_code field, its value is always EUR.

Request example

curl --user '<KEY_ID>:<API_KEY>' 'https://api-sandbox.worldota.net/api/b2b/v3/hotel/region/dump/'
curl --user '<KEY_ID>:<API_KEY>' 'https://api.worldota.net/api/b2b/v3/hotel/region/dump/'

Response

Response example

{
  "data": {
    "last_update": "2020-07-01T00:38:13Z",
    "url": "https://.../partner_feed_v3_en.jsonl.zst?..." // link valid for 1 hour
  },
  "debug": null,
  "error": null,
  "status": "ok"
}

Dump file structure

The dump is a Zstd archive that contains a file with a list of objects line by line:

[
  {
    "country_name": {
      "ar": null,
      "bg": "Полша"
      // other languages...
    }
  },
  {
    "country_name": {
      "ar": "الولايات المتحدة الأمريكية",
      "bg": "Съединени щати"
      // other languages...
    }
  }
]

Each object in its turn contains a region’s description (each line is a single region in json format).

Structure of the region

{
  "country_name": {
    "ar": "باربادوس",
    "bg": "Барбадос",
    "de": "Barbados",
    "el": "Μπαρμπάντος",
    "en": "Barbados",
    "es": "Barbados",
    "fr": "Barbade",
    "hu": "Barbados",
    "it": "Barbados",
    "pl": "Barbados",
    "pt": "Barbados",
    "ro": "Barbados",
    "sq": "Barbadosi",
    "sr": "Барбадос",
    "tr": "Barbados"
  },
  "country_code": "BB",
  "center": {
    "longitude": -59.618847,
    "latitude": 13.101827
  },
  "hids": [
    101,
    102,
    103
  ],
  "hotels": [
    "radisson_aquatica_resort_barbados",
    "spacious_colonial",
    "malfranza_apartments",
    "island_inn_all_inclusive_hotel",
    "hilton_barbados_resort",
    "sweetfield_manor_historic_inn_",
    "bellevue_plantation",
    "nautilus_beach_apartments",
    "walmer_lodge_apartments",
    "melbourne_apartments_3",
    "the_barbados_chi_centre",
    "paradise_villas_2",
    "beach_nest",
    "3_angels",
    "believe_caribbean_apartments",
    "bellevue_plantation_polo_club"
  ],
  "iata": "BGI",
  "id": 554,
  "type": "City",
  "name": {
    "ar": "بريدج تاون",
    "bg": null,
    "de": "Bridgetown",
    "el": "Bridgetown",
    "en": "Bridgetown",
    "es": "Bridgetown",
    "fr": "Bridgetown",
    "hu": null,
    "it": "Bridgetown",
    "pl": "Bridgetown",
    "pt": "Bridgetown",
    "ro": null,
    "sq": null,
    "sr": null,
    "tr": null
  }
}

Field details

To decompress the archive you can use, for example, a Zstandard plugin or 7-zip archive manager with Zstandard.

Errors

The error field has the value specified in the headers below.

dump_not_ready

The dump is in processing. Try to send the request later.