Documentação do Mercado Livre
Confira todas as informações necessárias sobre as APIs Mercado Livre.Documentação do
Products prices
If you publish and synchronize items you must consult the prices related to a product and context (channel and/or buyer level) with the following APIs. In addition, you can know the exact sale value. To create an item and update its price, you must continue to do so through the /items API. Soon the price editing will be done separately to the item and will allow you to improve the selling experience.
In Mercado Libre you can see the prices as follows:
Prices notifications
To receive notifications about prices, you must subscribe to the topic items_prices, after receiving the notification you must consult the resource /prices.
Get current sales price
To know the sales price, you should know that prices can be standard (default prices without associated promotions) or promotion (promotional, the price has a promotion) .
With the following request you identify the winning sales price of a product and you can filter prices by sales channel and/or buyer level. In addition, you will receive information about the promotions associated with the item with the winning price, which is shown to the buyer. If the token does not belong to the seller and item consulted, you will not receive information from the metadata array (type of associated promotion).
Context: Optional parameter to filter sales channel and/or buyer level. We recommend you send at least one channel at a time and optionally you can add each loyalty_level. Possible values:
CHANNEL (Canal de venta)
- channel_marketplace: Mercado Libre.
- channel_mshops: Mercado Shops available in MLA, MLB, MLM, MLC and MCO. If you still don't work with this channel, learn more about Mercado Shops.
- channel_proximity, mp_merchants y mp_links: channel of products published in Mercado Pago. They will be enabled soon.
LOYALTY_LEVEL (buyer level): not available in MLU and MPE
- buyer_loyalty_3
- buyer_loyalty_4
- buyer_loyalty_5
- buyer_loyalty_6
Request:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/items/$ITEM_ID/sale_price?context=$CHANNEL,LOYALTY_LEVEL
Example:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/items/MLB3191390879/sale_price?context=channel_marketplace,buyer_loyalty_3
Response:
{
"price_id": "1",
"amount": 800,
"regular_amount": null,
"currency_id": "BRL",
"reference_date": "2023-02-15T00:23:53Z"
}
Field descriptions
- price_id: price id.
- amount: product's price.
- regular_amount: original product's price, in cases with promotion. The strikethrough price of the winning price is also calculated, and can be taken from several sources. It will not necessarily be the same 'regular_amount' that has the price node loaded in /prices.
- currency_id: id of the coin that referred to the amount field and regular_amount.
- reference_date: date for which you are calculating the sale_price.
promotion_id: Promotion id. With this ID you can check the offer (item, promotion and status). .
promotion_type: type of promotion It is not reported which campaign the item is from.
When the promotion is active:
When the promotion is scheduled:
- It will not be reflected
- If you update the DEALS price, it will not be impacted until the indicated date.
With the Promotions API, you can check promotions filtering by their status (started, finished, pending and candidate).
Only CUSTOM and PRICE_DISCOUNT offers are reported as custom. This is because they can be created in 2 ways:
- Individually, placing a custom offer on an item.
- massively as part of a percentage off seller campaign. That is, you create a 5% discount campaign and upload items to that campaign.
This means that for all those items CUSTOM/PRICE_DISCOUNT offers were created with a 5% discount. There are no other types of campaigns that also report being custom.
Get Item Prices
Know all the types of prices, as long as they are in force, that a product can have in the different channels where it is published.
Request:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/items/$ITEM_ID/prices
Response:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/items/MLB3191390879/prices?
Resposta:
{
"id": "MLB3191390879",
"prices": [
{
"id": "1",
"type": "standard",
"amount": 800,
"regular_amount": null,
"currency_id": "BRL",
"last_updated": "2023-02-14T18:43:58Z",
"conditions": {
"context_restrictions": [
"channel_marketplace"
],
"start_time": null,
"end_time": null
}
},
{
"id": "2",
"type": "standard",
"amount": 650,
"regular_amount": null,
"currency_id": "BRL",
"last_updated": "2023-02-14T18:43:58Z",
"conditions": {
"context_restrictions": [
"channel_mshops"
],
"start_time": null,
"end_time": null
}
}
]
}
Field descriptions
id: product id.
price: value defined by the seller for the publication in this context.
- type: price type. Standard: value indicated by the seller without promotions. The promotional price will be available soon.
- amount: indicates the price of the product.
- regular_amount: indicates the original price of the product, in cases with promotion.
- currency_id: indicates the ID of the currency to which the regular_amount field refers.
- conditions: indicates the conditions under which the price in question may be applied.
- context_restrictions: channel to which the price applies or loyalty level. Conceptually, they are constraints that only 'compete' to be the selling price if the context complies with those values, so it is restricted to those values.