Skip to main content
GET
Search Hotels returns quickly, and some cards come back with price.status = "checking" because suppliers are still being asked. This endpoint is how those cards get their prices. Call it every 2 seconds while the result page is visible. Each response has the current price and supplier_prices of every hotel in the search session, in the same shape and with the same rules as the search cards. Only the organization that ran the search can poll it. Any other caller gets 404.

When to call it

  • Start when the search response has data.refresh_status = "PENDING". If it is NA, the prices you already have are final for this search and you do not need to poll.
  • Poll every 2 seconds, and only while the customer is looking at the results. Stop when they leave the page.
  • Stop as soon as data.status is COMPLETE or EXPIRED. Apply that last response first.
  • Any card can change between polls while data.status is PENDING or REFRESHING: checking becomes priced, no_price or unpriced, and a priced card can drop to a lower amount when a cheaper supplier answers.

Request examples

To prioritize the cards on screen, pass up to 50 comma-separated hotel IDs as refresh_ids:

Update the result list

1

Keep the search ID

Save data.search_id from the search response.
2

Poll every 2 seconds

Poll while results are visible. Add refresh_ids for the hotels in the viewport when the guest scrolls.
3

Replace each card's price

For every entry in data.hotels, find the card with the same hotel_id and replace its price and supplier_prices. Replace, do not merge: the entry is the full current state. Ignore entries for hotels you do not display (the session can include hotels just beyond the page).
4

Stop the loop

Keep polling while data.status is PENDING or REFRESHING. Stop on COMPLETE, EXPIRED, or when the customer leaves.
Keep the server’s order of the list. Updating prices in place does not change positions.

Response example

Response field guide

price fields are the ones described in Search Hotels: status, amount (minor units of currency, whole stay), currency, supplier_amount, supplier_currency, rate_type, reason, fetched_at, supplier_code, is_refundable, free_cancellation_until. In poll responses sort_basis is always null.

What to show for each status

price.amount is a number only when price.status is live or recent, a real supplier quote for this exact search. Otherwise it is null. price.reason is null unless the status is unpriced, then one of not_mapped, supplier_error, timeout, not_queried, no_result. Treat an unknown status as no price. A hotel can move from checking to any other status. A live or recent hotel can get a lower price.amount when a cheaper supplier answers later, so re-render the amount on every update.

Several suppliers

supplier_prices can hold several quotes for the same hotel_id with different supplier_code values. price shows the lowest. Unifystays returns every quote, so your integration decides which one to display: lowest, latest or a preferred supplier. Quotes are in minor units of their currency, the same display currency as the search, and each carries the supplier’s own supplier_amount and supplier_currency. Contract v1 polls (updated_prices) are presented in the display currency too. A hotel you already showed is never removed from your list by a poll; only its card changes state.

Common mistakes

  • Polling forever. Stop on COMPLETE or EXPIRED.
  • Polling faster than every 2 seconds, or while the page is hidden.
  • Merging poll prices into the old object instead of replacing price and supplier_prices.
  • Treating a missing hotel in the poll as sold out. Only no_price means sold out.
  • Continuing to use a search_id after a 404. Run the search again.

How no-price history affects later searches

No-price history is isolated by account, environment and the exact set of suppliers enabled for it. It never affects another account’s search.
  • After a completed no-price result, the same hotel and exact stay may be left out of a new search for 30 minutes.
  • A hotel may be left out more broadly after no-price results on at least three distinct check-in dates in the previous 14 days.
  • A later live price clears that history.
  • Enabling or disabling a supplier starts a new supplier scope, so older history from a different set is not used.
  • Supplier failures and timeouts do not count as no-price evidence.
This only applies when a new search is made. For the current search you stay in control of how each no_price hotel appears.

Next step

When the guest picks a hotel, call Get Hotel Rooms for bookable offers. The OpenAPI section below contains every status value, parameter and the exact payload.

Authorizations

x-api-key
string
header
required

Environment-specific API key created in the Unifystays portal

Headers

X-Unifystays-Contract-Version
enum<string>
default:2

Hotel API contract version. Optional: 2 is the current version and the default.

Available options:
2
X-Unifystays-Currency
string

ISO 4217 currency for display amounts (display_ledger, display_amount, commercial_display). Optional: defaults to your organization's display currency, USD unless configured. Read pricing.display_currency in the response.

Required string length: 3
Example:

"EUR"

Path Parameters

searchId
string
required

Search session ID from data.search_id of the Search Hotels response. Valid for about 5 minutes from the search; unknown, expired or other-organization IDs return 404.

Example:

"srch_a1b2c3d4e5f6g7h8"

Query Parameters

refresh_ids
string

Optional comma-separated hotel IDs (max 50) that are on screen right now, for example the hotels in the viewport. Hotels without a fresh price are queued for the supplier refresh, and the search_id stays valid for 5 more minutes. Hotels that are already fresh are skipped.

Example:

"15419351,15312010"

Response

One price object per hotel of the session, plus every supplier quote received so far.

contract_version
string
required

Response contract version. Always 2.

Example:

"2"

success
boolean
required

True when the request succeeded.

Example:

true

message
string
required

Human-readable status. Do not parse.

Example:

"Price refresh status fetched"

data
object
required

Current prices for the search session.