Adding a Price Variation Limiter
1 min read
There are two of adding a price variation limiter:
- through Admin
- by API REST
Follow the steps below to add a price variation limiter:
Admin
- In VTEX Admin, go to Store Settings > Products > Price Settings, or type Price Settings in the search bar at the top of the page.
- Click on Use price variation limit.
- Enter the desired percentage for Maximum Decrease and Maximum Increase.
- Click Save.
API REST
Authentications for Prices module's API REST calls should be done using AppKey and AppToken. For more info, read our article on how to generate an AppKey and AppToken to authenticate integrations
To add a price variation limiter, you need to send a POST to the following endpoint:
https://api.vtex.com/{{account}}/pricing/config
- The request object has the following properties:
Properties | Types | Description |
---|---|---|
priceVariation | object | Price variation |
upperLimit | integer | Upper limit |
lowerLimit | integer | Lower limit |
- Below, we have an example of a Header and Body to be used in the request
Headers
Header | Value |
---|---|
Accept | application/vnd.vtex.pricing.v3+json |
Content-Type | application/json |
X-VTEX-API-AppKey | {{X-VTEX-API-AppKey}} |
X-VTEX-API-AppToken | {{X-VTEX-API-AppToken}} |
Body
{
"priceVariation": {
"upperLimit": 50,
"lowerLimit": 20
}
}