This is archived documentation. The V2 Catalog API is deprecated. For current API documentation, see the Catalog API.
Bulk pricing rules applied to a product.
Gets the collection of product bulk pricing rules.
GET /stores/{store_hash}/v2/products/{product_id}/discount_rules
There are no filter parameters specific to discount_rules.
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.
Example JSON returned in the response:
Gets a product bulk pricing rule.
GET /stores/{store_hash}/v2/products/{product_id}/discount_rules/{id}
Example JSON returned in the response:
Gets a count of the number of bulk pricing rules in the store.
GET /stores/{store_hash}/v2/products/discount_rules/count
Example JSON returned in the response:
Creates a new product bulk pricing rule.
POST /stores/{store_hash}/v2/products/{product_id}/discount_rules
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.
The following properties of the discount rule are required. The request won’t be fulfilled unless these properties are valid.
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.
Example request object:
Example JSON returned in the response:
Updates an existing product bulk pricing rule.
PUT /stores/{store_hash}/v2/products/{product_id}/discount_rules/{id}
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.
The following properties of the discount rule are required. The request won’t be fulfilled unless these properties are valid.
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.
Example request object:
Example JSON returned in the response:
Deletes a product bulk pricing rule.
DELETE /stores/{store_hash}/v2/products/{product_id}/discount_rules/{id}
Deletes bulk pricing rules associated with a product.
DELETE /stores/{store_hash}/v2/products/{product_id}/discount_rules
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.