Update prices
Change existing product prices, discounts, and tiered pricing.
When the update is processed, the merge strategy is used to apply changes to scalar and object type fields.
For array type fields, a new value can be appended to the existing list. For an object list, you can update a specific object by matching on a key field. The following fields are supported:
- discounts - match on code
- tierPrices - match on qty
- Regular Price - Updated using merge strategy
- Discounts Array - Updated using the append or merge strategy
- Tiered Pricing Array - Updated using the append or merge strategy
When updating discounts or tiered pricing:
- Include all desired discounts/tiers in the array
- The entire array replaces the existing configuration
- To remove all discounts/tiers, send an empty array
- To add new discounts/tiers, include both existing and new items
- Always include the complete array of discounts/tiers when updating
- Use descriptive discount codes for easier management
- Ensure tier quantities are in ascending order
- Test updates in a development environment first
Note: Before submitting an update request, verify that the target entity exists using the products GraphQL query to check the prices assigned to the product SKU. Update operations do not verify that the entity exists. Requests targeting a nonexistent entity are accepted, but the update has no effect.
Headers
Authorization Bearer token
Use this header if the payload is compressed with gzip.
Request body
Example request
[
{
"discounts": [
{
"code": "loyalty_discount",
"price": 10
}
],
"tierPrices": [
{
"qty": 5,
"price": 80
}
]
}
]Response
All items accepted and will be processed asynchronously