Create or update base price or fixed price
Creates or updates an SKU base price or fixed price. The base price is the basic selling price of a product, it comprises the cost price and the markup wanted in the sale of the product. The fixed price is an optional price of the SKU for a specific trade policy with a specific minimum quantity to be activated.
You may optionally set a list price. You must provide exactly two values among basePrice, costPrice, and markup. If all three are sent at the same time, the request will fail. If you provide both costPrice and markup and omit the basePrice, the basePrice will be automatically calculated using the following formula costPrice * (1 + markup) = basePrice.
⚠️ This PUT request overwrites all fixed prices for the specified SKU with the provided data. It does not add new fixed prices individually — any existing prices not included in the request body will be deleted.
Permissions
Any user or API key must have at least one of the appropriate License Manager resources to be able to successfully run this request. Otherwise they will receive a status code 403 error. These are the applicable resources for this endpoint:
| Product | Category | Resource |
|---|---|---|
| Pricing | Price List | Modify prices |
There are no applicable predefined roles for this resource list. You must create a custom role and add at least one of the resources above in order to use this endpoint. To learn more about machine authentication at VTEX, see Authentication overview.
❗ To prevent integrations from having excessive permissions, consider the best practices for managing API keys when assigning License Manager roles to integrations.
Path parameters
SKU unique identifier number.
Headers
Type of the content being sent.
HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.
Request body
Example request
{
"markup": 30,
"listPrice": 50,
"basePrice": 100,
"costPrice": 35,
"fixedPrices": [
{
"tradePolicyId": "1",
"value": 50.5,
"listPrice": 50.5,
"minQuantity": 2,
"dateRange": {
"from": "2021-12-30T22:00:00-03:00",
"to": "2021-12-30T23:00:00-03:00"
}
}
]
}Response
OK