Rules that modify the properties of a product, such as weight, price, and product image.
This is archived documentation. The V2 Catalog API is deprecated. For current API documentation, see the Catalog API.
Gets the collection of rules associated with a product. (Default sorting is by rule id, from lowest to highest.)
GET /stores/{store_hash}/v2/products/{product_id}/rules
There are no filter parameters specific to product 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 product_rules are returned by default.
Example JSON returned in the response:
Gets a single product rule.
GET /stores/{store_hash}/v2/products/{product_id}/rules/{id}
Example JSON returned in the response:
Gets a count of the number of product rules in the store.
GET /stores/{store_hash}/v2/products/rules/count
Example JSON returned in the response:
Creates a new product rule.
POST /stores/{store_hash}/v2/products/{product_id}/rules
The following properties of the product 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 product rule are required. The request won’t be fulfilled unless these properties are valid.
Example JSON returned in the response:
Updates an existing product rule.
Note
If you include a conditions object array, its contents will be appended to any existing conditions. This operation does not overwrite existing conditions.
PUT /stores/{store_hash}/v2/products/{product_id}/rules/{id}
The following properties of the product rule are read-only. If one or more of these properties are included in the request, it will be rejected.
There are no property requirements for updating a product rule.
Example JSON returned in the response:
Deletes a product rule.
DELETE /stores/{store_hash}/v2/products/{product_id}/rules/{id}
Deletes multiple product rules.
DELETE /stores/{store_hash}/v2/products/{product_id}/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 product_rules are returned by default.