searchProducts

Searches for products in a webstore. Use this wire adapter in Order Management repricing scenarios.

searchProducts uses this Commerce API resource.

  • webstoreId—(Required) The ID of the webstore. The ID prefix is 0ZE.
  • version—(Required) The API version for the adapter, for example, v62.0. Without this parameter, the wire doesn’t fire.
  • searchTerm—(Optional) A keyword to search products by.
  • page—(Optional) The page number of results to return.
  • pageSize—(Optional) The number of results per page.
  • effectiveAccountId—(Optional) The effective account ID for buyer-specific results.
  • facets—(Optional) Facets to apply to the search.
  • data—A ProductSearchOutputRepresentation object with these fields:
    • pageSize—The number of results per page.
    • totalRecordsFound—The total number of products matching the search.
    • pageNumber—The current page number.
    • products—A list of matching products.
    • facets—A list of facets for the result set.
    • success—Indicates whether the request was successful.
    • errors—A list of errors, if any. Each error has errorCode, message, and errorEntityId fields.
  • errorFetchResponse

If the wire adapter encounters an error, data is undefined and error contains the error details.

See Also