A valid request URL is required to generate request examples{
"id": "<string>",
"name": "<string>",
"context": "product",
"steps": [
{
"kind": "best_sellers",
"params": {
"freshness_days": 123,
"candidate_pool": 123
},
"filters": [
{
"type": "price",
"min_fraction_of_median": 123,
"max_fraction_of_median": 123
}
],
"limit": 123,
"order_by": {
"kind": "similarity",
"seed": {
"max_seeds": 123,
"weights": {
"product": 123,
"viewed": 123,
"cart": 123
},
"recency_retention": 0
},
"max_distance": 123
}
}
],
"filters": [
{
"type": "price",
"min_fraction_of_median": 123,
"max_fraction_of_median": 123
}
],
"stock_mode": "in_stock",
"limit": 123,
"excluded_product_ids": [
"<string>"
],
"pin_mode": "insert",
"looks": "none",
"custom_rules": [
"<unknown>"
],
"only_show_pinned": true,
"shuffle": true,
"avoid_surfaces": [
"<string>"
],
"ingestion": {
"merchantId": "<string>",
"status": "started",
"instanceId": "<string>"
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Create or replace a recommendation surface
Creates the surface named in the path, or replaces its editable fields (context, steps, filters, limit, exclusions) if it exists; an existing surface keeps its id and serving directives. The body’s name must equal the path’s. Side effects: writes the storefront metaobject in Shopify, then the recommendations config; deletes pins whose anchor type the new context no longer admits; queues a background recompute of this surface and replicates the change to linked stores. Requires recommendations in the store’s plan (402 otherwise),. Changed metafield keys request full ingestion after saving. Returns the saved surface.
A valid request URL is required to generate request examples{
"id": "<string>",
"name": "<string>",
"context": "product",
"steps": [
{
"kind": "best_sellers",
"params": {
"freshness_days": 123,
"candidate_pool": 123
},
"filters": [
{
"type": "price",
"min_fraction_of_median": 123,
"max_fraction_of_median": 123
}
],
"limit": 123,
"order_by": {
"kind": "similarity",
"seed": {
"max_seeds": 123,
"weights": {
"product": 123,
"viewed": 123,
"cart": 123
},
"recency_retention": 0
},
"max_distance": 123
}
}
],
"filters": [
{
"type": "price",
"min_fraction_of_median": 123,
"max_fraction_of_median": 123
}
],
"stock_mode": "in_stock",
"limit": 123,
"excluded_product_ids": [
"<string>"
],
"pin_mode": "insert",
"looks": "none",
"custom_rules": [
"<unknown>"
],
"only_show_pinned": true,
"shuffle": true,
"avoid_surfaces": [
"<string>"
],
"ingestion": {
"merchantId": "<string>",
"status": "started",
"instanceId": "<string>"
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Body
Response
The saved surface, with ingestion admission when metafield keys changed.
A saved surface. pin_mode, looks, custom_rules, only_show_pinned, shuffle and avoid_surfaces are ops-only serving directives: read-only here; an upsert keeps them (shuffle only while the surface stays live).
Was this page helpful?

