Menu
Feedback
Start here
Tutorials


VTEX Modules: Getting Started
Prices
6. Adding a base price
Adding a base price

There are three ways to add a base price:

Follow the steps below to add a base price to your SKUs:

Admin

  1. In the VTEX Admin, go to Prices > Price list, or type Price list in the search bar at the top of the page.
  2. Each box contains a product with its respective SKUs. Click on the first column of the desired SKU's line. A sidebar will open.
  3. Fill in the form fields:
  • Cost Price: fill out the SKU cost value.
  • Initial Markup: fill out with the profit margin that is to be obtained from the sale of that SKU.
  1. Click on the sidebar itself to save the price.
  2. The Base Price will be calculated based on the given data.

You may also add a List Price linked to an SKU base price by following the steps below:

  1. At the bottom of the same sidebar where you add the base price, click on the + Set list price
  2. Fill the out the List Price field with the desired SKU value
  3. Click anywhere on the sidebar itself to save the list price

API REST

Authentications for the Prices module's API REST requests must be done using AppKey and AppToken. For more on this, read our article on how to manage an AppKey and AppToken to authenticate your integrations.

To add a base price to an SKU, you'll have to send a PUT request to the following endpoint:

https://api.vtex.com/{{account}}/pricing/prices/{{itemId}}

You can also add a list price that is linked to the SKU base price. However, this field is not mandatory.

  • The request object has the following properties:
PropertiesTypesDescription
costPriceintegerSKU Cost Price
markupintegerSKU Markup
basePriceintegerSKU Base Price
listPriceintegerSKU List Price
  • The response object has the following properties:
PropertiesTypesDescription
itemIdstringSKU ID
costPriceintegerSKU Cost Price
basePriceintegerSKU Base Price
listPriceintegerSKU List Price
markupintegerSKU Markup
fixedPricesarrayFixed Price
tradePolicyIdintegerTrade policy ID
valueintegerFixed Price value
listPriceintegerList Price
minQuantityintegerMinimum item quantity
dateRangestringFixed price date range
  • Below, we have a Header example and three possible Body examples to be sent in the request

Headers

HeaderValue
Acceptapplication/vnd.vtex.pricing.v3+json
Content-Typeapplication/json
X-VTEX-API-AppKey{{X-VTEX-API-AppKey}}
X-VTEX-API-AppToken{{X-VTEX-API-AppToken}}

Body - Example 1


{
"costPrice": null,
"markup": 100,
"basePrice": 300
}

costPrice * (1 + markup%) = basePrice

In this example, as markup = 100 and basePrice = 300, the costPrice calculated by the system will be equal to 150.

Body - Example 2


{
"costPrice": 150,
"markup": null,
"basePrice": 300,
"listPrice": 500
}

costPrice * (1 + markup%) = basePrice

In this example, as costPrice = 150 and basePrice = 300, the markup calculated by the system will be equal to 100.

We have also included a List Price with a value of 500.

Body - Example 3


{
"costPrice": 150,
"markup": 100,
"basePrice": null,
}

costPrice * (1 + markup%) = basePrice

In this example, as costPrice = 150 and markup = 100, the basePrice calculated by the system will be equal to 300.

Contributors
4
Photo of the contributor
Photo of the contributor
Photo of the contributor
Photo of the contributor
+ 4 contributors
Was this helpful?
Yes
No
Suggest Edits (GitHub)
5. Base Price - Concept Definition
« Previous
7. Price rule - Concept definition
Next »
Contributors
4
Photo of the contributor
Photo of the contributor
Photo of the contributor
Photo of the contributor
+ 4 contributors
On this page
Still got questions?
Ask the community
Find solutions and share ideas in the VTEX community.
Join our community
Request support from VTEX
For personalized assistance, contact our experts.
Open a support ticket
GithubDeveloper portalCommunityFeedback