---
title: "createTaxonomyRule - Create a Taxonomy Rule"
method: PUT
path: "/v1/taxonomy/channels/{channel_id}/rules"
tags: ["Taxonomy"]
---

# createTaxonomyRule - Create a Taxonomy Rule

`PUT /v1/taxonomy/channels/{channel_id}/rules`

## Request

- Base URL: `https://miraklconnect.com/api/channel-platform`
- URL: `https://miraklconnect.com/api/channel-platform/v1/taxonomy/channels/{channel_id}/rules`
- Auth: HTTP bearer

<div class="api-description-extension">
<div class="extension-title">Call Frequency</div>

<div class="recommended-call-frequency">Recommended usage: 5 per second</div>
<div class="max-call-frequency">Maximum usage: 10 per second</div>
</div>

## Path parameters

- `channel_id` string, required

## Request body

- TaxonomyRuleRequest: Request to create a taxonomy rule
  - `rules` ProductTypeRule[], required: List of rules to create
    - `id` string, required: Unique identifier of the rule
    - `then` ProductTypeRuleActionAll, required: A set of actions to apply when the rule is triggered
      - `all` ProductTypeRuleActionRedefineAttribute[], required: List of actions to apply
        - `redefine` RedefineAttributeActionPayload, required
          - `attribute` string, required: Identifier of the product attribute a taxonomy rule refers to
          - `requirementLevel` string: Requirement level of the attribute when creating or updating a product Enum: `"OPTIONAL"`, `"RECOMMENDED"`, `"REQUIRED"`
    - `when` union, required: Condition to trigger the rule
      - ProductTypeRuleConditionAll: A set of conditions that must all be met to trigger the rule
        - `@type` string
        - `all` ProductTypeRuleCondition[], required: List of conditions to satisfy
      - ProductTypeRuleConditionAny: A set of conditions where at least one must be met to trigger the rule
        - `@type` string
        - `any` ProductTypeRuleCondition[], required: List of conditions where at least one must be satisfied
      - ProductTypeRuleConditionNot: A condition that must not be met to trigger the rule
        - `@type` string
        - `not` ProductTypeRuleCondition, required (recursive)
      - ProductTypeRuleConditionIsSet: A condition that checks if a specific attribute is set
        - `@type` string
        - `isSet` IsSetRuleConditionPayload, required
          - `attribute` string, required: Identifier of the product attribute a taxonomy rule refers to
      - ProductTypeRuleConditionEquals: A condition that checks if a specific attribute equals a given value
        - `@type` string
        - `equals` EqualsRuleConditionPayload, required
          - `@type` string
          - `attribute` string, required: Identifier of the product attribute a taxonomy rule refers to
          - `value` union, required: The value to compare against
            - string
            - number
            - boolean
      - ProductTypeRuleConditionIn: A condition that checks if a specific attribute's value is in a given list of
        - `@type` string
        - `in` InRuleConditionPayload, required
          - `@type` string
          - `attribute` string, required: Identifier of the product attribute a taxonomy rule refers to
          - `values` InRuleConditionPayloadValue[], required: List of values to check against
            - union
              - …

## Response `202`

Accepted

## Other responses

- `400`: Bad Request - the request body does not match the API contract. The body is an `application/problem+json` document with a `code`, a `message` and an `errors` array. The `errors` array lists the violations found (up to a maximum, the `message` then says the list is truncated). Each error gives the JSON path of the offending value in `field` (`$` for the whole document) and what is wrong in `message`.

## Changes

- **2026-11-07** `5fe2e95ce715`: 5 breaking, 14 info
  - the `rules/items/then/all` request property's minItems was increased to `1`
  - the `rules/items/when/oneOf[subschema #1: All]/all` request property's minItems was increased to `1`
  - the `rules/items/when/oneOf[subschema #2: Any]/any` request property's minItems was increased to `1`
  - the `rules/items/when/oneOf[subschema #6: In]/in/values` request property's minItems was increased to `1`
  - …15 more

[Operation history](https://skmtc.dev/mirakl/apis/mirakl-connect-channel-platform-apis/changes/v1/taxonomy/channels/:channel_id/rules/put.md)

---

[API](https://skmtc.dev/mirakl/apis/mirakl-connect-channel-platform-apis.md) - [All operations](https://skmtc.dev/mirakl/apis/mirakl-connect-channel-platform-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/mirakl/apis/mirakl-connect-channel-platform-apis/revisions/5fe2e95ce715?raw)
