Recommendations

Configure related-product and recently-viewed storefront recommendations.

Recommendations combine explicit curation with an ordered automatic rule chain. Pinned products are shown first, then rules fill the remaining positions. Exclusions hide products from all recommendations, including pinned products and Recently viewed. The free-product policy affects automatic selection only; pinned free products remain eligible. Reads use read_products, and writes use write_products.

Settings apply across storefronts. include_subcategories affects only same-category rules. Recently viewed history follows the configured window and consent policy. List responses include compact product references so integrations can render them without one request per product.

Endpoints#

Recommendation limits

GET read_products

Get recommendation limits and supported modes.

Use this response to build controls; do not hardcode limits or enum values.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 401 UNAUTHORIZED

    Authorization header missing, malformed, or token invalid/expired.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 STORE_API_SCOPE_REQUIRED

    Token is valid but lacks the required scope for this call.

  • 429 RATE_LIMITED

    The token's request allowance is exhausted. Retry after the Retry-After header.

Get recommendation settings

GET read_products

Get store-wide recommendation settings.

These settings govern related-product and recently-viewed rails across storefronts.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 401 UNAUTHORIZED

    Authorization header missing, malformed, or token invalid/expired.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 STORE_API_SCOPE_REQUIRED

    Token is valid but lacks the required scope for this call.

  • 429 RATE_LIMITED

    The token's request allowance is exhausted. Retry after the Retry-After header.

Update recommendation settings

PUT write_products

Replace store-wide recommendation settings.

Send the complete settings object returned by GET.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Body parameters

Name Type Description
related_limit required integer

Products in the related rail.

Example: 8
recently_viewed_enabled required boolean

Whether Recently viewed is enabled.

Example: true
recently_viewed_limit required integer

Products in Recently viewed.

Example: 8
history_window_days required integer

History window from limits.

Example: 30
hide_out_of_stock required boolean

Exclude sold-out products automatically.

Example: true
exclude_free_products required boolean

Exclude zero-price products automatically.

Example: true
cross_device_history required string

Cross-device mode from limits.

Example: off

Errors

  • 401 UNAUTHORIZED

    Authorization header missing, malformed, or token invalid/expired.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 STORE_API_SCOPE_REQUIRED

    Token is valid but lacks the required scope for this call.

  • 429 RATE_LIMITED

    The token's request allowance is exhausted. Retry after the Retry-After header.

Get recommendation rules

GET read_products

Get the ordered automatic recommendation rule chain.

Rules run after pinned products and fill the rail in position order. An empty list uses the default category best-seller rule.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 401 UNAUTHORIZED

    Authorization header missing, malformed, or token invalid/expired.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 STORE_API_SCOPE_REQUIRED

    Token is valid but lacks the required scope for this call.

  • 429 RATE_LIMITED

    The token's request allowance is exhausted. Retry after the Retry-After header.

Set recommendation rules

PUT write_products

Replace the ordered recommendation rule chain.

Send rules in display order. same_attribute requires an attribute id in match_value; include_subcategories applies only to same_category. Send an empty array to restore the default category best-seller rule.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Body parameters

Name Type Description
rules required array<object>

Complete ordered rule list.

Example: [{"match_kind":"same_category","sort":"best_selling","include_subcategories":true}]

Errors

  • 401 UNAUTHORIZED

    Authorization header missing, malformed, or token invalid/expired.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 STORE_API_SCOPE_REQUIRED

    Token is valid but lacks the required scope for this call.

  • 429 RATE_LIMITED

    The token's request allowance is exhausted. Retry after the Retry-After header.

List curated products

GET read_products

List products that have pinned recommendation lists.

Compact product references are included so clients do not need one product request per row.

Query parameters

Name Type Description
page integer

Page number.

Default: 1
Example: 1
limit integer

Page size bounded by the limits response.

Example: 25

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 401 UNAUTHORIZED

    Authorization header missing, malformed, or token invalid/expired.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 STORE_API_SCOPE_REQUIRED

    Token is valid but lacks the required scope for this call.

  • 429 RATE_LIMITED

    The token's request allowance is exhausted. Retry after the Retry-After header.

Get pinned recommendations

GET read_products

Get one product's ordered pinned recommendations.

The products array follows pin order and contains display identity.

Path parameters

Name Type Description
productId required integer

Store-scoped product id.

Example: 42

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 401 UNAUTHORIZED

    Authorization header missing, malformed, or token invalid/expired.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 STORE_API_SCOPE_REQUIRED

    Token is valid but lacks the required scope for this call.

  • 429 RATE_LIMITED

    The token's request allowance is exhausted. Retry after the Retry-After header.

Set pinned recommendations

PUT write_products

Replace one product's ordered pinned recommendations.

A product cannot pin itself or repeat a related product.

Path parameters

Name Type Description
productId required integer

Store-scoped product id.

Example: 42

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Body parameters

Name Type Description
related_ids required array<integer>

Related product ids in display order.

Example: [17,23]

Errors

  • 401 UNAUTHORIZED

    Authorization header missing, malformed, or token invalid/expired.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 STORE_API_SCOPE_REQUIRED

    Token is valid but lacks the required scope for this call.

  • 429 RATE_LIMITED

    The token's request allowance is exhausted. Retry after the Retry-After header.

List recommendation exclusions

GET read_products

List products excluded from all recommendations.

Compact product references are returned with the ID list.

Query parameters

Name Type Description
page integer

Page number.

Default: 1
Example: 1
limit integer

Page size bounded by the limits response.

Example: 25

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 401 UNAUTHORIZED

    Authorization header missing, malformed, or token invalid/expired.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 STORE_API_SCOPE_REQUIRED

    Token is valid but lacks the required scope for this call.

  • 429 RATE_LIMITED

    The token's request allowance is exhausted. Retry after the Retry-After header.

Exclude a product

POST write_products

Exclude a product from all recommendations.

Exclusions apply to pinned products as well as automatic and recently-viewed recommendations. They do not unpublish the product.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Body parameters

Name Type Description
product_id required integer

Product id.

Example: 42

Errors

  • 401 UNAUTHORIZED

    Authorization header missing, malformed, or token invalid/expired.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 STORE_API_SCOPE_REQUIRED

    Token is valid but lacks the required scope for this call.

  • 429 RATE_LIMITED

    The token's request allowance is exhausted. Retry after the Retry-After header.

Remove a recommendation exclusion

DELETE write_products

Allow a product to be recommended automatically again.

The operation is idempotent.

Path parameters

Name Type Description
productId required integer

Store-scoped product id.

Example: 42

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 401 UNAUTHORIZED

    Authorization header missing, malformed, or token invalid/expired.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 STORE_API_SCOPE_REQUIRED

    Token is valid but lacks the required scope for this call.

  • 429 RATE_LIMITED

    The token's request allowance is exhausted. Retry after the Retry-After header.