Documentation Mercado Libre
Check out all the necessary information about APIs Mercado Libre.
Documentation
Pre-negotiated item discount and Full stock clearance campaign
Seller view
Query campaign details
Pre-negotiated discount example:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/seller-promotions/promotions/P-MLM394001?promotion_type=PRE_NEGOTIATED&app_version=v2
Pre-negotiated discount response:
{
"id": "P-MLM394001",
"type": "PRE_NEGOTIATED",
"status": "started",
"start_date": "2021-03-30T18:30:15.525Z",
"finish_date": "2021-12-27T17:59:59.525Z",
"deadline_date": "2021-05-27T17:59:59.525Z",
"name": "Prueba descuento x item sin benefit",
"offers": [
{
"id": "MLM848619385-f588cf87-e298-498e-82ad-285b16dd11d5",
"original_price": 101,
"new_price": 21,
"status": "active",
"start_date": "2021-05-10T16:00:00Z",
"end_date": "2021-05-11T15:00:00Z",
"benefits": {
"type": "REBATE",
"meli_percent": 9.9,
"seller_percent": 69.3
}
}
]
}
Full stock clearance example:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' 'https://api.mercadolibre.com/seller-promotions/promotions/P-MLB12345?promotion_type=PRE_NEGOTIATED&app_version=v2'
Full stock clearance response:
{
"id": "P-MLB12345",
"type": "UNHEALTHY_STOCK",
"status": "started",
"start_date": "2023-08-30T18:30:15.525Z",
"finish_date": "2023-12-27T17:59:59.525Z",
"deadline_date": "2023-09-27T17:59:59.525Z",
"name": "Prueba liquidación stock Full",
"offers": [
{
"id": "MLB10203040-f588cf87-e298-498e-82ad-285b16dd11d5",
"original_price": 101,
"new_price": 21,
"status": "active",
"start_date": "2023-09-10T16:00:00Z",
"end_date": "2021-09-11T15:00:00Z",
"benefits": {
"type": "REBATE",
"meli_percent": 9.9,
"seller_percent": 69.3
}
}
]
}
Specific fields for these campaigns
Offers: pre-negotiated discount details.
- type: benefit type.
- meli_percent: percentage contributed by Mercado Libre.
- seller_percent: percentage contributed by the seller.
Campaign statuses
These are the different statuses that campaigns can go through.
| Status | Description |
|---|---|
| pending | Approved but not yet started. |
| started | Active |
| finished | Finished |
Query items in a campaign
To find out which items are part of a campaign, you can make the following query:
Pre-negotiated discount example:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/seller-promotions/promotions/P-MLM394001/items?promotion_type=PRE_NEGOTIATED&app_version=v2
Pre-negotiated discount response:
{
"results": [
{
"id": "MLM848619385",
"status": "candidate",
"price": 21,
"original_price": 101,
"offer_id": "MLM848619385-0e2f3064-0e13-425d-b4a7-0dee85414835",
"meli_percentage": 24.8,
"seller_percentage": 54.5,
"start_date": "2021-05-11T22:00:00Z",
"end_date": "2021-05-13T01:00:00Z"
}
],
"paging": {
"total": 1
}
}
Full stock clearance example:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' 'https://api.mercadolibre.com/seller-promotions/promotions/P-MLB12345/items?promotion_type=UNHEALTHY_STOCK&app_version=v2'
Full stock clearance response:
{
"results": [
{
"id": "MLB10203040",
"status": "candidate",
"price": 21,
"original_price": 101,
"offer_id": "MLB10203040-0e2f3064-0e13-425d-b4a7-0dee85414835",
"meli_percentage": 24.8,
"seller_percentage": 54.5,
"start_date": "2023-09-11T22:00:00Z",
"end_date": "2023-09-13T01:00:00Z"
}
],
"paging": {
"total": 1
}
}
When a new campaign is created, all applicable items are selected. The initial status of the items is candidate and they have a unique offer_id. When the seller adds an item to the campaign, its status is modified and becomes programmed or active.
Item statuses
In the following table you can find the possible statuses that items can have within these types of campaigns.
| Status | Description |
|---|---|
| candidate | Candidate to participate in the promotion. |
| pending | Approved and scheduled promotion. |
| started | Active in the campaign. |
| finished | Removed from the campaign. |
Accept discount
Once a discount has been agreed upon for an item, the following resource can be used to confirm by the seller.
Request:
curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' \
-d '{
"promotion_id":"$PROMOTION_ID",
"offer_id":"$OFFER_ID",
"promotion_type":"$PROMOTION_TYPE"
}'
https://api.mercadolibre.com/seller-promotions/items/$ITEM_ID
Pre-negotiated discount example:
curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' \
-d '{
"promotion_id":"P-MLM394001",
"offer_id":"MLM848619385-f588cf87-e298-498e-82ad-285b16dd11d5",
"promotion_type":"PRE_NEGOTIATED"
}'
https://api.mercadolibre.com/seller-promotions/items/MLM848619385
Pre-negotiated discount response:
{
"offer_id": "MLM848619385-f588cf87-e298-498e-82ad-285b16dd11d5",
"price": 21,
"original_price": 101
}
Full stock clearance example:
curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' \
-d '{
"promotion_id":"P-MLB12345",
"offer_id":"MLB10203040-f588cf87-e298-498e-82ad-285b16dd11d5",
"promotion_type":"UNHEALTHY_STOCK"
}'
https://api.mercadolibre.com/seller-promotions/items/MLB10203040
Full stock clearance response:
{
"offer_id": "MLB10203040-f588cf87-e298-498e-82ad-285b16dd11d5",
"price": 21,
"original_price": 101
}
Parameters
promotion_id: promotion identification.
offer_id: agreed offer identification.
promotion_type: promotion type (PRE_NEGOTIATED or UNHEALTHY_STOCK).
Delete discount
With this function you can delete the item offer.
Request:
curl -X DELETE -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/seller-promotions/items/$ITEM_ID?promotion_type=$PROMOTION_TYPE&promotion_id=$PROMOTION_ID&offer_id=$OFFER_ID
Pre-negotiated discount example:
curl -X DELETE -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/seller-promotions/items/MLB1834747833?promotion_type=PRE_NEGOTIATED&promotion_id=P-MLM394001&offer_id=MLM1834747833-9eafadd4-16d2-49ae-b272-9a7a34585cb8
Full stock clearance example:
curl -X DELETE -H 'Authorization: Bearer $ACCESS_TOKEN' 'https://api.mercadolibre.com/seller-promotions/items/MLB10203040?promotion_type=UNHEALTHY_STOCK&promotion_id=P-MLB12345&offer_id=MLB10203040-f588cf87-e298-498e-82ad-285b16dd11d5'
Response: Status 200 OK
Next: Individual discount