palbaseDocs

Palbase Commerce & Promotions · API

PATCH/commerce/discovery/strategies/{strategy_id}

Update a custom discovery strategy

Update weights, default filters, rule bindings, hook, experiment flag key, or enabled state of a discovery strategy.

Called by your server, with the project's secret key.

Path

strategy_idstring · requiredStrategy UUID.

Request body

namestring · optionalStrategy name.
descriptionstring · optionalStrategy description.
base_algorithmstring · optionalBase algorithm.
weightsobject · optionalDeclarative non-negative finite ranking weights for custom discovery strategies.
default_filtersobject · optionalStructured filter constraints used by strategy default_filters or rule inject_filter actions.
rule_idsstring[] · optionalBound merchandising rule UUIDs.
hook_idstring · optionalOptional discovery.rank hook UUID.
experiment_flag_keystring · optionalOptional flags experiment key.
enabledboolean · optionalWhether active.
curl
curl -X PATCH "https://<your-ref>.palbase.studio/commerce/discovery/strategies/<strategy_id>" \
  -H "apikey: $PALBASE_SECRET_KEY" \
  -H "content-type: application/json" \
  -d '{"name":"string","description":"string","base_algorithm":"string","weights":{"w_text":0,"w_popularity":0,"w_conversion":0,"w_rating":0,"w_freshness":0,"w_price":0,"w_seller_score":0,"w_personalization":0,"in_stock_boost":0},"default_filters":{"category_id":"string","category_ids":["string"],"brand_id":"string","brand_ids":["string"],"store_id":"string","collection_id":"string","channel":"string","region":"string","currency":"string","kind":"string","condition":"string","min_price":0,"max_price":0,"in_stock":false,"min_rating":0,"attributes":{}},"rule_ids":["string"],"hook_id":"string","experiment_flag_key":"string","enabled":false}'

Responses

200Updated discovery strategy

defaultStandard Palbase JSON error envelope (`error` and `error_description`).

Operation UpdateDiscoveryStrategy of commerce's contract.