Bulk Pricing Rules

Bulk pricing rules

Create a Bulk Pricing Rule

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

Request

Creates a Bulk Pricing Rule.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • product_id in path - integer
    required

    The ID of the Product to which the resource belongs.

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

Body

object | application/json
  • 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.

    Min: 0
    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.

    Min: 0
    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

  • meta
    object

    Response metadata.

example

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

Get all Bulk Pricing Rules

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

Request

Returns all Bulk Pricing Rules. Optional parameters can be passed in.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • product_id in path - integer
    required

    The ID of the Product to which the resource belongs.

  • Accept in header with default of application/json - string
    required
    The MIME type of the response body.
  • Content-Type in header with default of application/json - string
    required
    The MIME type of the request body.
  • 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: quantity_min | quantity_max | type | amount

  • 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

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: {{token}}'

Response

Body

object | application/json
  • data
    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
},
"meta": {
"pagination": {
"total": 2,
"count": 2,
"per_page": 50,
"current_page": 1,
"total_pages": 1,
"links": {
"current": "?page=1&limit=50"
}
}
}
}

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

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.

  • 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: quantity_min | quantity_max | type | amount

  • 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

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: {{token}}'

Response

Body

object | application/json
  • data
    object

  • 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

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.

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

Body

object | application/json
  • id
    integer
    required
    read-only

    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.

    Min: 0
    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.

    Min: 0
    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

  • 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

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.

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: {{token}}'

Response

Did you find what you were looking for?