Palbase Commerce & Promotions · API
POST
/commerce/discovery/strategiesCreate a custom discovery strategy
Create a declarative weighted discovery strategy with optional default filters, rule references, discovery.rank hook, and flags experiment key.
Called by your server, with the project's secret key.
Request body
keystring · optionalOptional unique key (derived from name if omitted).namestring · requiredStrategy 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 (default true).curl
curl -X POST "https://<your-ref>.palbase.studio/commerce/discovery/strategies" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"name":"string"}'Responses
201Created discovery strategy
defaultStandard Palbase JSON error envelope (`error` and `error_description`).
Operation CreateDiscoveryStrategy of commerce's contract.