Skip to content

Get hotel search results

Request

Get all available hotels for the requested search parameters.

Security
Bearer
Bodyapplication/jsonrequired
searchParamsobject(Hotel Search Parameters)required

The parameters required for searching hotels.

filtersobject(Hotel Search Filters)

Filters to refine the search result. Based on the user selected filters, the list of matching hotels will be displayed.

sortOptionsArray of objects(Hotel Sort Options)

Sort options for the search results.

userIdobject(Hotel User Identifier)required
paginationParamsobject(Token Based Pagination Request)
curl -i -X POST \
  https://api-ext-sboxmeta.partners.spotnana.com/v2/hotel/search \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "searchParams": {
      "occupancyDates": {
        "occupancy": [
          {
            "numAdults": 1,
            "numChildren": 0
          }
        ],
        "checkInDate": {
          "iso8601": "2017-07-21T17:32"
        },
        "checkOutDate": {
          "iso8601": "2017-07-21T17:32"
        }
      },
      "searchBy": {
        "searchType": "AIRPORT",
        "airport": "LHR"
      }
    },
    "filters": {
      "prepaidQualifier": "INCLUDE_PREPAID",
      "priceRange": {
        "min": {
          "amount": 510,
          "currencyCode": "GBP"
        },
        "max": {
          "amount": 510,
          "currencyCode": "GBP"
        }
      },
      "amenities": [
        "ECO_FRIENDLY"
      ],
      "chainCodes": [
        "string"
      ],
      "radius": {
        "length": 150,
        "unit": "MILE"
      },
      "starRatings": [
        0
      ],
      "nameQuery": "string",
      "eligibleForLoyalty": false,
      "showUnavailable": false,
      "payByPoints": false,
      "modifiableOnly": false,
      "rateTypes": [
        "PUBLISHED"
      ],
      "propertyTypes": [
        {
          "type": "ALL_SUITE",
          "description": "string"
        }
      ],
      "refundableOnly": false,
      "preferredOnly": false
    },
    "sortOptions": [
      {
        "sortBy": "PRICE",
        "sortOrder": "ASCENDING"
      }
    ],
    "userId": {
      "userIdType": "USER_ID",
      "userId": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
      }
    },
    "paginationParams": {
      "requestType": "PAGE_TOKEN",
      "pageToken": "token"
    }
  }'

Responses

OK

Bodyapplication/json
hotelsArray of objects(Hotel Data)required

List of hotels matching the search criteria.

metadataobject(Hotel Search Metadata)required

Includes metadata for a hotel search.

paginationParamsobject(Token Based Pagination Response)required

Pagination response for token based pagination. Contains the next page token(if next page is available) and pagination parameters.

Response
{ "hotels": [ { … } ], "metadata": { "availableHotelChains": [ … ], "rateStatistics": { … }, "showOnlyBaseFare": false, "sessionId": "string" }, "paginationParams": { "nextPageToken": "string", "currentPageSize": 10 } }