Complex rules
Get Complex Rules
GET https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products/{product_id}/complex-rulesRequest
Returns a list of all product Complex Rules. Optional parameters may be passed in.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
example
Response
Body
Complex Rule Response
dataarray[object]
example
Create a Complex Rule
POST https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products/{product_id}/complex-rulesRequest
Creates a product Complex Rule.
Required Fields
- modifier_id
- modifier_value_id
- variant_id
Read-Only Fields
- complex_rule_id
- conditions_id
- rule_id
- combination_id
- id
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
Body
Common ComplexRule properties.
product_idinteger or null
The unique numeric ID of the product with which the rule is associated; increments sequentially.
Example: 67sort_orderinteger
The priority to give this rule when making adjustments to the product properties.
Min: -2147483648Max: 2147483647enabledboolean
Flag for determining whether the rule is to be used when adjusting a productʼs price, weight, image, or availabilty.
Example: truestopboolean
Flag for determining whether other rules should not be applied after this rule has been applied.
purchasing_disabledboolean
Flag for determining whether the rule should disable purchasing of a product when the conditions are applied.
purchasing_hiddenboolean
Flag for determining whether the rule should hide purchasing of a product when the conditions are applied.
image_urlstring
The URL for an image displayed on the storefront when the conditions are applied. Limit of 8MB per file.
Example: https://cdn8.bigcommerce.com/s-123456/product_images/d/fakeimage.pngprice_adjusterobject
Adjuster for Complex Rules.
weight_adjusterobject
Adjuster for Complex Rules.
conditionsarray[object]
example
Response
Body
dataobject
Common ComplexRule properties.
example
Get a Product Complex Rule
GET https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products/{product_id}/complex-rules/{complex_rule_id}Request
Returns a single Complex Rule. Optional parameters can be passed in.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
example
Response
Body
dataobject
Common ComplexRule properties.
example
Update a Product Complex Rule
PUT https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products/{product_id}/complex-rules/{complex_rule_id}Request
Updates a Complex Rule.
Required Fields:
- none
Read-Only Fields:
- complex_rule_id
- conditions_id
- rule_id
- combination_id
- id
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
Body
Common ComplexRule properties.
product_idinteger or null
The unique numeric ID of the product with which the rule is associated; increments sequentially.
Example: 67sort_orderinteger
The priority to give this rule when making adjustments to the product properties.
Min: -2147483648Max: 2147483647enabledboolean
Flag for determining whether the rule is to be used when adjusting a productʼs price, weight, image, or availabilty.
Example: truestopboolean
Flag for determining whether other rules should not be applied after this rule has been applied.
purchasing_disabledboolean
Flag for determining whether the rule should disable purchasing of a product when the conditions are applied.
purchasing_hiddenboolean
Flag for determining whether the rule should hide purchasing of a product when the conditions are applied.
image_urlstring
The URL for an image displayed on the storefront when the conditions are applied. Limit of 8MB per file.
Example: https://cdn8.bigcommerce.com/s-123456/product_images/d/fakeimage.pngprice_adjusterobject
Adjuster for Complex Rules.
weight_adjusterobject
Adjuster for Complex Rules.
conditionsarray[object]
example
Response
Body
dataobject
Common ComplexRule properties.
example
Delete a Product Complex Rule
DELETE https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products/{product_id}/complex-rules/{complex_rule_id}Request
Deletes a product Complex Rule.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string