Thanks for being patient while we implement your feedback to improve the developer experience.

Get All Bulk Pricing Rules

GET /catalog/products/{product_id}/bulk-pricing-rules

Request

Returns a list of Bulk Pricing Rules. Optional parameters can be passed in.

Authentication

  • X-Auth-Token in header - required

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 - string

    Fields to include, in a comma-separated list. The ID and the specified fields will be returned.

  • exclude_fields in query - string

    Fields to exclude, in a comma-separated list. The specified fields will be excluded from a response. The ID cannot be excluded.

  • page in query - integer

    Specifies the page number in a limited (paginated) list of products.

  • limit in query - integer

    Controls the number of items per page in a limited (paginated) list of products.

example

curl --request GET \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v3/catalog/products/[product_id]/bulk-pricing-rules' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'

Response

Body

object | application/json
  • data
    array[object]

  • meta
    object

    Data about the response, including pagination and collection totals.

example

{ "data": [ { "id": 83, "quantity_min": 1, "quantity_max": 3, "type": "price", "amount": 1 }, { "id": 84, "quantity_min": 4, "quantity_max": 0, "type": "price", "amount": 1 } ], "meta": { "pagination": { "total": 2, "count": 2, "per_page": 50, "current_page": 1, "total_pages": 1, "links": { "current": "?page=1&limit=50" } } } }

Create a Bulk Pricing Rule

POST /catalog/products/{product_id}/bulk-pricing-rules

Request

Creates a Bulk Pricing Rule.

Required Fields

  • quantity_min
  • quantity_max
  • type
  • amount

Read-Only Fields

  • id

Limits

  • 50 bulk pricing rule per product limit.

Authentication

  • X-Auth-Token in header - required

Parameters

  • store_hash in path - string
  • Content-Type in header with default of application/json - string - required

    The MIME type of the request body.

  • page in query - integer

    Specifies the page number in a limited (paginated) list of products.

  • limit in query - integer

    Controls the number of items per page in a limited (paginated) list of products.

Body

object | application/json

Common Bulk Pricing Rule properties

  • quantity_min
    integer
    required

    The minimum inclusive quantity of a product to satisfy this rule. Must be greater than or equal to zero. For fixed rules, the minimum quantity canʼt be less than two. Required in /POST.

    Example: 10

  • quantity_max
    integer
    required

    The maximum inclusive quantity of a product to satisfy this rule. Must be greater than the quantity_min value – unless this field has a value of 0 (zero), in which case there will be no maximum bound for this rule. Required in /POST.

    Example: 50

  • type
    string
    required

    The type of adjustment that is made. Values: price - the adjustment amount per product; percent - the adjustment as a percentage of the original price; fixed - the adjusted absolute price of the product. Required in /POST.

    Allowed: price | percent | fixed

    Example: price

  • amount
    required

    You can express the adjustment type as either a fixed dollar amount or a percentage. Send a number; the response will return a number for price and fixed adjustments. Divide the adjustment percentage by 100 and send the result in string format. For example, represent 10% as “.10”. The response will return a float value for both price and percentage adjustments. Required in /POST.

    One of:

    Example: 10

example

{ "quantity_min": 10, "quantity_max": 50, "type": "price", "amount": 10 }

Response

Body

object | application/json
  • data

  • meta
    object

    Empty meta object; may be used later.

example

{ "data": { "id": 83, "quantity_min": 1, "quantity_max": 3, "type": "price", "amount": 1 }, "meta": {} }

Get a Bulk Pricing Rule

GET /catalog/products/{product_id}/bulk-pricing-rules/{bulk_pricing_rule_id}

Request

Returns a single Bulk Pricing Rule. Optional parameters can be passed in.

Authentication

  • X-Auth-Token in header - required

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.

  • bulk_pricing_rule_id in path - integer - required

    The ID of the BulkPricingRule.

  • bulk_pricing_rule_id in path - integer - required

    The ID of the BulkPricingRule.

  • include_fields in query - string

    Fields to include, in a comma-separated list. The ID and the specified fields will be returned.

  • exclude_fields in query - string

    Fields to exclude, in a comma-separated list. The specified fields will be excluded from a response. The ID cannot be excluded.

example

curl --request GET \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v3/catalog/products/[product_id]/bulk-pricing-rules/[bulk_pricing_rule_id]' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'

Response

Body

object | application/json
  • data

  • meta
    object

    Response metadata.

example

{ "data": { "id": 83, "quantity_min": 1, "quantity_max": 3, "type": "price", "amount": 1 }, "meta": {} }

Update a Bulk Pricing Rule

PUT /catalog/products/{product_id}/bulk-pricing-rules/{bulk_pricing_rule_id}

Request

Updates a Bulk Pricing Rule.

Required Fields

  • none

Read-Only Fields

  • id

Authentication

  • X-Auth-Token in header - required

Parameters

  • store_hash in path - string
  • Content-Type in header with default of application/json - string - required

    The MIME type of the request body.

  • bulk_pricing_rule_id in path - integer - required

    The ID of the BulkPricingRule.

Body

application/json
  • id
    integer
    required

    Unique ID of the Bulk Pricing Rule. Read-Only.

  • quantity_min
    integer
    required

    The minimum inclusive quantity of a product to satisfy this rule. Must be greater than or equal to zero. For fixed rules, the minimum quantity canʼt be less than two. Required in /POST.

    Example: 10

  • quantity_max
    integer
    required

    The maximum inclusive quantity of a product to satisfy this rule. Must be greater than the quantity_min value – unless this field has a value of 0 (zero), in which case there will be no maximum bound for this rule. Required in /POST.

    Example: 50

  • type
    string
    required

    The type of adjustment that is made. Values: price - the adjustment amount per product; percent - the adjustment as a percentage of the original price; fixed - the adjusted absolute price of the product. Required in /POST.

    Allowed: price | percent | fixed

    Example: price

  • amount
    required

    You can express the adjustment type as either a fixed dollar amount or a percentage. Send a number; the response will return a number for price and fixed adjustments. Divide the adjustment percentage by 100 and send the result in string format. For example, represent 10% as “.10”. The response will return a float value for both price and percentage adjustments. Required in /POST.

    One of:

    Example: 10

    example

    { "quantity_min": 10, "quantity_max": 50, "type": "price", "amount": 10 }

    Response

    Body

    object | application/json
    • data
      object

      Common BulkPricingRule properties

    • meta
      object

      Response metadata.

    example

    { "data": { "id": 83, "quantity_min": 1, "quantity_max": 3, "type": "price", "amount": 1 }, "meta": {} }

    Delete a Bulk Pricing Rule

    DELETE /catalog/products/{product_id}/bulk-pricing-rules/{bulk_pricing_rule_id}

    Request

    Deletes a Bulk Pricing Rule.

    Authentication

    • X-Auth-Token in header - required

    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.

    • bulk_pricing_rule_id in path - integer - required

      The ID of the BulkPricingRule.

    • bulk_pricing_rule_id in path - integer - required

      The ID of the BulkPricingRule.

    example

    curl --request DELETE \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v3/catalog/products/[product_id]/bulk-pricing-rules/[bulk_pricing_rule_id]' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'

    Response