Skip to main content

Method

PATCH /v1/collections/:id/rules

Path Parameters

id
string
required
Collection ID

Body Parameters

definition_json
object
required
Rules definition
definition_json
object
The definition is flexible and keys are optional. Avoid overlapping tags in includeTags and excludeTags. For manual collections, prefer manualProductIds; for smart collections, use rules and related filter keys.

Headers

Authorization
string
required
Bearer token (e.g. Authorization: Bearer YOUR_API_KEY)
content-type
string
application/json
curl -X PATCH https://api.voyantcloud.com/v1/collections/col_123/rules \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "definition_json": {
      "includeTags": ["summer"],
      "excludeTags": ["archived"],
      "destinationPlaceIds": ["paris"],
      "price": { "min": 100, "max": 500, "currency": "EUR" },
      "availability": { "from": "2025-06-01", "to": "2025-08-31" },
      "rules": [ { "type": "tag", "condition": "equals", "value": "family" } ]
    }
  }'
{ "ok": true }