Sort hotels

#affiliate

https://api.worldota.net/api/b2b/v3/search/hotelsort/

The call ranks the hotels in the region. The ranking is made the internal ETG algorithm.

đź’ˇ

Recommendations

Use the call when you want to determine the order of the bookings to display in a third-party product.

Request example

curl --user '<KEY_ID>:<API_KEY>' 'https://api.worldota.net/api/b2b/v3/search/hotelsort/' \
--header 'Content-Type: application/json' \
--data '{
  "region_id": 536,
  "sort_type": "b2b",
  "hotels_limit": 5
}'

Request body

Response

Response example

{
  "data": {
    "hotels": [
      "concorde_am_studio",
      "berlin_marriott_hotel_2",
      "novum_hotel_aldea_berlin_centrum",
      "nh_berlin_mitte",
      "best_western_premier_hotel_moa_berlin"
    ]
  },
  "debug": {
    "request": {
      "region_id": 536,
      "sort_type": "b2b",
      "hotels_limit": 5
    },
    "key_id": 7705,
    "validation_error": null
  },
  "status": "ok",
  "error": null
}

Errors

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

invalid_params

  • The region_id field is required.
  • The region_id field is equal or greater than 0.
  • The hotels_limit field is equal or greater than 0.
  • The sort_type field is incorrect.

hotels_not_found

An internal search error. Has 500 status code.