Структура ответа#
Детальное описание структуры ответа от /api/hotels/hotel_pricing.
Основная структура#
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
hotelId | string | Нет | Идентификатор отеля |
checkinDate | date | Да | Дата заезда (YYYY-MM-DD) |
checkoutDate | date | Да | Дата выезда (YYYY-MM-DD) |
searchId | string | Нет | Идентификатор для проверки цены и бронирования. Если searchId был передан в запросе — возвращается то же значение |
offers | Offer[] | Нет | Список доступных предложений |
hotelMetaPolicy | HotelMetaPolicy[] | Нет | Политики размещения объекта, сгруппированные по поставщику. Включает только поставщиков, чьи офферы вошли в offers |
Примеры ответов#
Успешный ответ#
Развернуть пример
1{
2 "hotelId": "hotel-001",
3 "checkinDate": "2025-12-15",
4 "checkoutDate": "2025-12-18",
5 "searchId": "search-xyz789",
6 "offers": [
7 {
8 "offerId": "offer-001",
9 "aiScore": 0.87,
10 "supplier": "ostrovok",
11 "contractId": "tywu2374u2dhs2ui",
12 "searchPresetId": "334ferf4545y3",
13 "pricingPresetId": "3454tf4454545",
14 "roomId": "room-101",
15 "roomGroupId": "room-group-101",
16 "offerType": "best",
17 "roomName": "Стандартный двухместный",
18 "allotment": 5,
19 "paymentType": "online",
20 "isRefundable": true,
21 "features": [
22 { "type": "bedding", "value": "3" }
23 ],
24 "bedVariants": [
25 [
26 { "bedType": "double", "count": 1, "isExtraBed": false }
27 ]
28 ],
29 "additionalServices": {
30 "meal": [
31 {
32 "type": "breakfast",
33 "inclusion": "notIncluded",
34 "price": 1500,
35 "currency": "RUB",
36 "priceUnit": "perGuestPerNight",
37 "canBeBooked": false,
38 "paymentPlace": "hotel"
39 }
40 ],
41 "earlyLateCheckout": [
42 {
43 "time": "18:00",
44 "availableStatus": "available",
45 "price": {
46 "total": {
47 "amount": 2000.00,
48 "currency": "RUB"
49 }
50 },
51 "canBeBooked": true,
52 "paymentPlace": "online"
53 }
54 ]
55 },
56 "roomAmenities": [
57 {
58 "id": "wifi",
59 "name": "Wi-Fi",
60 "group": "internet",
61 "included": true,
62 "amount": 0,
63 "currency": "RUB",
64 "vat": {
65 "isVatFree": true,
66 "included": true,
67 "value": {
68 "amount": 0,
69 "currency": "RUB"
70 },
71 "percent": "0"
72 }
73 },
74 {
75 "id": "ac",
76 "name": "Кондиционер",
77 "group": "comfort",
78 "included": true,
79 "amount": 0,
80 "currency": "RUB",
81 "vat": {
82 "isVatFree": true,
83 "included": true,
84 "value": {
85 "amount": 0,
86 "currency": "RUB"
87 },
88 "percent": "0"
89 }
90 }
91 ],
92 "roomImages": {
93 "main": "https://cdn.example.com/hotels/12345/room-101-main.jpg",
94 "gallery": [
95 "https://cdn.example.com/hotels/12345/room-101-main.jpg",
96 "https://cdn.example.com/hotels/12345/room-101-bathroom.jpg"
97 ]
98 },
99 "prices": {
100 "vat": {
101 "isVatFree": true,
102 "included": true,
103 "value": {
104 "amount": 0,
105 "currency": "RUB"
106 },
107 "percent": "0"
108 },
109 "totalPrice": {
110 "total": {
111 "amount": 1500.00,
112 "currency": "RUB"
113 },
114 "discount": {
115 "amount": 100.00,
116 "currency": "RUB"
117 },
118 "markup": {
119 "amount": 100,
120 "currency": "RUB"
121 },
122 "serviceFee": {
123 "amount": 0,
124 "currency": "RUB"
125 },
126 "supplier": {
127 "bar": {
128 "amount": 1400,
129 "currency": "RUB"
130 },
131 "gross": {
132 "amount": 1600,
133 "currency": "RUB"
134 },
135 "netto": {
136 "amount": 1400,
137 "currency": "RUB"
138 },
139 "rack": {
140 "amount": 0,
141 "currency": "RUB"
142 }
143 },
144 "commission": {
145 "margin": "100",
146 "marginCurrency": "RUB",
147 "subagent": {
148 "amount": 0,
149 "currency": "RUB"
150 },
151 "supplier": {
152 "amount": 200,
153 "currency": "RUB"
154 }
155 }
156 },
157 "meals": [
158 {
159 "mealId": "breakfast",
160 "mealName": "Завтрак",
161 "included": true,
162 "price": {
163 "total": {
164 "amount": 0,
165 "currency": "RUB"
166 },
167 "discount": {
168 "amount": 0,
169 "currency": "RUB"
170 },
171 "markup": {
172 "amount": 0,
173 "currency": "RUB"
174 },
175 "serviceFee": {
176 "amount": 0,
177 "currency": "RUB"
178 },
179 "supplier": {
180 "amount": 0,
181 "currency": "RUB"
182 },
183 "supplierBreakdown": {
184 "bar": {
185 "amount": 0,
186 "currency": "RUB"
187 },
188 "gross": {
189 "amount": 0,
190 "currency": "RUB"
191 },
192 "netto": {
193 "amount": 0,
194 "currency": "RUB"
195 },
196 "rack": {
197 "amount": 0,
198 "currency": "RUB"
199 }
200 },
201 "commission": {
202 "margin": "0",
203 "marginCurrency": "RUB",
204 "subagent": {
205 "amount": 0,
206 "currency": "RUB"
207 },
208 "supplier": {
209 "amount": 0,
210 "currency": "RUB"
211 }
212 },
213 "vat": {
214 "isVatFree": true,
215 "included": true,
216 "value": {
217 "amount": 0,
218 "currency": "RUB"
219 },
220 "percent": "0"
221 }
222 }
223 }
224 ],
225 "cancellationRules": {
226 "freeCancellationBefore": "2025-12-13T12:00:00+00:00",
227 "ruleList": [
228 {
229 "startAt": "2025-12-13T12:00:00+00:00",
230 "endAt": "2025-12-15T10:32:04.853Z",
231 "penalty": {
232 "total": {
233 "amount": 5000.00,
234 "currency": "RUB"
235 },
236 "discount": {
237 "amount": 0,
238 "currency": "RUB"
239 },
240 "markup": {
241 "amount": 0,
242 "currency": "RUB"
243 },
244 "serviceFee": {
245 "amount": 0,
246 "currency": "RUB"
247 },
248 "supplier": {
249 "amount": 5000,
250 "currency": "RUB"
251 },
252 "supplierBreakdown": {
253 "bar": {
254 "amount": 5000,
255 "currency": "RUB"
256 },
257 "gross": {
258 "amount": 5000,
259 "currency": "RUB"
260 },
261 "netto": {
262 "amount": 5000,
263 "currency": "RUB"
264 },
265 "rack": {
266 "amount": 0,
267 "currency": "RUB"
268 }
269 }
270 },
271 "commission": {
272 "margin": "0",
273 "marginCurrency": "RUB",
274 "subagent": {
275 "amount": 0,
276 "currency": "RUB"
277 },
278 "supplier": {
279 "amount": 0,
280 "currency": "RUB"
281 }
282 },
283 "vat": {
284 "isVatFree": true,
285 "included": true,
286 "value": {
287 "amount": 0,
288 "currency": "RUB"
289 },
290 "percent": "0"
291 }
292 }
293 ]
294 },
295 "taxData": {
296 "taxes": [
297 {
298 "name": "city_tax",
299 "isIncluded": false,
300 "amount": "15.00",
301 "currencyCode": "EUR"
302 }
303 ]
304 },
305 "earlyCheckin": [
306 {
307 "time": "10:00",
308 "availableStatus": "available",
309 "price": {
310 "total": {
311 "amount": 2000.00,
312 "currency": "RUB"
313 },
314 "discount": {
315 "amount": 0,
316 "currency": "RUB"
317 },
318 "markup": {
319 "amount": 0,
320 "currency": "RUB"
321 },
322 "serviceFee": {
323 "amount": 0,
324 "currency": "RUB"
325 },
326 "supplier": {
327 "amount": 0,
328 "currency": "RUB"
329 },
330 "supplierBreakdown": {
331 "bar": {
332 "amount": 0,
333 "currency": "RUB"
334 },
335 "gross": {
336 "amount": 0,
337 "currency": "RUB"
338 },
339 "netto": {
340 "amount": 0,
341 "currency": "RUB"
342 },
343 "rack": {
344 "amount": 0,
345 "currency": "RUB"
346 }
347 },
348 "commission": {
349 "margin": "0",
350 "marginCurrency": "RUB",
351 "subagent": {
352 "amount": 0,
353 "currency": "RUB"
354 },
355 "supplier": {
356 "amount": 0,
357 "currency": "RUB"
358 }
359 },
360 "vat": {
361 "isVatFree": true,
362 "included": true,
363 "value": {
364 "amount": 0,
365 "currency": "RUB"
366 },
367 "percent": "0"
368 }
369 }
370 }
371 ],
372 "lateCheckout": [
373 {
374 "time": "18:00",
375 "availableStatus": "onRequest",
376 "price": {
377 "total": {
378 "amount": 3000.00,
379 "currency": "RUB"
380 },
381 "discount": {
382 "amount": 0,
383 "currency": "RUB"
384 },
385 "markup": {
386 "amount": 0,
387 "currency": "RUB"
388 },
389 "serviceFee": {
390 "amount": 0,
391 "currency": "RUB"
392 },
393 "supplier": {
394 "amount": 0,
395 "currency": "RUB"
396 },
397 "supplierBreakdown": {
398 "bar": {
399 "amount": 0,
400 "currency": "RUB"
401 },
402 "gross": {
403 "amount": 0,
404 "currency": "RUB"
405 },
406 "netto": {
407 "amount": 0,
408 "currency": "RUB"
409 },
410 "rack": {
411 "amount": 0,
412 "currency": "RUB"
413 }
414 },
415 "commission": {
416 "margin": "0",
417 "marginCurrency": "RUB",
418 "subagent": {
419 "amount": 0,
420 "currency": "RUB"
421 },
422 "supplier": {
423 "amount": 0,
424 "currency": "RUB"
425 }
426 },
427 "vat": {
428 "isVatFree": true,
429 "included": true,
430 "value": {
431 "amount": 0,
432 "currency": "RUB"
433 },
434 "percent": "0"
435 }
436 }
437 }
438 ]
439 },
440 "offerExpiration": "2026-06-17T15:14:03.4719533+00:00",
441 "deposit": {
442 "value": {
443 "amount": 500,
444 "currency": "RUB"
445 },
446 "isRefundable": true
447 },
448 "isPetAvailable": true,
449 "checkinRules": [
450 {
451 "frontDeskTimeStart": "10:00",
452 "frontDeskTimeEnd": "20:00",
453 "keysPickup": "123",
454 "phone": "+123456",
455 "email": "email@gmail.com",
456 "address": "address 7/3",
457 "isContactless": true,
458 "comment": "Код замка 123"
459 }
460 ]
461 },
462 {
463 "offerId": "offer-002",
464 "aiScore": null,
465 "roomId": "room-201",
466 "roomName": "Люкс с видом на море",
467 "allotment": 2,
468 "paymentType": "online",
469 "isRefundable": true,
470 "features": [
471 { "type": "bedding", "value": "3" },
472 { "type": "view", "value": "31" }
473 ],
474 "roomImages": {
475 "main": "https://cdn.example.com/hotels/12345/room-101-main.jpg",
476 "gallery": [
477 "https://cdn.example.com/hotels/12345/room-101-main.jpg",
478 "https://cdn.example.com/hotels/12345/room-101-bathroom.jpg"
479 ]
480 },
481 "prices": {
482 "totalPrice": {
483 "total": {
484 "amount": 35000.00,
485 "currency": "RUB"
486 }
487 },
488 "meals": [
489 {
490 "mealId": "half_board",
491 "mealName": "Полупансион",
492 "included": true
493 }
494 ],
495 "cancellationRules": {
496 "freeCancellationBefore": "2025-12-10T12:00:00+00:00"
497 }
498 },
499 "deposit": {
500 "value": {
501 "amount": 500,
502 "currency": "RUB"
503 },
504 "isRefundable": true
505 },
506 "isPetAvailable": true,
507 "checkinRules": [
508 {
509 "frontDeskTimeStart": "00:00"
510 }
511 ]
512 }
513 ],
514 "hotelMetaPolicy": [
515 {
516 "supplier": "ostrovok",
517 "deposit": [
518 {
519 "allowed": "availabile",
520 "type": "cash",
521 "paymentType": "hotel",
522 "pricingMethod": "fixed",
523 "refundable": "refundable",
524 "price": 500,
525 "currency": "RUB",
526 "priceUnit": "perRoomPerStay"
527 }
528 ],
529 "extraInfo": [
530 {
531 "name": "important_info",
532 "supplier": "ostrovok",
533 "comment": "Необходимо предъявить паспорт при заселении"
534 }
535 ]
536 }
537 ]
538}Ответ с ошибкой#
1{
2 "error": {
3 "code": "NO_TARGETS",
4 "message": "No supplier targets available for this request.",
5 "description": "No supplier targets available for this request."
6 }
7}Типичные ошибки TAPI#
| Код ошибки | Причина | Решение |
|---|---|---|
INVALID_HOTEL_ID | Неверный формат hotelId | Проверьте формат переданного hotelId |
HOTEL_MAPPING_NOT_FOUND | Отель не найден в справочнике поставщика | Проверьте корректность hotelId |
NO_TARGETS | Нет доступных поставщиков/контрактов для выполнения запроса | Повторите запрос позже |
NO_SEARCH_PRESETS_CONFIGURED | Для клиента не настроен ни один пресет поиска | Настройте пресет поиска в личном кабинете |
NO_MATCHING_SEARCH_PRESET | Ни один настроенный пресет поиска не подходит под параметры запроса | Проверьте параметры запроса |
SUPPLIER_ERROR | Запрос к поставщику завершился с ошибкой | Повторите запрос позже |
SYSTEM_ERROR | Непредвиденная внутренняя ошибка TAPI | Обратитесь в поддержку |
VALIDATION_ERROR | Ошибка валидации запроса | Проверьте обязательные поля и форматы значений |
Помимо перечисленных TAPI-кодов, при ошибке на стороне поставщика в ответе может быть возвращён код ошибки поставщика без изменений (проброс) — набор таких кодов зависит от поставщика и не фиксирован.