{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/bigcommerce/main/json-schema/bigcommerce-complex-rule-base-schema.json", "title": "complexRule_Base", "description": "Common ComplexRule properties.", "x-generated": "2026-10-12", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/bigcommerce-complex-rules-api-openapi.yml#/components/schemas/complexRule_Base", "type": "object", "properties": { "id": { "type": "integer", "description": "The unique numeric ID of the rule; increments sequentially.\nRead-Only" }, "product_id": { "type": [ "integer", "null" ], "description": "The unique numeric ID of the product with which the rule is associated; increments sequentially.\n", "x-required": [ "post", "put" ] }, "sort_order": { "maximum": 2147483647, "minimum": -2147483648, "type": "integer", "description": "The priority to give this rule when making adjustments to the product properties.\n" }, "enabled": { "type": "boolean", "description": "Flag for determining whether the rule is to be used when adjusting a productʼs price, weight, image, or availabilty.\n" }, "stop": { "type": "boolean", "description": "Flag for determining whether other rules should not be applied after this rule has been applied.\n" }, "purchasing_disabled": { "type": "boolean", "description": "Flag for determining whether the rule should disable purchasing of a product when the conditions are applied.\n" }, "purchasing_disabled_message": { "maxLength": 255, "minLength": 0, "type": "string", "description": "Message displayed on the storefront when a rule disables the purchasing of a product.\n" }, "purchasing_hidden": { "type": "boolean", "description": "Flag for determining whether the rule should hide purchasing of a product when the conditions are applied.\n" }, "image_url": { "type": "string", "description": "The URL for an image displayed on the storefront when the conditions are applied. Limit of 8MB per file.\n" }, "price_adjuster": { "$ref": "#/$defs/adjuster_Full" }, "weight_adjuster": { "$ref": "#/$defs/adjuster_Full" }, "conditions": { "type": "array", "items": { "$ref": "#/$defs/complexRuleConditionBase" } } }, "x-internal": false, "$defs": { "adjuster_Full": { "title": "adjuster_Full", "type": "object", "properties": { "adjuster": { "type": [ "string", "null" ], "description": "The type of adjuster for either the price or the weight of the variant, when the modifier value is selected on the storefront.\n", "enum": [ "relative", "percentage" ] }, "adjuster_value": { "type": "number", "description": "The numeric amount by which the adjuster will change either the price or the weight of the variant, when the modifier value is selected on the storefront.\n" } }, "description": "Adjuster for Complex Rules.", "x-internal": false }, "complexRuleConditionBase": { "title": "complexRuleConditionBase", "required": [ "modifier_id", "modifier_value_id", "variant_id" ], "type": "object", "properties": { "id": { "type": [ "integer", "null" ], "description": "The unique numeric ID of the rule condition; increments sequentially. Read-Only\n" }, "rule_id": { "type": [ "integer", "null" ], "description": "The unique numeric ID of the rule with which the condition is associated.\nRead-Only" }, "modifier_id": { "type": [ "integer", "null" ], "description": "The unique numeric ID of the modifier with which the rule condition is associated.\nRequired in /POST." }, "modifier_value_id": { "type": [ "integer", "null" ], "description": "The unique numeric ID of the modifier value with which the rule condition is associated.\nRequired in /POST." }, "variant_id": { "type": [ "integer", "null" ], "description": "The unique numeric ID of the variant with which the rule condition is associated.\nRequired in /POST." }, "combination_id": { "type": "integer", "description": "(READ-ONLY:) The unique numeric ID of the SKU (v2 API), or Combination, with which the rule condition is associated. This is to maintain cross-compatibility between v2 and v3.\n" } }, "description": "Complex rules may return with conditions that apply to one or more variants, or with a single modifier value (if the rules were created using the v2 API or the control panel). Complex rules created or updated in the v3 API must have conditions that either reference multiple `modifier_value_id`’s, or else reference a `modifier_value_id` and a `variant_id`.", "x-internal": false } } }