@findhotel/sapi 1.7.8 → 1.7.10-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -32,6 +32,7 @@ hotels, hotels\' offers and rooms.
32
32
  - [Filters](#filters)
33
33
  - [Facilities](#facilities)
34
34
  - [Property types](#property-types)
35
+ - [Amenities](#amenities)
35
36
  - [Callbacks](#callbacks)
36
37
  - [Response](#response-1)
37
38
  - [Load more results and load more offers for a hotel](#load-more-results-and-load-more-offers-for-a-hotel)
@@ -481,7 +482,7 @@ split2: `checkIn: '2023-08-12'` `checkOut: '2023-08-15'`
481
482
  <a id="search-filters"></a>
482
483
 
483
484
  | name | type | description | example | filter scope |
484
- |--------------------|------------|----------------------------------------------------------------------------------------------------|--------------------------------| ------------ |
485
+ | ------------------ | ---------- | -------------------------------------------------------------------------------------------------- | ------------------------------ | ------------ |
485
486
  | `themeIds` | `number[]` | Facet filtering by theme ids | `[1, 2, 3]` | Hotel |
486
487
  | `chainIds` | `number[]` | Hotels' chain ids | `[4, 5]` | Hotel |
487
488
  | `facilities` | `string[]` | Facility ids used for facet filtering | `[299,7,6,21]` | Hotel |
@@ -495,7 +496,7 @@ split2: `checkIn: '2023-08-12'` `checkOut: '2023-08-15'`
495
496
  | `freeCancellation` | `boolean` | If true, only offers with free cancellation will be returned | `true` | Offer |
496
497
  | `payLater` | `boolean` | If true, only offers with pay later option will be returned | `true` | Offer |
497
498
  | `mealIncluded` | `boolean` | If true, only offers with meal included option will be returned | `true` | Offer |
498
- | `amenities` | `string[]` | [Meal types](#filters-amenities) | `["breakfast","allInclusive"]` | |
499
+ | `amenities` | `string[]` | [Meal types](#filters-amenities) | `["breakfast","allInclusive"]` | |
499
500
  | `isVr` | `boolean` | If true, then only vacation rentals are returned. If false, then vacation rentals are filtered out | `true` | Hotel |
500
501
 
501
502
  ##### Facilities
@@ -528,14 +529,14 @@ Some of the property types used for filtering:
528
529
  <a id="filters-amenities"></a>
529
530
  Supported amenities:
530
531
 
531
- | name | description |
532
- | ----------------- |--------------------------------------------------------------------------------------|
533
- | `breakfast` | |
534
- | `lunch` | |
535
- | `dinner` | |
536
- | `halfBoard` | "breakfast && dinner", or the hotel’s explicit use of the term "half-board" |
537
- | `fullBoard` | "breakfast && lunch && dinner", or the hotel’s explicit use of the term "full-board" |
538
- | `allInclusive` | "all meals && all drinks" or the hotel’s explicit use of the term "all-inclusive" |
532
+ | name | description |
533
+ | -------------- | ------------------------------------------------------------------------------------ |
534
+ | `breakfast` | |
535
+ | `lunch` | |
536
+ | `dinner` | |
537
+ | `halfBoard` | "breakfast && dinner", or the hotel’s explicit use of the term "half-board" |
538
+ | `fullBoard` | "breakfast && lunch && dinner", or the hotel’s explicit use of the term "full-board" |
539
+ | `allInclusive` | "all meals && all drinks" or the hotel’s explicit use of the term "all-inclusive" |
539
540
 
540
541
 
541
542
  ### Callbacks
@@ -1147,26 +1148,27 @@ const offers = await sapiClient.offers(parameters, callbacks)
1147
1148
  ### Offers parameters
1148
1149
  <a id="offers-parameters"></a>
1149
1150
 
1150
- | name | type | description | required | example |
1151
- | ------------------ | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------ |
1152
- | `hotelId` | `string` | Hotel Id | yes | `1196472` |
1153
- | `checkIn` | `string` | Check in date (YYYY-MM-DD) (SDK generates default date if no provided) | no | `2022-10-10` |
1154
- | `checkOut` | `string` | Check out date (YYYY-MM-DD)) (SDK generates default date if no provided) | no | `2022-10-11` |
1155
- | `rooms` | `string` | [Rooms configuration](#rooms-configuration) | no | `2` |
1156
- | `searchId` | `string` | SearchId override (SDK generates a new one if no provided) | no | `08230dfcc5f0fb95caaa82ce559ea60c4a975d6f` |
1157
- | `cugDeals` | `string[]` | Codes of closed user group deals to retrieve offers | no | `['signed_in', 'offline']` |
1158
- | `tier` | `string` | User tier | no | `member` |
1159
- | `freeCancellation` | `boolean` | (Deprecated, use freeCancellation in the filters object instead) If true, only offers with free cancellation will be returned | no | `true` |
1160
- | `isAnchor` | `boolean` | Anchor/Non anchor hotel (default `false`) | no | `true` |
1161
- | `originId` | `string` | Identifier of origin where the request was originated | no | `c3po6twr70` |
1162
- | `label` | `string` | Opaque value that will be passed to tracking systems | no | `gha-vr` |
1163
- | `preferredRate` | `number` | Offer\'s price user saw on a CA (meta) platform | no | `196` |
1164
- | `metadata` | `Record<string, string>` | Additional data to be passed to API | no | `{esd: 'abcds', epv: 'qwert'}` |
1165
- | `filters` | `Object` | Object with [filters](#search-filters) | no | `{pay_later:true}` |
1166
- | `offersSort` | `string` | If present, sorts offers by price (see [explanation](#sort-offers)) | no | |
1167
- | `getAllOffers` | `boolean` | If `true` SAPI returns all (up to 23) offers for the hotel (by default or if it's `false` SAPI returns only up to 3 top offers) | no | |
1168
- | `optimizeRooms` | `boolean` | If `true` then rooms optimization logic is enabled. Rooms optimization tries to find best offer across possible rooms configurations for a given occupancy | no | |
1169
- | `sbc` | `string` | [Split Booking Configuration](#splitbookingconfiguration). If present, searches for split booking offers | no | `sbc: '2~3'` |
1151
+ | name | type | description | required | example |
1152
+ | --------------------- | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------ |
1153
+ | `hotelId` | `string` | Hotel Id | yes | `1196472` |
1154
+ | `checkIn` | `string` | Check in date (YYYY-MM-DD) (SDK generates default date if no provided) | no | `2022-10-10` |
1155
+ | `checkOut` | `string` | Check out date (YYYY-MM-DD)) (SDK generates default date if no provided) | no | `2022-10-11` |
1156
+ | `rooms` | `string` | [Rooms configuration](#rooms-configuration) | no | `2` |
1157
+ | `searchId` | `string` | SearchId override (SDK generates a new one if no provided) | no | `08230dfcc5f0fb95caaa82ce559ea60c4a975d6f` |
1158
+ | `cugDeals` | `string[]` | Codes of closed user group deals to retrieve offers | no | `['signed_in', 'offline']` |
1159
+ | `tier` | `string` | User tier | no | `member` |
1160
+ | `freeCancellation` | `boolean` | (Deprecated, use freeCancellation in the filters object instead) If true, only offers with free cancellation will be returned | no | `true` |
1161
+ | `isAnchor` | `boolean` | Anchor/Non anchor hotel (default `false`) | no | `true` |
1162
+ | `originId` | `string` | Identifier of origin where the request was originated | no | `c3po6twr70` |
1163
+ | `label` | `string` | Opaque value that will be passed to tracking systems | no | `gha-vr` |
1164
+ | `preferredRate` | `number` | Offer\'s price user saw on a CA (meta) platform | no | `196` |
1165
+ | `metadata` | `Record<string, string>` | Additional data to be passed to API | no | `{esd: 'abcds', epv: 'qwert'}` |
1166
+ | `filters` | `Object` | Object with [filters](#search-filters) | no | `{pay_later:true}` |
1167
+ | `offersSort` | `string` | If present, sorts offers by price (see [explanation](#sort-offers)) | no | |
1168
+ | `getAllOffers` | `boolean` | If `true` SAPI returns all (up to 23) offers for the hotel (by default or if it's `false` SAPI returns only up to 3 top offers) | no | |
1169
+ | `optimizeRooms` | `boolean` | If `true` then rooms optimization logic is enabled for non anchor hotels. Rooms optimization tries to find best offer across possible rooms configurations for a given occupancy | no | |
1170
+ | `optimizeAnchorRooms` | `boolean` | If `true` then rooms optimization logic is enabled for an anchor hotel. Rooms optimization tries to find best offer across possible rooms configurations for a given occupancy | no | |
1171
+ | `sbc` | `string` | [Split Booking Configuration](#splitbookingconfiguration). If present, searches for split booking offers | no | `sbc: '2~3'` |
1170
1172
 
1171
1173
  <a id="sort-offers"></a>
1172
1174
  Offer sorting by one parameter for now. It is `price`, but there are different variants of sorting by price.: