For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
  • Overview
    • Quick Start
    • Sandboxes
    • Tools & SDKs
    • Support
  • Docs
    • Archive
          • SKU
          • Videos
          • Product Rules
          • Product Reviews
          • Product Options
          • Product Images
          • Option Values
          • Option Set Options
          • Option Sets
          • Options
          • Custom Fields
          • Categories
          • Bulk Pricing Rules
          • Products
          • Brands
    • Closed Beta Programs
Dev Portal
LogoLogo
On this page
  • Bulk Pricing
  • Filters
  • Pagination
  • Response
  • Response
  • Response
  • Read-only Properties
  • Requirements
  • Request
  • Response
  • Read-only Properties
  • Requirements
  • Request
  • Response
  • Pagination
ArchiveStore OperationsCatalog V2 Products

Bulk Pricing Rules

Deprecated
Was this page helpful?
Previous

Categories

Next

Products V2

Built with

This is archived documentation. The V2 Catalog API is deprecated. For current API documentation, see the Catalog API.

Bulk Pricing

Bulk pricing rules applied to a product.

Bulk Pricing Object Properties
NameTypeDescription
idstringThe ID of the bulk discount rule.
product_idintThe ID of the product associated with this bulk discount rule.
minintThe minimum inclusive quantity of a product to satisfy this rule. Must be greater than or equal to zero.
maxintThe maximum inclusive quantity of a product to satisfy this rule. Must be greater than the min value, unless this field has a value of 0 (zero), in which case there will be no maximum bound for this rule.
typeenum
type_valuedecimalThe value of the discount
List Bulk Pricing Rules

Gets the collection of product bulk pricing rules.

GET /stores/{store_hash}/v2/products/{product_id}/discount_rules

Filters

There are no filter parameters specific to discount_rules.

Pagination

Parameters can be added to the URL query string to paginate the collection. The maximum limit is 250. If a limit isn’t provided, up to 50 bulk_pricing_rules are returned by default.

ParameterTypeExample
pageint/api/v2/products/{product_id}/discount_rules?page={number}
limitint/api/v2/products/{product_id}/discount_rules?limit={count}

Response

Example JSON returned in the response:

[
{
"id": "1",
"product_id": 30,
"min": 100,
"max": 500,
"type": "price",
"type_value": 2
}
]
Get a Product Bulk Pricing Rule

Gets a product bulk pricing rule.

GET /stores/{store_hash}/v2/products/{product_id}/discount_rules/{id}

Response

Example JSON returned in the response:

{
"id": "1",
"product_id": 30,
"min": 100,
"max": 500,
"type": "price",
"type_value": 2
}
Get a Count of Bulk Pricing Rules

Gets a count of the number of bulk pricing rules in the store.

GET /stores/{store_hash}/v2/products/discount_rules/count

Response

Example JSON returned in the response:

{
"count": 9
}
Create a Product Bulk Pricing Rule

Creates a new product bulk pricing rule.

POST /stores/{store_hash}/v2/products/{product_id}/discount_rules

Read-only Properties

The following properties of the discount rule are read-only. If one or more of these properties are included in the request, it will be rejected.

  • product_id

Requirements

The following properties of the discount rule are required. The request won’t be fulfilled unless these properties are valid.

  • type
  • type_value

Note

To specify that a min or max value is unbounded, these properties must be explicitly set with a value of 0. If neither min nor max properties are included in the request, the existing value will remain unchanged.

The range of the min and max values must not overlap an existing rule associated with the same product.

Request

Example request object:

{
"min": 100,
"max": 500,
"type": "price",
"type_value": 2
}

Response

Example JSON returned in the response:

{
"id": "1",
"product_id": 30,
"min": 100,
"max": 500,
"type": "price",
"type_value": 2
}
Update a Product Bulk Pricing Rule

Updates an existing product bulk pricing rule.

PUT /stores/{store_hash}/v2/products/{product_id}/discount_rules/{id}

Read-only Properties

The following properties of the discount rule are read-only. If one or more of these properties are included in the request, it will be rejected.

  • product_id

Requirements

The following properties of the discount rule are required. The request won’t be fulfilled unless these properties are valid.

  • type
  • type_value

Note

To specify that a min or max value is unbounded, these properties must be explicitly set with a value of 0. If neither min nor max properties are included in the request, the existing value will remain unchanged.

The range of the min and max values must not overlap an existing rule associated with the same product.

Request

Example request object:

{
"min": 200,
"max": 300,
"type": "fixed",
"type_value": 10
}

Response

Example JSON returned in the response:

{
"id": "1",
"product_id": 30,
"min": 200,
"max": 300,
"type": "fixed",
"type_value": 10
}
Delete a Product Bulk Pricing Rule

Deletes a product bulk pricing rule.

DELETE /stores/{store_hash}/v2/products/{product_id}/discount_rules/{id}

Delete Multiple Product Bulk Pricing Rules

Deletes bulk pricing rules associated with a product.

DELETE /stores/{store_hash}/v2/products/{product_id}/discount_rules

Pagination

Parameters can be added to the URL query string to paginate the collection. The maximum limit is 250. If a limit isn’t provided, up to 50 bulk_pricing_rules are returned by default.

ParameterTypeExample
pageint/api/v2/products/{product_id}/discount_rules?page={number}
limitint/api/v2/products/{product_id}/discount_rules?limit={count}