Skip to content
Menu
All API groups

Rules

Merchandising rules.

5 endpoints.

GET/v1/rules

List merchandising rules

Needs a key or a dashboard session

Parameters

NameInTypeRequiredDescription
cursorquerystring | nullnomax length 200
limitqueryintegernodefault 100 · min 1 · max 200

Responses

POST/v1/rules

Create a pin / boost / bury / hide / redirect / banner rule

Needs a key or a dashboard session

Parameters

NameInTypeRequiredDescription
Idempotency-Keyheaderstring | nullnoUnique per logical write (8-255 chars). Retries with the same key are safe. · pattern ^[A-Za-z0-9_\-:.]{8,255}$

Request body application/json RuleIn

NameTypeRequiredDescription
namestringyesmax length 200
type"pin" | "boost" | "bury" | "hide" | "redirect" | "banner"yes
conditionsRuleConditionsyes
actionsRuleActionsyes
priorityintegernodefault 0 · min -1000 · max 1000
enabledbooleannodefault true
starts_atstring (date-time) | nullno
ends_atstring (date-time) | nullno

Responses

GET/v1/rules/{rule_id}

Rules Get

Needs a key or a dashboard session

Parameters

NameInTypeRequiredDescription
rule_idpathstringyes

Responses

PUT/v1/rules/{rule_id}

Rules Update

Needs a key or a dashboard session

Parameters

NameInTypeRequiredDescription
rule_idpathstringyes

Request body application/json RuleIn

NameTypeRequiredDescription
namestringyesmax length 200
type"pin" | "boost" | "bury" | "hide" | "redirect" | "banner"yes
conditionsRuleConditionsyes
actionsRuleActionsyes
priorityintegernodefault 0 · min -1000 · max 1000
enabledbooleannodefault true
starts_atstring (date-time) | nullno
ends_atstring (date-time) | nullno

Responses

DELETE/v1/rules/{rule_id}

Rules Delete

Needs a key or a dashboard session

Parameters

NameInTypeRequiredDescription
rule_idpathstringyes

Responses

Data shapes on this page

Page_RuleOut_

NameTypeRequiredDescription
dataRuleOut[]yes
next_cursorstring | nullno
totalinteger | nullnoPresent when cheap to count.

RuleOut

NameTypeRequiredDescription
namestringyesmax length 200
type"pin" | "boost" | "bury" | "hide" | "redirect" | "banner"yes
conditionsRuleConditionsyes
actionsRuleActionsyes
priorityintegernodefault 0 · min -1000 · max 1000
enabledbooleannodefault true
starts_atstring (date-time) | nullno
ends_atstring (date-time) | nullno
idstringyes
created_atstring (date-time)yes
updated_atstring (date-time)yes

RuleConditions

NameTypeRequiredDescription
match"exact" | "contains" | "any"nodefault "exact"
termsstring[]noNormalized query terms.
localesstring[]no
categoriesstring[]noApply only when filtered to these categories.

RuleActions

NameTypeRequiredDescription
product_idsstring[]nopin/boost/bury/hide targets.
positionsinteger[]nopin: target positions (1-based).
filterobject | nullnoboost/bury by attribute, e.g. {brand: [HP]}
factornumber | nullnoboost/bury strength.max 100
urlstring | nullnoredirect target.max length 2048
bannerobject | nullnobanner: {html|image_url, link_url, position}

RuleIn

NameTypeRequiredDescription
namestringyesmax length 200
type"pin" | "boost" | "bury" | "hide" | "redirect" | "banner"yes
conditionsRuleConditionsyes
actionsRuleActionsyes
priorityintegernodefault 0 · min -1000 · max 1000
enabledbooleannodefault true
starts_atstring (date-time) | nullno
ends_atstring (date-time) | nullno

Deleted

NameTypeRequiredDescription
deletedbooleannodefault true
idstringyes