Complex rules
Get Complex Rules
GET https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products/{product_id}/complex-rulesRequest
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- product_id in path - integerrequired
The ID of the
Product
to which the resource belongs. - include_fields in query - arrayFields to include, in a comma-separated list. The ID and the specified fields will be returned.Type: array[string]
Allowed: name | type | sku | description | weight | width | depth | height | price | cost_price | retail_price | sale_price | map_price | tax_class_id | product_tax_code | calculated_price | categories | brand_id | option_set_id | option_set_display | inventory_level | inventory_warning_level | inventory_tracking | reviews_rating_sum | reviews_count | total_sold | fixed_cost_shipping_price | is_free_shipping | is_visible | is_featured | related_products | warranty | bin_picking_number | layout_file | upc | mpn | gtin | date_last_imported | search_keywords | availability | availability_description | condition | is_condition_shown | order_quantity_minimum | order_quantity_maximum | page_title | meta_keywords | meta_description | date_created | date_modified | view_count | preorder_release_date | preorder_message | is_preorder_only | is_price_hidden | price_hidden_label | custom_url | base_variant_id | open_graph_type | open_graph_title | open_graph_description | open_graph_use_meta_description | open_graph_use_product_name | open_graph_use_image
- exclude_fields in query - arrayFields to exclude, in a comma-separated list. The specified fields will be excluded from a response. The ID cannot be excluded.Type: array[string]
- page in query - integer
Specifies the page number in a limited (paginated) list of products.
- limit in query with default of 50 - integer
Controls the number of items per page in a limited (paginated) list of products.
example
Response
Body
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 header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- product_id in path - integerrequired
The ID of the
Product
to which the resource belongs. - Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
Body
sort_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[]
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
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- product_id in path - integerrequired
The ID of the
Product
to which the resource belongs. - complex_rule_id in path - integerrequired
The ID of the
ComplexRule
. - include_fields in query - arrayFields to include, in a comma-separated list. The ID and the specified fields will be returned.Type: array[string]
Allowed: name | type | sku | description | weight | width | depth | height | price | cost_price | retail_price | sale_price | map_price | tax_class_id | product_tax_code | calculated_price | categories | brand_id | option_set_id | option_set_display | inventory_level | inventory_warning_level | inventory_tracking | reviews_rating_sum | reviews_count | total_sold | fixed_cost_shipping_price | is_free_shipping | is_visible | is_featured | related_products | warranty | bin_picking_number | layout_file | upc | mpn | gtin | date_last_imported | search_keywords | availability | availability_description | condition | is_condition_shown | order_quantity_minimum | order_quantity_maximum | page_title | meta_keywords | meta_description | date_created | date_modified | view_count | preorder_release_date | preorder_message | is_preorder_only | is_price_hidden | price_hidden_label | custom_url | base_variant_id | open_graph_type | open_graph_title | open_graph_description | open_graph_use_meta_description | open_graph_use_product_name | open_graph_use_image
- exclude_fields in query - arrayFields to exclude, in a comma-separated list. The specified fields will be excluded from a response. The ID cannot be excluded.Type: array[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 header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- product_id in path - integerrequired
The ID of the
Product
to which the resource belongs. - complex_rule_id in path - integerrequired
The ID of the
ComplexRule
. - Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
Body
sort_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
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- product_id in path - integerrequired
The ID of the
Product
to which the resource belongs. - complex_rule_id in path - integerrequired
The ID of the
ComplexRule
.