跳至內容
ShopentlyLearn

建立 · 規則 — 搜尋分析與規則

建立搜尋規則. 適用於外部整合操作。

POST/api/v1/search/rules

cURL 請求

curl --disable --globoff --fail-with-body --silent --show-error \
  --proto '=https' --connect-timeout 5 --max-time 30 \
  --request POST \
  --url https://shop.onshopently.com/api/v1/search/rules \
  --header 'Authorization: Bearer EXAMPLE_ACCESS_TOKEN' \
  --header 'Idempotency-Key: example-create_rule_api_v1_search_rules_post' \
  --header 'Content-Type: application/json' \
  --data-raw '{"name":"Example","phrases":["example"],"product_ids":["example"]}'

回應

{
  "data": {
    "deleted": false,
    "id": "example",
    "version": 1
  },
  "meta": {
    "request_id": "example"
  }
}

所需權限

身份驗證
存取權杖
最低方案
STANDARD
金鑰權限
建立搜尋規則search.rule:create