Using the API for hotel aggregators

Use the API capabilities to pass the following data to Yandex: information about the hotels, room availability and rates, and the bookings made by people who went to your site from Yandex universal search results.

An access token is required for using the API. Ask the representative assigned to you for the token. Send the token with every request to the API.

Request limits

  • RPS limit: 100.

  • Maximum amount of data in a single request: 0.08 MB.

  • If these limits are exceeded, you'll receive a response with HTTP status code 429 (Too Many Requests):

    • api/v1/hotels (get data about all the hotels): 1 RPS.
    • api/v1/hotels/{hotelId}/offers (get all the offers of a specific hotel): 5 RPS.
    • api/v1/statistics-url (get a link to statistics): 1 RPS.

Resource overview

The API for aggregators can be accessed at this URL:

https://unisearch-hotels-pacific-partner-api.yandex.ru

Below is a list of API resources and supported operations.

URI

GET

POST

DELETE

Hotel data

/hotels

Get data about all the hotels

Update or add data about the hotels

/hotels/hotelId

Get data about one hotel

Update or add data about one hotel

Delete data about one hotel

Hotel offer data

/hotels/hotelId/offers

Get all the offers of a hotel

Update or add data about a hotel's offers

Delete data about multiple offers of a hotel by ID

/hotels/hotelId/offers/offerId

Get one offer of a hotel

Update or add data about one offer

Delete data about one offer

/offers

Update or add data about multiple hotels' offers

Delete data about multiple hotels' offers

Order data

/orders

Submit data about orders

Statistics

/statistics-url

Get links to statistics

Diagram of interaction via the API

Cashback display

Parameter

Required

Description

Note

promoId

Yes

The program ID. It determines:

  • Which feed offers this cashback applies to.
  • What user group this cashback is available to. Suppose one user group qualifies for a cashback of 10% and is assigned a program ID. If another group qualifies for a cashback of 15%, a different ID should be specified for it.

One user can participate in five programs.

cashback

Yes

The cashback amount. For example, 10.

Set as a percentage or in the cashback unit.

dateFrom

No

The date when your cashback program came into effect.

For example, 28.06.2023.

dateTo

No

The date when your cashback program was terminated.

For example, 29.06.2023.

phoneHash

Yes

The user's phone number.

Use hashing before sending data. This information is needed to identify users eligible for cashback. For such users, cashback display is enabled by default.

emailHash

Yes

The user's email address.

Use hashing before sending data. This information is needed to identify users eligible for cashback. For such users, cashback display is enabled by default.

Number of requests sent per second.