Complex rules

Get Complex Rules

GET /catalog/products/{product_id}/complex-rules

Request

Returns a list of all product Complex Rules. Optional parameters may be passed in.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • Accept in header with default of application/json - string
    required
    The MIME type of the response body.
  • product_id in path - integer
    required

    The ID of the Product to which the resource belongs.

  • include_fields in query - array
    Fields 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 - array
    Fields 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

object | application/json
Complex Rule Response
  • data
    array[object]

  • meta
    object

    Data about the response, including pagination and collection totals.

example

Create a Complex Rule

POST /catalog/products/{product_id}/complex-rules

Request

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 - string
    required
    The MIME type of the response body.
  • product_id in path - integer
    required

    The ID of the Product to which the resource belongs.

  • Content-Type in header with default of application/json - string
    required
    The MIME type of the request body.

Body

object | application/json
Common ComplexRule properties.
  • sort_order
    integer

    The priority to give this rule when making adjustments to the product properties.

    Min: -2147483648
    Max: 2147483647
  • enabled
    boolean

    Flag for determining whether the rule is to be used when adjusting a productʼs price, weight, image, or availabilty.

    Example: true
  • stop
    boolean

    Flag for determining whether other rules should not be applied after this rule has been applied.

  • purchasing_disabled
    boolean

    Flag for determining whether the rule should disable purchasing of a product when the conditions are applied.

  • purchasing_disabled_message
    string

    Message displayed on the storefront when a rule disables the purchasing of a product.

    >= 0 characters<= 255 characters
    Example: This product is not available at this time.
  • purchasing_hidden
    boolean

    Flag for determining whether the rule should hide purchasing of a product when the conditions are applied.

  • image_url
    string

    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.png
  • price_adjuster
    object

    Adjuster for Complex Rules.
  • weight_adjuster
    object

    Adjuster for Complex Rules.
  • conditions
    array[]

example

Response

Body

object | application/json
  • data
    object

    Common ComplexRule properties.
  • meta
    object

    Response metadata.

example

Get a Product Complex Rule

GET /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 header

Parameters

  • store_hash in path - string
  • Accept in header with default of application/json - string
    required
    The MIME type of the response body.
  • product_id in path - integer
    required

    The ID of the Product to which the resource belongs.

  • complex_rule_id in path - integer
    required

    The ID of the ComplexRule.

  • include_fields in query - array
    Fields 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 - array
    Fields 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

object | application/json
  • data
    object

    Common ComplexRule properties.
  • meta
    object

    Response metadata.

example

Update a Product Complex Rule

PUT /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 - string
    required
    The MIME type of the response body.
  • product_id in path - integer
    required

    The ID of the Product to which the resource belongs.

  • complex_rule_id in path - integer
    required

    The ID of the ComplexRule.

  • Content-Type in header with default of application/json - string
    required
    The MIME type of the request body.

Body

object | application/json
Common ComplexRule properties.
  • sort_order
    integer

    The priority to give this rule when making adjustments to the product properties.

    Min: -2147483648
    Max: 2147483647
  • enabled
    boolean

    Flag for determining whether the rule is to be used when adjusting a productʼs price, weight, image, or availabilty.

    Example: true
  • stop
    boolean

    Flag for determining whether other rules should not be applied after this rule has been applied.

  • purchasing_disabled
    boolean

    Flag for determining whether the rule should disable purchasing of a product when the conditions are applied.

  • purchasing_disabled_message
    string

    Message displayed on the storefront when a rule disables the purchasing of a product.

    >= 0 characters<= 255 characters
    Example: This product is not available at this time.
  • purchasing_hidden
    boolean

    Flag for determining whether the rule should hide purchasing of a product when the conditions are applied.

  • image_url
    string

    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.png
  • price_adjuster
    object

    Adjuster for Complex Rules.
  • weight_adjuster
    object

    Adjuster for Complex Rules.
  • conditions
    array[object]

example

Response

Body

object | application/json
  • data
    object

    Common ComplexRule properties.
  • meta
    object

    Response metadata.

example

Delete a Product Complex Rule

DELETE /catalog/products/{product_id}/complex-rules/{complex_rule_id}

Request

Deletes a product Complex Rule.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • Accept in header with default of application/json - string
    required
    The MIME type of the response body.
  • product_id in path - integer
    required

    The ID of the Product to which the resource belongs.

  • complex_rule_id in path - integer
    required

    The ID of the ComplexRule.

example

Response

Did you find what you were looking for?