{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/salesforce-commerce-cloud/json-schema/salesforce-commerce-cloud-rule-request-schema.json",
  "title": "RuleRequest",
  "description": "This document represents the request body while creating a rule.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/salesforce-commerce-cloud-catalogs-api-openapi.yml#/components/schemas/RuleRequest",
  "required": [
    "enabled",
    "exclusion",
    "id"
  ],
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "maxLength": 256,
      "description": "The ID of the rule."
    },
    "enabled": {
      "type": "boolean",
      "description": "A flag indicating whether this rule is enabled.",
      "default": false
    },
    "exclusion": {
      "type": "boolean",
      "description": "A flag indicating whether this rule is an exclusion.",
      "default": false
    },
    "categorizationLocaleId": {
      "type": "string",
      "maxLength": 10,
      "description": "This field indicates the locale to be used for evaluating rules/conditions for the entire category. Note: this applies to all the rules for that category, and the last modification for this field will apply to the entire ruleset for that category.\n"
    },
    "categorizationClassificationFlag": {
      "type": "boolean",
      "description": "This field indicates if the matching products assigned as a result of the rules run will be given the tag for classification category. Note: this applies to all the rules for that category, and the last modification for this field will apply to the entire ruleset for that category.\n",
      "default": false
    },
    "categorizationPrimaryFlag": {
      "type": "boolean",
      "description": "This field indicates if the matching products assigned as a result of the rules run will be given the tag for primary category. Note: this applies to all the rules for that category, and the last modification for this field will apply to the entire ruleset for that category.\n",
      "default": false
    }
  }
}