younifyd
Menu

Search By Context

Search

GET/pcm/catalog/search

Use it in a workflow

  1. Add a step and choose the Elastic Path connector.
  2. Pick the Search By Context action (under Catalog Search).
  3. Fill in the fields below, then reference the result from later steps as {{searchByContext.response.data}}.

Request

Query parameters

includearray<string>

Using the include parameter, you can retrieve top-level resources. - Files or main image. For example, `include=files,main_image`. - Component product data. For example, `include=component_products`. - Key attribute data, such as SKU or slug.

search_profilestring

The slug of the search profile to use for this search. On shopper search (`/pcm/catalog/search`, `/pcm/catalog/multi-search`): used only when the matched catalog rule has no valid `search_profile_slug`. When the catalog rule carries a non-blank slug that resolves to a profile, that rule profile is used and this query parameter is silently ignored. Blank or whitespace-only values are treated as omitted. An invalid non-blank slug returns 400 with detail `Search profile '{slug}' not found`. On admin search (`/pcm/catalogs/{catalog_id}/releases/{release_id}/…`): catalog rule profiles are not applied. Resolution is this query parameter, then the tenant default profile, then the built-in default. Omit this parameter to use the tenant default profile (or the built-in default when no tenant default exists). The applied slug is returned in the `EP-Search-Profile` response header.

typestring

Type of search operation to perform

One ofsearchautocomplete

highlight_full_fieldsstring

Comma-separated list of fields to highlight

qstringrequired

Search query

facet_bystring

Specifies which fields to use for generating facets in search results. See [faceting](/guides/How-To/Catalogs/Search/faceting) for more details.

filter_bystring

Applies conditions to narrow down search results based on specific field values. See [filtering](/guides/How-To/Catalogs/Search/filtering) for more details.

sort_bystring

Orders search results by specified fields. See [sorting](/guides/How-To/Catalogs/Search/sorting) for more details.

max_facet_valuesinteger

Maximum number of facet values to return

pageinteger
per_pageinteger

Headers

accept-languagestring

The language and locale your storefront prefers. See [Accept-Language](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language).

EP-Channelstring

The list of channels in which this catalog can be displayed. A channel is the shopping experience, such as a mobile app or web storefront. If empty, the catalog rule matches all channels. The channel will eventually be included in the bearer token that is used for authorization, but currently, you must set the `EP-Channel` header in your requests.

EP-Context-Tagstring

Tags are used to refine the eligibility criteria for a rule. Requests populate the catalog rule tag using the `EP-Context-Tag` header.

x-moltin-currencystring

The currency used to resolve product price. If not supplied, the organization/store default currency is used.

EP-Simulated-Shopper-Datestring

Response

Returns 200 with a any. Read it in later steps with {{searchByContext.response.data.<field>}}.

Need more? See the Elastic Path guide for connection setup and behaviour shared by every action.

Search By Context — Elastic Path — Documentation