Skip to content

Hotel

These endpoints provide comprehensive functionality for managing hotel bookings. They enable users to search for hotels, check room rates and availability, create and modify bookings, and handle cancellations and rebooking.

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)
corporateInfoobject(CorporateInfoV2)

Corporate information related to the hotel search.

currencyCodestring

Preferred currency for the search. Used when the price filter does not carry a currency.

Example:"USD"
sessionIdstring

Supplier session from the previous search response. Send it on later pages so progressive search reuses the same supplier session.

tripIdstring

Internal trip id when the search runs inside an existing trip.

searchMetadataobject(Hotel Search Context)

How the search was started, including an autocomplete hotel selection.

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,
            "childAges": [
              4,
              7
            ],
            "numInfants": 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"
      ],
      "brandCodes": [
        "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,
      "virtualPaymentOnly": false,
      "specificHotelSearch": false
    },
    "sortOptions": [
      {
        "sortBy": "PRICE",
        "sortOrder": "ASCENDING"
      }
    ],
    "userId": {
      "userIdType": "USER_ID",
      "userId": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
      }
    },
    "paginationParams": {
      "requestType": "PAGE_TOKEN",
      "pageToken": "token"
    },
    "corporateInfo": {
      "preSearchAnswers": {
        "answers": [
          {
            "entityId": "string",
            "userInput": "string",
            "itemIds": [
              0
            ],
            "answers": [
              {
                "item": "string",
                "value": "string",
                "description": "string"
              }
            ],
            "customFieldType": "QUESTION",
            "questionDisplayText": "string",
            "question": {
              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
              "name": "string",
              "questionFormat": "CHECKBOX",
              "optionInfo": {
                "source": "MANUAL",
                "sourceMetadata": {},
                "totalNumOptions": 0,
                "options": [
                  null
                ]
              },
              "isRequired": true,
              "isDisabled": true,
              "includeInItinerary": true,
              "customFieldLocations": [
                "POLICY_APPROVAL_EMAIL"
              ],
              "matchConditions": {
                "travelerConditions": {
                  "workerTypes": [],
                  "countries": [],
                  "legalEntities": [],
                  "departments": [],
                  "costCenters": [],
                  "offices": []
                },
                "travelTypes": [
                  null
                ],
                "travelRegionTypes": [
                  null
                ],
                "tripUsageTypes": [
                  null
                ]
              },
              "questionType": {
                "preSearchQuestionType": "PURPOSE_OF_TRIP",
                "preCheckoutQuestionType": "OOP_REASON_CODE"
              }
            }
          }
        ],
        "userEntitiesResponseId": "string"
      },
      "customFieldV3Responses": [
        {
          "fieldId": "84922011-b03d-4966-bc95-c5b49bc2e342",
          "fieldName": "string",
          "armId": "0fd508db-63ff-4444-bfb1-b89c43061433",
          "includeLocations": [
            "APPROVAL_EMAILS"
          ],
          "selectedOptions": [
            {
              "name": "string",
              "translatedName": "string",
              "description": "string",
              "translatedDescription": "string",
              "additionalUserInput": "string",
              "additionalInfos": [
                "string"
              ],
              "additionalInfoConfigs": [
                {}
              ],
              "optionId": "dee15a0e-f1fe-4cd8-88ac-c090810707f8"
            }
          ]
        }
      ]
    },
    "currencyCode": "USD",
    "sessionId": "string",
    "tripId": "string",
    "searchMetadata": {
      "autocompleteSearchType": "UNKNOWN_TYPE",
      "searchString": "The Savoy"
    }
  }'

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.

virtualPaymentAvailableboolean

Indicates whether a virtual card payment source is available to the traveler for the hotels in this search.

Example:false
virtualPaymentMandatedboolean

Indicates whether virtual payment is mandated for the traveler.

Example:false
Response
{ "hotels": [ { … } ], "metadata": { "availableHotelChains": [ … ], "rateStatistics": { … }, "showOnlyBaseFare": false, "sessionId": "string" }, "paginationParams": { "nextPageToken": "string", "currentPageSize": 10, "currentPageIndex": 1, "totalNumPages": 7, "totalNumResults": 581, "searchKey": "string" }, "virtualPaymentAvailable": false, "virtualPaymentMandated": false }