Documentation Mercado Libre
Check out all the necessary information about APIs Mercado Libre.
Documentation
Deal of the day
Query campaign items
To find out which items are part of a deal of the day, you can make the following query:
Request:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' 'https://api.mercadolibre.com/seller-promotions/promotions/$PROMOTION_ID/items?promotion_type=DOD&app_version=v2'
Example:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/seller-promotions/promotions/DOD-MLB1000/items?promotion_type=DOD&app_version=v2
Response:
{
"results": [
{
"id": "MLB3500438494",
"start_date": "2023-04-20T00:00:00",
"finish_date": "2023-04-20T23:59:59",
"status": "candidate",
"price": 3900,
"original_price": 4000,
"max_discounted_price": 3960,
"min_discounted_price": 1200,
"stock": {
"min": 1,
"max": 5
}
},
{
"id": "MLB833682552",
"start_date": "2023-04-20T00:00:00",
"finish_date": "2023-04-20T23:59:59",
"status": "candidate",
"price": 4900,
"original_price": 5000,
"max_discounted_price": 4960,
"min_discounted_price": 2200,
"stock": {
"min": 1,
"max": 5
}
},
{
"id": "MLB915917360",
"start_date": "2023-04-20T00:00:00",
"finish_date": "2023-04-20T23:59:59",
"status": "candidate",
"price": 5900,
"original_price": 6000,
"max_discounted_price": 5960,
"min_discounted_price": 3200,
"stock": {
"min": 1,
"max": 5
}
}
],
"paging": {
"offset": 0,
"limit": 50,
"total": 3
}
}
Response fields
id: item identifier.
start_date: campaign start date.
finish_date: campaign end date.
status: item status in the promotion. (see table)
price: item price within the promotion. If the item status is candidate, it refers to the suggested price.
original_price: current item price.
max_discounted_price: is the lowest price at which this promotion can be offered.
min_discounted_price: is the highest price allowed for this promotion (i.e., the lowest discount allowed).
stock: informative value about the minimum stock the item must have when uploading a candidate in a promotion.
Item status
In the following table you can find the possible statuses that items can have within this type of promotion.
| Status | Description |
|---|---|
| candidate | Candidate to participate in the promotion. |
| pending | Scheduled promotion. |
| started | Active in the promotion. |
| finished | Removed from the campaign. |
Add items
Once invited to participate in a deal of the day, you can indicate which candidate products you want to include in it.
Request:
curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN'
-d '{
"deal_price":"deal_price",
"promotion_type":"$PROMOTION_TYPE"
}'
https://api.mercadolibre.com/seller-promotions/items/$ITEM_ID?app_version=v2
Example:
curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN'
-d '{
"deal_price": 14999,
"promotion_type":"DOD"
}'
https://api.mercadolibre.com/seller-promotions/items/MLA876768946?app_version=v2
Response:
{
"price": 14999,
"original_price": 17000
}
Parameters
deal_price: item price in the promotion.
promotion_type: promotion type DOD (deal of the day).
Delete items
With this resource you can delete the scheduled offer from the item.
Request:
curl -X DELETE -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/seller-promotions/items/$ITEM_ID?app_version=v2&promotion_type=$PROMOTION_TYPE
Example:
curl -X DELETE -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/seller-promotions/items/MLA632979587??app_version=v2&promotion_type=DOD'
Response: Status 200 OK
Next post: Flash deals