Pricing API Allows Negative Values
Catalog
•
ID: 774548
Backlog
Published on3/20/2023
•
Last updated on3/20/2023
1 min read
Summary
Currently, the PUT Price API allows the input of negative values via PUT API Payload, if you set the markup and baseprice to negative values, you'll set the product as unavailable.
Simulation
On the API https://api.vtex.com/account/pricing/prices/1
Set the following price:
{
"itemId": "1",
"listPrice": null,
"costPrice": 11.9,
"markup": -100,
"basePrice": null,
"fixedPrices": [ ]
}
The response will be:

Which breaks the pricing logic and makes the product unavailable, since the checkout and catalog applications aren't able to deal with negative price values.
Workaround
n/a