Skip to content
ShopentlyLearn

Update a search rule

Edit search rules. For external integration operations.

PATCH/api/v1/search/rules/{rule_id}

cURL request

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

Response

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

Required permissions

Authentication
Access token
Available from
STANDARD
Key permission
Edit search rulessearch.rule:update