Skip to content

createTaxonomyRule - Create a Taxonomy Rule

Request

Call Frequency
Maximum usage: 10 per second
Security
Bearer(Required scopes:
connect-channel-platform:taxonom...
)
Path
channel_idstring, non-emptyrequired

Connect Channel identifier

Bodyapplication/json; charset=UTF-8required
rulesArray of objects, non-emptyrequired

List of rules to create

curl -i -X PUT \
  'https://miraklconnect.com/api/channel-platform/v1/taxonomy/channels/{channel_id}/rules' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json; charset=UTF-8' \
  -d '{
    "rules": [
      {
        "id": "rule-smartphones",
        "when": {
          "all": [
            {
              "equals": {
                "attribute": "model",
                "value": "samsung-galaxy-s21"
              }
            },
            {
              "not": {
                "isSet": {
                  "attribute": "color"
                }
              }
            }
          ]
        },
        "then": {
          "all": [
            {
              "redefine": {
                "attribute": "samsung-special-color",
                "requirementLevel": "REQUIRED"
              }
            }
          ]
        }
      }
    ]
  }'

Responses

Accepted