Data Product Search (deprecated)

POST Search Products

POST /product_search

Operation ID: Search Products. Tags: product_search. Security: oauth2_application.

Searches for products.

Note: This resource does not return information about product master and product variation relationships. Use the ProductSearch SHOP API resource to retrieve more details about product relationships.

The query attribute specifies a complex query that can be used to narrow down the search. Attributes are grouped into different buckets. These are the list of searchable attributes with their corresponding buckets:

Main:

  • id - String

  • name - String

  • online - SiteSpecific Boolean

  • searchable - SiteSpecific Boolean

  • valid_from - SiteSpefic DateTime

  • valid_to - SiteSpecfic DateTime

  • type - ProductType

  • creation_date - DateTime

  • last_modified - DateTime

Catalog:

  • catalog_id - String

Category:

  • category_id - String

Special:

  • type - {"item", "set, "bundle", "master", "part_of_product_set", "bundled", "variant", "variation_group", "option", "retail_set", "part_of_retail_set"}

The sortable properties are:

  • id - String

  • name - String

  • creation_date - DateTime

When you specify a catalog_id or category_id, only products explicitly assigned to that catalog or category are returned. For example, if a product with variants is assigned to a catalog, but its variants are not, searching on that catalog_id only returns the main product, not the variants. This behavior is different from that of the product search in Business Manager, which returns products that inherit the selected catalog or category assignment.

Only attributes in the same bucket can be joined using a disjunction (OR). For instance, when joining id and catalog_id above, only a conjunction is allowed (AND), whereas id and searchable can be joined using a disjunction because they are in the same bucket. If an attribute is used in a disjunction (OR) that violates this rule, an exception will be thrown.

The product search retrieves additional properties of the product when expansions are used. The available expand attribute values are:

  • 'all' will retrieve all the product properties.

  • 'availability' will retrieve the following properties:

    • ats

    • in_stock

    • online

  • 'categories' will retrieve the following properties:

    • assigned_categories

  • 'images' will retrieve the following properties:

    • image

  • 'all_images' used with images will retrieve the following properties:

    • image

    • image_groups

  • 'prices' will retrieve the following properties:

    • price

    • price_currency

  • 'sets' will retrieve the following properties:

    • set_products

    • product_sets

  • 'bundles' will retrieve the following properties:

    • product_bundles

    • bundled_products

This endpoint may return the following faults:

  • 400 - MalformedSearchParameterException - Indicates the search query is ill-formed.

Parameters

  • site_id (query, string) The site context.

Request body

Media type: application/json, text/xml. Schema: search_request.

Responses

  • 400 MalformedSearchParameterException - Indicates the search query is ill-formed.

    Media type: application/json, text/xml. Schema: fault.

  • default

    Media type: application/json, text/xml. Schema: product_search_result.