action viator_search_products { label: "/search/products" description: "Search for products\nThis service is used to search for products based on various criteria; such as:\n* the destination (locale) in which it operates\n* its association with a tourist attraction\n* its category and/or subcategory\n* the time period during which it operates\nThe fields you include in the request body for this service determine the kind of search that will be performed.\n\n**<u>Note</u>**: \n\n* You can search **EITHER** by destination (`destId`) **OR** by attraction-link (`seoId`), but not both.\n* The destination identifier (`destId`) can be retrieved from the [/taxonomy/destinations](#operation/taxonomyDestinations) service.\n* The category (`catId`) and subcategory (`subCatId`) identifiers can be retrieved from the [/taxonomy/categories](#operation/taxonomyCategories) service.\n* The attraction identifier (`seoId`) can be retrieved from the [/taxonomy/attractions](#operation/taxonomyAttractions) service.\n\n**<u>Examples</u>**:\n\n**Search by destination**:\n\n* E.g., \"Top ten highest-rated yoga classes operating in Las Vegas:\n```javascript\n{\n \"destId\": 684,\n \"subCatId\": 26052,\n \"sortOrder\": \"REVIEW_AVG_RATING_D\",\n \"topX\": \"1-3\"\n}\n```\n\n**Search by attraction-link**:\n\n* E.g., \"Products related to Everglades National Park operating 21-26 May 2019 in order of descending price\":\n```javascript\n{\n \"seoId\": 1115,\n \"sortOrder\": \"PRICE_FROM_D\",\n \"topX\": \"1-3\"\n}\n```\n\n**<u>'Freesale-only' merchants</u>**:\n- Merchants with a \"freesale only\" key *must* pass `startDate` and `endDate` to this service to retrieve a list of all available 'freesale' products (and 'freesale/on-request' products that are currently 'freesale') in the destination. \n- E.g., the following request body will result in 'freesale/on-request' products within their on-request period not appearing in the results from this service. \n```javascript\n{\n \"destId\": 684,\n \"startDate\": \"2020-02-21\",\n \"endDate\": \"2020-03-21\",\n \"sortOrder\": \"PRICE_FROM_D\",\n \"topX\": \"1-3\"\n}\n```\n\n- If `startDate` and `endDate` are omitted, 'freesale/on-request' products that are presently within their on-request period may appear to be available to customers, but won't be available at the time of booking.\n" provider: viator method: POST path: "/search/products" encoding: json input: { type: "object" properties: { catId: { type: "integer" description: "**unique numeric identifier** of *this* product category to search within\n- `categoryId` can be retrieved from the [/taxonomy/categories](#operation/taxonomyCategories) service\n- at present, it is not possible to use `catId` in conjunction with `seoId`\n" } currencyCode: { type: "string" description: "**currency** in which to display product prices" } destId: { type: "integer" description: "**unique numeric identifier** of the destination in which to search for products\n- `destinationId` is available from the [/taxonomy/destinations](#operation/taxonomyDestinations) service\n- use **EITHER** `destId` **OR** `seoId`, but not both\n" } endDate: { type: "string" description: "**end date delimiter** for the search (must be in the future)\n- e.g., `'2019-10-21'`\n" } seoId: { type: "string" description: "**search restriction specifier** for products associated with an attraction uniquely identified by `seoId`\n- use **EITHER** `destId` **OR** `seoId`, but not both\n" } sortOrder: { type: "string" description: "**sort order** in which to return the results that is *one of*:\n\n - `\"TOP_SELLERS\"`: the top sellers\n - `\"REVIEW_AVG_RATING_A\"`: ascending by average traveler rating (low -> high)\n - `\"REVIEW_AVG_RATING_D\"`: descending by average traveler rating (high -> low)\n - `\"PRICE_FROM_A\"`: ascending by price (low -> high)\n - `\"PRICE_FROM_D\"`: descending by price (high -> low) \n" enum: ["TOP_SELLERS", "REVIEW_AVG_RATING_A", "REVIEW_AVG_RATING_D", "PRICE_FROM_A", "PRICE_FROM_D"] } startDate: { type: "string" description: "**start date delimiter** for the search (must be in the future)\n- e.g., `'2018-10-21'`\n" } subCatId: { type: "integer" description: "**unique numeric identifier** of *this* product subcategory to search within\n- `subcategoryId` can be retrieved from the [/taxonomy/categories](#operation/taxonomyCategories) service\n- at present, it is not possible to use `subCatId` in conjunction with `seoId`\n" } topX: { type: "string" description: "**start and end rows** to return in the format {start}-{end}\n- e.g. `'1-10'`, `'11-20'`\n\n**Note**: \n- the maximum number of rows per request is 100; therefore, `'100-400'` will return the same as `'100-200'`\n- if `topX` is not specified, the default is `'1-100'`\n" } } } output: { type: "object" } }