Rules
Merchandising rules.
5 نقاط وصول. أسماء نقاط الوصول وأوصافها مأخوذة من ملف OpenAPI، لذلك تظهر بالإنجليزية.
GET
/v1/rulesList merchandising rules
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
cursor | query | string | null | لا | max length 200 |
limit | query | integer | لا | default 100 · min 1 · max 200 |
الردود
- 200Successful Response
Page_RuleOut_
POST
/v1/rulesCreate a pin / boost / bury / hide / redirect / banner rule
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
Idempotency-Key | header | string | null | لا | Unique per logical write (8-255 chars). Retries with the same key are safe. · pattern ^[A-Za-z0-9_\-:.]{8,255}$ |
جسم الطلب application/json RuleIn
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
name | string | نعم | max length 200 |
type | "pin" | "boost" | "bury" | "hide" | "redirect" | "banner" | نعم | |
conditions | RuleConditions | نعم | |
actions | RuleActions | نعم | |
priority | integer | لا | default 0 · min -1000 · max 1000 |
enabled | boolean | لا | default true |
starts_at | string (date-time) | null | لا | |
ends_at | string (date-time) | null | لا |
الردود
- 201Successful Response
RuleOut
GET
/v1/rules/{rule_id}Rules Get
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
rule_id | path | string | نعم |
الردود
- 200Successful Response
RuleOut
PUT
/v1/rules/{rule_id}Rules Update
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
rule_id | path | string | نعم |
جسم الطلب application/json RuleIn
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
name | string | نعم | max length 200 |
type | "pin" | "boost" | "bury" | "hide" | "redirect" | "banner" | نعم | |
conditions | RuleConditions | نعم | |
actions | RuleActions | نعم | |
priority | integer | لا | default 0 · min -1000 · max 1000 |
enabled | boolean | لا | default true |
starts_at | string (date-time) | null | لا | |
ends_at | string (date-time) | null | لا |
الردود
- 200Successful Response
RuleOut
DELETE
/v1/rules/{rule_id}Rules Delete
يحتاج إلى مفتاح أو جلسة في لوحة التحكم
المعاملات
| الاسم | الموضع | النوع | إلزامي | الوصف |
|---|---|---|---|---|
rule_id | path | string | نعم |
الردود
- 200Successful Response
Deleted
أشكال البيانات في هذه الصفحة
Page_RuleOut_
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
data | RuleOut[] | نعم | |
next_cursor | string | null | لا | |
total | integer | null | لا | Present when cheap to count. |
RuleOut
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
name | string | نعم | max length 200 |
type | "pin" | "boost" | "bury" | "hide" | "redirect" | "banner" | نعم | |
conditions | RuleConditions | نعم | |
actions | RuleActions | نعم | |
priority | integer | لا | default 0 · min -1000 · max 1000 |
enabled | boolean | لا | default true |
starts_at | string (date-time) | null | لا | |
ends_at | string (date-time) | null | لا | |
id | string | نعم | |
created_at | string (date-time) | نعم | |
updated_at | string (date-time) | نعم |
RuleConditions
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
match | "exact" | "contains" | "any" | لا | default "exact" |
terms | string[] | لا | Normalized query terms. |
locales | string[] | لا | |
categories | string[] | لا | Apply only when filtered to these categories. |
RuleActions
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
product_ids | string[] | لا | pin/boost/bury/hide targets. |
positions | integer[] | لا | pin: target positions (1-based). |
filter | object | null | لا | boost/bury by attribute, e.g. {brand: [HP]} |
factor | number | null | لا | boost/bury strength.max 100 |
url | string | null | لا | redirect target.max length 2048 |
banner | object | null | لا | banner: {html|image_url, link_url, position} |
RuleIn
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
name | string | نعم | max length 200 |
type | "pin" | "boost" | "bury" | "hide" | "redirect" | "banner" | نعم | |
conditions | RuleConditions | نعم | |
actions | RuleActions | نعم | |
priority | integer | لا | default 0 · min -1000 · max 1000 |
enabled | boolean | لا | default true |
starts_at | string (date-time) | null | لا | |
ends_at | string (date-time) | null | لا |
Deleted
| الاسم | النوع | إلزامي | الوصف |
|---|---|---|---|
deleted | boolean | لا | default true |
id | string | نعم |