> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # SearchProducts # Package: suppliersHub # Namespace: MarketplaceProduct # Method link: https://dev.wix.com/docs/api-reference/business-solutions/suppliers-hub/products/search-products.md ## Permission Scopes: Read Marketplace: SCOPE.SUPPLIERS_HUB.READ_MARKETPLACE ## Introduction Retrieves a list of products, given the provided filtering, search expression, sorting, and cursor paging. Provides eventually consistent results optimized for product discovery and browsing. Search supports full-text queries, filters, sorting, and aggregations for faceted search. Use Search Products for user-facing product catalogs and discovery features. For real-time accuracy in operational tasks, use [Query Products](https://dev.wix.com/docs/api-reference/business-solutions/suppliers-hub/products/query-products.md) instead. --- ## REST API ### Schema ``` Method: searchProducts Description: Retrieves a list of products, given the provided filtering, search expression, sorting, and cursor paging. Provides eventually consistent results optimized for product discovery and browsing. Search supports full-text queries, filters, sorting, and aggregations for faceted search. Use Search Products for user-facing product catalogs and discovery features. For real-time accuracy in operational tasks, use [Query Products](https://dev.wix.com/docs/api-reference/business-solutions/suppliers-hub/products/query-products.md) instead. URL: https://www.wixapis.com/suppliers-hub/v1/products/search Method: POST Method parameters: param name: search | type: CursorSearch - name: cursorPaging | type: CursorPaging | description: Cursor pointing to page of results. When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided. - name: limit | type: integer | description: Maximum number of items to return in the results. - name: cursor | type: string | description: Pointer to the next or previous page in the list of results. Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request. - name: filter | type: object | description: A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf) - name: sort | type: array | description: Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] - name: fieldName | type: string | description: Name of the field to sort by. - name: order | type: SortOrder | description: Sort order. - enum: ASC, DESC - name: selectItemsBy | type: array | description: Filters to specify which element to use for sorting when `fieldName` refers to a repeated field marked as `MATCH_ITEMS`. These filters ensure the correct element is selected from the collection for sorting. Multiple filters are combined using the `AND` operator. For example, for a document like `{"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}`, if `nestedField` is marked as `MATCH_ITEMS`, sorting by price in the US region requires: `{fieldName: "nestedField.price", "selectItemsBy": [{"nestedField.region": "US"}]}`. - name: aggregations | type: array | description: Aggregations | Faceted search: refers to a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition. - ONE-OF: - name: value | type: ValueAggregation | description: Value aggregation - ONE-OF: - name: includeOptions | type: IncludeMissingValuesOptions | description: Options for including missing values - name: addToBucket | type: string | description: Can specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ... - name: sortType | type: SortType | description: Should sort by number of matches or value of the field - enum: - COUNT: Should sort by number of matches - VALUE: Should sort by value of the field alphabetically - name: sortDirection | type: SortDirection | description: Should sort in ascending or descending order - enum: - DESC: Should sort in descending order - ASC: Should sort in ascending order - name: limit | type: integer | description: How many aggregations would you like to return? Can be between 1 and 250. 10 is the default. - name: missingValues | type: MissingValues | description: Should missing values be included or excluded from the aggregation results. Default is EXCLUDE - enum: - EXCLUDE: Should missing values be excluded from the aggregation results - INCLUDE: Should missing values be included in the aggregation results - name: range | type: RangeAggregation | description: Range aggregation - name: buckets | type: array | description: List of range buckets, where during aggregation each entity will be placed in the first bucket where its value falls into based on provided range bounds - name: from | type: number | description: Inclusive lower bound of the range. Required if to is not given - name: to | type: number | description: Exclusive upper bound of the range. Required if from is not given - name: scalar | type: ScalarAggregation | description: Scalar aggregation - name: type | type: ScalarType | description: Define the operator for the scalar aggregation - enum: - COUNT_DISTINCT: Count of distinct values - MIN: Minimum value - MAX: Maximum value - name: dateHistogram | type: DateHistogramAggregation | description: Date histogram aggregation - name: interval | type: Interval | description: Interval for date histogram aggregation - enum: - YEAR: Yearly interval - MONTH: Monthly interval - WEEK: Weekly interval - DAY: Daily interval - HOUR: Hourly interval - MINUTE: Minute interval - SECOND: Second interval - name: nested | type: NestedAggregation | description: Nested aggregation - name: nestedAggregations | type: array | description: Flattened list of aggregations, where each next aggregation is nested within previous one - ONE-OF: - name: value | type: ValueAggregation | description: Value aggregation - name: range | type: RangeAggregation | description: Range aggregation - name: scalar | type: ScalarAggregation | description: Scalar aggregation - name: dateHistogram | type: DateHistogramAggregation | description: Date histogram aggregation - name: name | type: string | description: User-defined name of aggregation, should be unique, will appear in aggregation results - name: type | type: NestedAggregationType | description: Type of aggregation, client must provide matching aggregation field below - enum: - VALUE: An aggregation where result buckets are dynamically built - one per unique value - RANGE: An aggregation, where user can define set of ranges - each representing a bucket - SCALAR: A single-value metric aggregation - e.g. min, max, sum, avg - DATE_HISTOGRAM: An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) - name: fieldPath | type: string | description: Field to aggregate by, use dont notation to specify json path - name: name | type: string | description: User-defined name of aggregation, should be unique, will appear in aggregation results - name: type | type: AggregationType | description: Type of aggregation, client must provide matching aggregation field below - enum: - VALUE: An aggregation where result buckets are dynamically built - one per unique value - RANGE: An aggregation, where user can define set of ranges - each representing a bucket - SCALAR: A single-value metric aggregation - e.g. min, max, sum, avg - DATE_HISTOGRAM: An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) - NESTED: Multi-level aggregation, where each next aggregation is nested within previous one - name: fieldPath | type: string | description: Field to aggregate by, use dot notation to specify json path - name: search | type: SearchDetails | description: Free text to match in searchable fields - name: expression | type: string | description: Search term or expression - name: timeZone | type: string | description: UTC offset or IANA time zone. Valid values are ISO 8601 UTC offsets, such as +02:00 or -06:00, and IANA time zone GUIDs, such as Europe/Rome Affects all filters and aggregations returned values. You may override this behavior in a specific filter by providing timestamps including time zone. e.g. `"2023-12-20T10:52:34.795Z"` Return type: SearchProductsResponse - name: products | type: array | description: Products matching the search criteria. - name: id | type: string | description: Product GUID. - name: createdDate | type: string | description: Date and time the product was created. - name: updatedDate | type: string | description: Date and time the product was updated. - name: providerInfo | type: ProviderInfo | description: Information about the business partner providing this product. - name: appId | type: string | description: Provider application GUID. - name: productId | type: string | description: Unique product identifier on the provider's platform. This field serves as the external system's primary key for synchronization and prevents duplicate products from being created. Once set, you can't change this field. - name: productCreatedDate | type: string | description: Date and time the product was created on the provider's platform. This field helps maintain the connection to the original product source. Once set, you can't change this field. - name: url | type: string | description: Product URL on the provider's platform. - name: name | type: string | description: Product name. - name: description | type: string | description: Product description. - name: visible | type: boolean | description: Whether the product is visible in the Marketplace. Default: `true` - name: media | type: Media | description: Product media. - name: main | type: Image | description: Primary product image, automatically set from the first item in the `items` array. - name: id | type: string | description: WixMedia image GUID. - name: url | type: string | description: Image URL. - name: height | type: integer | description: Original image height. - name: width | type: integer | description: Original image width. - name: altText | type: string | description: Image alt text. - name: filename | type: string | description: Image filename. - name: items | type: array | description: Product images. The first image becomes the main image. - name: types | type: array | description: Business model types this product supports. - enum: - DROPSHIPPING: Product is fulfilled by the supplier without inventory management by the store owner. - WHOLESALE: Product is sold in bulk quantities with tiered pricing. - PRINT_ON_DEMAND: Product is manufactured after purchase; no pre‑held inventory. - name: options | type: array | description: Product options that customers can choose from. Options display available product variations like size and color to help buyers make purchase decisions. Currently, options are informational only and don't create separate inventory items or variants. There are 2 predefined option types you can use: - `color`: Color choices for the product. Values should be standard color names. For example, `"Black"`, `"White"`, `"Yellow"`. - `size`: Size choices for the product. Values should be standard size labels. For example, `"S"`, `"M"`, `"L"`, `"XL"`. - name: name | type: string | description: Option name. There are 2 predefined options you can use: - `color`: Represents color choices for the product. Values should be standard color names. For example, `"Black"`, `"White"`, `"Yellow"`. - `size`: Represents size choices for the product. Values should be standard size labels. For example, `"S"`, `"M"`, `"L"`, `"XL"`. - name: description | type: string | description: Optional description explaining the option. - name: values | type: array | description: Available values for this option. - ONE-OF: - name: color | type: ColorOption | description: Color option with name, hex code, and sort order. - name: name | type: string | description: Color name. For example, `"Black"` or `"Navy Blue"`. Use 'Multicolor' for mixed colors. When using 'Multicolor', do not provide a hex value. - name: hex | type: string | description: Hex color code. For example, `"#000000"` for black. Omit for 'Multicolor'. - name: ribbonName | type: string | description: Promotional ribbon text displayed on the product. For example, `"New Arrival"` or `"Bestseller"`. - name: brand | type: string | description: Brand name. - name: orderProcessingTime | type: TimeInterval | description: Time required to process orders before shipping. - name: min | type: TimeValue | description: Minimum time in the range. - name: value | type: integer | description: Numeric time value. For example, `2` for "2 days". - name: unit | type: TimeUnit | description: Time unit for the value. - enum: - DAY: Days. - WEEK: Weeks. - MONTH: Months. - name: max | type: TimeValue | description: Maximum time in the range. - name: shippingDestinations | type: array | description: Countries and regions where this product can be shipped, with location-specific pricing and timing. - ONE-OF: - name: specificCountrySelections | type: Countries | description: Specific countries. Used when `countrySelections` is `SPECIFIC_COUNTRY`. - name: countries | type: array | description: Country codes, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1) format. - name: countrySelections | type: CountrySelections | description: Indicates if shipping applies to selected countries or to all other regions. - enum: - REST_OF_THE_WORLD: All countries not specifically listed elsewhere. - SPECIFIC_COUNTRY: Specific countries listed in the `countries` field. - name: minimumShippingCost | type: string | description: Minimum shipping cost to this destination in USD. - name: shippingTime | type: TimeInterval | description: Expected shipping time to this destination. - name: minimumProductCost | type: string | description: Minimum Product Cost to the Shipping Location - name: minimumPrice | type: string | description: Minimum price, in USD. - name: productOrigin | type: string | description: Country where the product is manufactured or originates from, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. - name: directCategories | type: array | description: List of categories that directly contain this product. Each category's namespace must match at least one of the product's types. For example, if a product has type `DROPSHIPPING`, its categories must use `DROPSHIPPING_NAMESPACE`. Products with both `DROPSHIPPING` and `WHOLESALE` types can have categories from both namespaces. - name: id | type: string | description: Category GUID. - name: index | type: integer | description: Product's position within this category. - name: namespace | type: CategoryNamespace | description: The namespace of the category tree this assignment belongs to. - enum: - DROPSHIPPING_NAMESPACE: Namespace for the dropshipping category tree. - WHOLESALE_NAMESPACE: Namespace for the wholesale category tree. - PRINT_ON_DEMAND_NAMESPACE: Namespace for the print on demand category tree. - name: allCategories | type: array | description: List of categories that directly contain this product, as well as their parent categories. - name: wholesaleOptions | type: WholesaleOptions | description: Wholesale-specific configuration including tiered pricing and minimum order quantities. Required when `types` includes `WHOLESALE`. - name: priceTiers | type: array | description: Tiered pricing based on order quantity ranges. Price tiers must be continuous with no gaps in quantity ranges. For example, if tier 1 covers quantities 1-100, tier 2 must start at 101. The system validates tier continuity when creating or updating products. - name: priceFrom | type: string | description: Minimum price for this quantity tier in USD. If `priceTo` isn't specified, this price applies to all quantities in the tier. - name: priceTo | type: string | description: Maximum price for this quantity tier in USD. Optional for fixed-price tiers. - name: countFrom | type: integer | description: Minimum quantity for this price tier, inclusive. - name: countTo | type: integer | description: Maximum quantity for this price tier, inclusive. If not specified, this tier applies to all quantities greater or equal to `countFrom`. - name: minimumOrderQuantity | type: integer | description: Minimum quantity required for wholesale orders. - name: supplierInfo | type: SupplierInfo | description: Information about the supplier including name, rating, and trust status. - name: id | type: string | description: Supplier GUID. When provided, references a supplier in the Marketplace Supplier service. The system automatically retrieves and populates the supplier's name, rating, and verification status. - name: name | type: string | description: Supplier name. Automatically populated from the Supplier service when `id` is provided. - name: rating | type: string | description: Supplier rating from 1.00 to 5.00. Automatically populated from the Supplier service when `id` is provided. - name: verified | type: boolean | description: Whether the supplier has been verified by the Marketplace. Verified suppliers have completed the Marketplace verification process. Automatically populated from the Supplier service when `id` is provided. Default: `false` - name: printOnDemandOptions | type: PrintOnDemandOptions | description: Print-on-demand-specific configuration including supported print technologies and mockup assets. Required when `types` include `PRINT_ON_DEMAND`. - name: printTechnologies | type: array | description: Set of possible print technologies for the Product - enum: - DIRECT_TO_FILM: Transfers printed on film and heat-pressed onto fabric. - DIRECT_TO_GARMENT: Ink directly onto garment. - CUT_SEW_SUBLIMATION: Panels are printed first, then sewn. All‑over coverage with precise placements. - DIGITAL_PRINTING: Non‑DTG digital methods (e.g., roll‑to‑roll). - EMBROIDERY: Stitched threads, premium look. - SUBLIMATION: Dye infused into polyester/poly‑coated substrates. - UV_PRINTING: Cures ink with UV light on rigid or treated surfaces. - KNITWEAR: Pattern/design is knitted, not printed. - DIRECT_TO_FABRIC: Designs are printed directly onto rolls of fabric, which are then cut and sewn into the final product. - name: mockupImage | type: Image | description: Mockup image of the product with 'Your Image Here' text. - name: sizeGuides | type: array | description: Information about the product sizing - name: measurementUnit | type: MeasurementUnit | description: Sizes units (inches or cm) - enum: CM, INCHES - name: description | type: string | description: Text description of the size guide - name: imageUrl | type: string | description: Image for the size guide - name: imageDescription | type: string | description: Text description of the image content - name: specifications | type: array | description: Sizes specifications - name: category | type: string | description: What is measured, e.g. chest, waist, sleeve - name: measurements | type: array | description: Measurements for different sizes - ONE-OF: - name: singleValue | type: string | description: The value of the size in case of single value - name: range | type: MeasurementValueRange | description: The value of the size in case of range (min/max) - name: minimum | type: string | description: Minimum value - name: maximum | type: string | description: Maximum value - name: sizeLabel | type: string | description: Product size, e.g. S, M, L - name: tags | type: Tags | description: Product tags for organization and filtering. - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, normally not given to site members or visitors. - name: tagIds | type: array | description: List of tag GUIDs. - name: publicTags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. - name: pagingMetadata | type: CursorPagingMetadata | description: Paging information for retrieving additional results. - name: count | type: integer | description: Number of items returned in the response. - name: cursors | type: Cursors | description: Cursor strings that point to the next page, previous page, or both. - name: next | type: string | description: Cursor string pointing to the next page in the list of results. - name: prev | type: string | description: Cursor pointing to the previous page in the list of results. - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page. + `true`: Another page of results can be retrieved. + `false`: This is the last page. - name: aggregationData | type: AggregationData | description: Aggregation results for faceted search. - name: results | type: array | description: key = aggregation name (as derived from search request) - ONE-OF: - name: values | type: ValueResults | description: Value aggregation results - name: results | type: array | description: List of value aggregations - name: value | type: string | description: Value of the field - name: count | type: integer | description: Count of entities with this value - name: ranges | type: RangeResults | description: Range aggregation results - name: results | type: array | description: List of ranges returned in same order as requested - name: from | type: number | description: Inclusive lower bound of the range - name: to | type: number | description: Exclusive upper bound of the range - name: count | type: integer | description: Count of entities in this range - name: scalar | type: ScalarResult | description: Scalar aggregation results - name: type | type: ScalarType | description: Type of scalar aggregation - enum: - COUNT_DISTINCT: Count of distinct values - MIN: Minimum value - MAX: Maximum value - name: value | type: number | description: Value of the scalar aggregation - name: groupedByValue | type: GroupByValueResults | description: Group by value aggregation results - name: results | type: array | description: List of value aggregations - name: value | type: string | description: Value of the field - name: nestedResults | type: NestedAggregationResults | description: Nested aggregations - ONE-OF: - name: values | type: ValueResults | description: Value aggregation results - name: ranges | type: RangeResults | description: Range aggregation results - name: scalar | type: ScalarResult | description: Scalar aggregation results - name: name | type: string | description: User-defined name of aggregation, matches the one provided in request - name: type | type: AggregationType | description: Type of aggregation that matches result - enum: - VALUE: An aggregation where result buckets are dynamically built - one per unique value - RANGE: An aggregation, where user can define set of ranges - each representing a bucket - SCALAR: A single-value metric aggregation - e.g. min, max, sum, avg - DATE_HISTOGRAM: An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) - NESTED: Multi-level aggregation, where each next aggregation is nested within previous one - name: fieldPath | type: string | description: Field to aggregate by, matches the one provided in request - name: dateHistogram | type: DateHistogramResults | description: Date histogram aggregation results - name: results | type: array | description: List of date histogram aggregations - name: value | type: string | description: Date in ISO 8601 format - name: count | type: integer | description: Count of documents in the bucket - name: nested | type: NestedResults | description: Nested aggregation results - name: results | type: array | description: List of nested aggregations - name: results | type: Map | description: List of nested aggregations - ONE-OF: - name: value | type: ValueResult | description: Value aggregation result - name: value | type: string | description: Value of the field - name: count | type: integer | description: Count of entities with this value - name: range | type: RangeResult | description: Range aggregation result - name: from | type: number | description: Inclusive lower bound of the range - name: to | type: number | description: Exclusive upper bound of the range - name: count | type: integer | description: Count of entities in this range - name: scalar | type: ScalarResult | description: Scalar aggregation result - name: value | type: number | description: Value of the scalar aggregation - name: dateHistogram | type: ValueResult | description: Date histogram aggregation result - name: name | type: string | description: User-defined name of aggregation as derived from search request - name: type | type: AggregationType | description: Type of aggregation that must match provided kind as derived from search request - name: fieldPath | type: string | description: Field to aggregate by as derived from search request ``` ### Examples ### Search products with text and filters Searches for products using text search and category filters with aggregations ```curl curl -X POST \ 'https://www.wixapis.com/suppliers-hub/v1/products/search' \ -H 'Authorization: ' \ -H 'Content-Type: application/json' \ -d '{ "search": { "search": { "expression": "t-shirt" }, "filter": { "brand": { "$ne": "Solara" } }, "sort": [ { "fieldName": "createdDate", "order": "DESC" } ], "aggregations": [ { "name": "Brands", "type": "VALUE", "fieldPath": "brand", "value": {} } ], "cursorPaging": { "limit": 5 } } }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.suppliersHub.MarketplaceProduct.searchProducts(search) Description: Retrieves a list of products, given the provided filtering, search expression, sorting, and cursor paging. Provides eventually consistent results optimized for product discovery and browsing. Search supports full-text queries, filters, sorting, and aggregations for faceted search. Use Search Products for user-facing product catalogs and discovery features. For real-time accuracy in operational tasks, use [Query Products](https://dev.wix.com/docs/api-reference/business-solutions/suppliers-hub/products/query-products.md) instead. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: search Method parameters: param name: search | type: CursorSearch | required: true - name: cursorPaging | type: CursorPaging | description: Cursor pointing to page of results. When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided. - name: limit | type: integer | description: Maximum number of items to return in the results. - name: cursor | type: string | description: Pointer to the next or previous page in the list of results. Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request. - name: filter | type: object | description: A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf) - name: sort | type: array | description: Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] - name: fieldName | type: string | description: Name of the field to sort by. - name: order | type: SortOrder | description: Sort order. - enum: ASC, DESC - name: selectItemsBy | type: array | description: Filters to specify which element to use for sorting when `fieldName` refers to a repeated field marked as `MATCH_ITEMS`. These filters ensure the correct element is selected from the collection for sorting. Multiple filters are combined using the `AND` operator. For example, for a document like `{"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}`, if `nestedField` is marked as `MATCH_ITEMS`, sorting by price in the US region requires: `{fieldName: "nestedField.price", "selectItemsBy": [{"nestedField.region": "US"}]}`. - name: aggregations | type: array | description: Aggregations | Faceted search: refers to a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition. - ONE-OF: - name: value | type: ValueAggregation | description: Value aggregation - ONE-OF: - name: includeOptions | type: IncludeMissingValuesOptions | description: Options for including missing values - name: addToBucket | type: string | description: Can specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ... - name: sortType | type: SortType | description: Should sort by number of matches or value of the field - enum: - COUNT: Should sort by number of matches - VALUE: Should sort by value of the field alphabetically - name: sortDirection | type: SortDirection | description: Should sort in ascending or descending order - enum: - DESC: Should sort in descending order - ASC: Should sort in ascending order - name: limit | type: integer | description: How many aggregations would you like to return? Can be between 1 and 250. 10 is the default. - name: missingValues | type: MissingValues | description: Should missing values be included or excluded from the aggregation results. Default is EXCLUDE - enum: - EXCLUDE: Should missing values be excluded from the aggregation results - INCLUDE: Should missing values be included in the aggregation results - name: range | type: RangeAggregation | description: Range aggregation - name: buckets | type: array | description: List of range buckets, where during aggregation each entity will be placed in the first bucket where its value falls into based on provided range bounds - name: from | type: number | description: Inclusive lower bound of the range. Required if to is not given - name: to | type: number | description: Exclusive upper bound of the range. Required if from is not given - name: scalar | type: ScalarAggregation | description: Scalar aggregation - name: type | type: ScalarType | description: Define the operator for the scalar aggregation - enum: - COUNT_DISTINCT: Count of distinct values - MIN: Minimum value - MAX: Maximum value - name: dateHistogram | type: DateHistogramAggregation | description: Date histogram aggregation - name: interval | type: Interval | description: Interval for date histogram aggregation - enum: - YEAR: Yearly interval - MONTH: Monthly interval - WEEK: Weekly interval - DAY: Daily interval - HOUR: Hourly interval - MINUTE: Minute interval - SECOND: Second interval - name: nested | type: NestedAggregation | description: Nested aggregation - name: nestedAggregations | type: array | description: Flattened list of aggregations, where each next aggregation is nested within previous one - ONE-OF: - name: value | type: ValueAggregation | description: Value aggregation - name: range | type: RangeAggregation | description: Range aggregation - name: scalar | type: ScalarAggregation | description: Scalar aggregation - name: dateHistogram | type: DateHistogramAggregation | description: Date histogram aggregation - name: name | type: string | description: User-defined name of aggregation, should be unique, will appear in aggregation results - name: type | type: NestedAggregationType | description: Type of aggregation, client must provide matching aggregation field below - enum: - VALUE: An aggregation where result buckets are dynamically built - one per unique value - RANGE: An aggregation, where user can define set of ranges - each representing a bucket - SCALAR: A single-value metric aggregation - e.g. min, max, sum, avg - DATE_HISTOGRAM: An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) - name: fieldPath | type: string | description: Field to aggregate by, use dont notation to specify json path - name: name | type: string | description: User-defined name of aggregation, should be unique, will appear in aggregation results - name: type | type: AggregationType | description: Type of aggregation, client must provide matching aggregation field below - enum: - VALUE: An aggregation where result buckets are dynamically built - one per unique value - RANGE: An aggregation, where user can define set of ranges - each representing a bucket - SCALAR: A single-value metric aggregation - e.g. min, max, sum, avg - DATE_HISTOGRAM: An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) - NESTED: Multi-level aggregation, where each next aggregation is nested within previous one - name: fieldPath | type: string | description: Field to aggregate by, use dot notation to specify json path - name: search | type: SearchDetails | description: Free text to match in searchable fields - name: expression | type: string | description: Search term or expression - name: timeZone | type: string | description: UTC offset or IANA time zone. Valid values are ISO 8601 UTC offsets, such as +02:00 or -06:00, and IANA time zone GUIDs, such as Europe/Rome Affects all filters and aggregations returned values. You may override this behavior in a specific filter by providing timestamps including time zone. e.g. `"2023-12-20T10:52:34.795Z"` Return type: PROMISE - name: products | type: array | description: Products matching the search criteria. - name: _id | type: string | description: Product GUID. - name: _createdDate | type: Date | description: Date and time the product was created. - name: _updatedDate | type: Date | description: Date and time the product was updated. - name: providerInfo | type: ProviderInfo | description: Information about the business partner providing this product. - name: appId | type: string | description: Provider application GUID. - name: productId | type: string | description: Unique product identifier on the provider's platform. This field serves as the external system's primary key for synchronization and prevents duplicate products from being created. Once set, you can't change this field. - name: productCreatedDate | type: Date | description: Date and time the product was created on the provider's platform. This field helps maintain the connection to the original product source. Once set, you can't change this field. - name: url | type: string | description: Product URL on the provider's platform. - name: name | type: string | description: Product name. - name: description | type: string | description: Product description. - name: visible | type: boolean | description: Whether the product is visible in the Marketplace. Default: `true` - name: media | type: Media | description: Product media. - name: main | type: string | description: Primary product image, automatically set from the first item in the `items` array. - name: items | type: array | description: Product images. The first image becomes the main image. - name: types | type: array | description: Business model types this product supports. - enum: - DROPSHIPPING: Product is fulfilled by the supplier without inventory management by the store owner. - WHOLESALE: Product is sold in bulk quantities with tiered pricing. - PRINT_ON_DEMAND: Product is manufactured after purchase; no pre‑held inventory. - name: options | type: array | description: Product options that customers can choose from. Options display available product variations like size and color to help buyers make purchase decisions. Currently, options are informational only and don't create separate inventory items or variants. There are 2 predefined option types you can use: - `color`: Color choices for the product. Values should be standard color names. For example, `"Black"`, `"White"`, `"Yellow"`. - `size`: Size choices for the product. Values should be standard size labels. For example, `"S"`, `"M"`, `"L"`, `"XL"`. - name: name | type: string | description: Option name. There are 2 predefined options you can use: - `color`: Represents color choices for the product. Values should be standard color names. For example, `"Black"`, `"White"`, `"Yellow"`. - `size`: Represents size choices for the product. Values should be standard size labels. For example, `"S"`, `"M"`, `"L"`, `"XL"`. - name: description | type: string | description: Optional description explaining the option. - name: values | type: array | description: Available values for this option. - ONE-OF: - name: color | type: ColorOption | description: Color option with name, hex code, and sort order. - name: name | type: string | description: Color name. For example, `"Black"` or `"Navy Blue"`. Use 'Multicolor' for mixed colors. When using 'Multicolor', do not provide a hex value. - name: hex | type: string | description: Hex color code. For example, `"#000000"` for black. Omit for 'Multicolor'. - name: ribbonName | type: string | description: Promotional ribbon text displayed on the product. For example, `"New Arrival"` or `"Bestseller"`. - name: brand | type: string | description: Brand name. - name: orderProcessingTime | type: TimeInterval | description: Time required to process orders before shipping. - name: min | type: TimeValue | description: Minimum time in the range. - name: value | type: integer | description: Numeric time value. For example, `2` for "2 days". - name: unit | type: TimeUnit | description: Time unit for the value. - enum: - DAY: Days. - WEEK: Weeks. - MONTH: Months. - name: max | type: TimeValue | description: Maximum time in the range. - name: shippingDestinations | type: array | description: Countries and regions where this product can be shipped, with location-specific pricing and timing. - ONE-OF: - name: specificCountrySelections | type: Countries | description: Specific countries. Used when `countrySelections` is `SPECIFIC_COUNTRY`. - name: countries | type: array | description: Country codes, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1) format. - name: countrySelections | type: CountrySelections | description: Indicates if shipping applies to selected countries or to all other regions. - enum: - REST_OF_THE_WORLD: All countries not specifically listed elsewhere. - SPECIFIC_COUNTRY: Specific countries listed in the `countries` field. - name: minimumShippingCost | type: string | description: Minimum shipping cost to this destination in USD. - name: shippingTime | type: TimeInterval | description: Expected shipping time to this destination. - name: minimumProductCost | type: string | description: Minimum Product Cost to the Shipping Location - name: minimumPrice | type: string | description: Minimum price, in USD. - name: productOrigin | type: string | description: Country where the product is manufactured or originates from, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. - name: directCategories | type: array | description: List of categories that directly contain this product. Each category's namespace must match at least one of the product's types. For example, if a product has type `DROPSHIPPING`, its categories must use `DROPSHIPPING_NAMESPACE`. Products with both `DROPSHIPPING` and `WHOLESALE` types can have categories from both namespaces. - name: _id | type: string | description: Category GUID. - name: index | type: integer | description: Product's position within this category. - name: namespace | type: CategoryNamespace | description: The namespace of the category tree this assignment belongs to. - enum: - DROPSHIPPING_NAMESPACE: Namespace for the dropshipping category tree. - WHOLESALE_NAMESPACE: Namespace for the wholesale category tree. - PRINT_ON_DEMAND_NAMESPACE: Namespace for the print on demand category tree. - name: allCategories | type: array | description: List of categories that directly contain this product, as well as their parent categories. - name: wholesaleOptions | type: WholesaleOptions | description: Wholesale-specific configuration including tiered pricing and minimum order quantities. Required when `types` includes `WHOLESALE`. - name: priceTiers | type: array | description: Tiered pricing based on order quantity ranges. Price tiers must be continuous with no gaps in quantity ranges. For example, if tier 1 covers quantities 1-100, tier 2 must start at 101. The system validates tier continuity when creating or updating products. - name: priceFrom | type: string | description: Minimum price for this quantity tier in USD. If `priceTo` isn't specified, this price applies to all quantities in the tier. - name: priceTo | type: string | description: Maximum price for this quantity tier in USD. Optional for fixed-price tiers. - name: countFrom | type: integer | description: Minimum quantity for this price tier, inclusive. - name: countTo | type: integer | description: Maximum quantity for this price tier, inclusive. If not specified, this tier applies to all quantities greater or equal to `countFrom`. - name: minimumOrderQuantity | type: integer | description: Minimum quantity required for wholesale orders. - name: supplierInfo | type: SupplierInfo | description: Information about the supplier including name, rating, and trust status. - name: _id | type: string | description: Supplier GUID. When provided, references a supplier in the Marketplace Supplier service. The system automatically retrieves and populates the supplier's name, rating, and verification status. - name: name | type: string | description: Supplier name. Automatically populated from the Supplier service when `id` is provided. - name: rating | type: string | description: Supplier rating from 1.00 to 5.00. Automatically populated from the Supplier service when `id` is provided. - name: verified | type: boolean | description: Whether the supplier has been verified by the Marketplace. Verified suppliers have completed the Marketplace verification process. Automatically populated from the Supplier service when `id` is provided. Default: `false` - name: printOnDemandOptions | type: PrintOnDemandOptions | description: Print-on-demand-specific configuration including supported print technologies and mockup assets. Required when `types` include `PRINT_ON_DEMAND`. - name: printTechnologies | type: array | description: Set of possible print technologies for the Product - enum: - DIRECT_TO_FILM: Transfers printed on film and heat-pressed onto fabric. - DIRECT_TO_GARMENT: Ink directly onto garment. - CUT_SEW_SUBLIMATION: Panels are printed first, then sewn. All‑over coverage with precise placements. - DIGITAL_PRINTING: Non‑DTG digital methods (e.g., roll‑to‑roll). - EMBROIDERY: Stitched threads, premium look. - SUBLIMATION: Dye infused into polyester/poly‑coated substrates. - UV_PRINTING: Cures ink with UV light on rigid or treated surfaces. - KNITWEAR: Pattern/design is knitted, not printed. - DIRECT_TO_FABRIC: Designs are printed directly onto rolls of fabric, which are then cut and sewn into the final product. - name: mockupImage | type: string | description: Mockup image of the product with 'Your Image Here' text. - name: sizeGuides | type: array | description: Information about the product sizing - name: measurementUnit | type: MeasurementUnit | description: Sizes units (inches or cm) - enum: CM, INCHES - name: description | type: string | description: Text description of the size guide - name: imageUrl | type: string | description: Image for the size guide - name: imageDescription | type: string | description: Text description of the image content - name: specifications | type: array | description: Sizes specifications - name: category | type: string | description: What is measured, e.g. chest, waist, sleeve - name: measurements | type: array | description: Measurements for different sizes - ONE-OF: - name: singleValue | type: string | description: The value of the size in case of single value - name: range | type: MeasurementValueRange | description: The value of the size in case of range (min/max) - name: minimum | type: string | description: Minimum value - name: maximum | type: string | description: Maximum value - name: sizeLabel | type: string | description: Product size, e.g. S, M, L - name: tags | type: Tags | description: Product tags for organization and filtering. - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, normally not given to site members or visitors. - name: tagIds | type: array | description: List of tag GUIDs. - name: publicTags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. - name: pagingMetadata | type: CursorPagingMetadata | description: Paging information for retrieving additional results. - name: count | type: integer | description: Number of items returned in the response. - name: cursors | type: Cursors | description: Cursor strings that point to the next page, previous page, or both. - name: next | type: string | description: Cursor string pointing to the next page in the list of results. - name: prev | type: string | description: Cursor pointing to the previous page in the list of results. - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page. + `true`: Another page of results can be retrieved. + `false`: This is the last page. - name: aggregationData | type: AggregationData | description: Aggregation results for faceted search. - name: results | type: array | description: key = aggregation name (as derived from search request) - ONE-OF: - name: values | type: ValueResults | description: Value aggregation results - name: results | type: array | description: List of value aggregations - name: value | type: string | description: Value of the field - name: count | type: integer | description: Count of entities with this value - name: ranges | type: RangeResults | description: Range aggregation results - name: results | type: array | description: List of ranges returned in same order as requested - name: from | type: number | description: Inclusive lower bound of the range - name: to | type: number | description: Exclusive upper bound of the range - name: count | type: integer | description: Count of entities in this range - name: scalar | type: ScalarResult | description: Scalar aggregation results - name: type | type: ScalarType | description: Type of scalar aggregation - enum: - COUNT_DISTINCT: Count of distinct values - MIN: Minimum value - MAX: Maximum value - name: value | type: number | description: Value of the scalar aggregation - name: groupedByValue | type: GroupByValueResults | description: Group by value aggregation results - name: results | type: array | description: List of value aggregations - name: value | type: string | description: Value of the field - name: nestedResults | type: NestedAggregationResults | description: Nested aggregations - ONE-OF: - name: values | type: ValueResults | description: Value aggregation results - name: ranges | type: RangeResults | description: Range aggregation results - name: scalar | type: ScalarResult | description: Scalar aggregation results - name: name | type: string | description: User-defined name of aggregation, matches the one provided in request - name: type | type: AggregationType | description: Type of aggregation that matches result - enum: - VALUE: An aggregation where result buckets are dynamically built - one per unique value - RANGE: An aggregation, where user can define set of ranges - each representing a bucket - SCALAR: A single-value metric aggregation - e.g. min, max, sum, avg - DATE_HISTOGRAM: An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) - NESTED: Multi-level aggregation, where each next aggregation is nested within previous one - name: fieldPath | type: string | description: Field to aggregate by, matches the one provided in request - name: dateHistogram | type: DateHistogramResults | description: Date histogram aggregation results - name: results | type: array | description: List of date histogram aggregations - name: value | type: string | description: Date in ISO 8601 format - name: count | type: integer | description: Count of documents in the bucket - name: nested | type: NestedResults | description: Nested aggregation results - name: results | type: array | description: List of nested aggregations - name: results | type: Map | description: List of nested aggregations - ONE-OF: - name: value | type: ValueResult | description: Value aggregation result - name: value | type: string | description: Value of the field - name: count | type: integer | description: Count of entities with this value - name: range | type: RangeResult | description: Range aggregation result - name: from | type: number | description: Inclusive lower bound of the range - name: to | type: number | description: Exclusive upper bound of the range - name: count | type: integer | description: Count of entities in this range - name: scalar | type: ScalarResult | description: Scalar aggregation result - name: value | type: number | description: Value of the scalar aggregation - name: dateHistogram | type: ValueResult | description: Date histogram aggregation result - name: name | type: string | description: User-defined name of aggregation as derived from search request - name: type | type: AggregationType | description: Type of aggregation that must match provided kind as derived from search request - name: fieldPath | type: string | description: Field to aggregate by as derived from search request ``` ### Examples ### searchProducts ```javascript import { products } from '@wix/suppliers-hub'; async function searchProducts(search) { const response = await products.searchProducts(search); }; ``` ### searchProducts (with elevated permissions) ```javascript import { products } from '@wix/suppliers-hub'; import { auth } from '@wix/essentials'; async function mySearchProductsMethod(search) { const elevatedSearchProducts = auth.elevate(products.searchProducts); const response = await elevatedSearchProducts(search); } ``` ### searchProducts (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { products } from '@wix/suppliers-hub'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { products }, // Include the auth strategy and host as relevant }); async function searchProducts(search) { const response = await myWixClient.products.searchProducts(search); }; ``` ---