Documentation Mercado Libre
Check out all the necessary information about APIs Mercado Libre.
Documentation
Unhealthy Stock Campaign
Check campaign details
Use this resource to retrieve detailed information about a specific Unhealthy Stock campaign, including its status, dates, and available offers.
Request:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/marketplace/seller-promotions/promotions/$PROMOTION_ID?promotion_type=UNHEALTHY_STOCK&user_id=$USER_ID \
--header 'version: v2' \
--header 'X-Client-Id: $CLIENT_ID' \
--header 'X-Caller-Id: $CALLER_ID'
Example:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/marketplace/seller-promotions/promotions/P-MLC13457036?promotion_type=UNHEALTHY_STOCK&user_id=1317418862 \
--header 'version: v2' \
--header 'X-Client-Id: 1317417907' \
--header 'X-Caller-Id: 1317417907'
Response:
{
"id": "P-MLC13457036",
"type": "UNHEALTHY_STOCK",
"status": "started",
"start_date": "2023-10-02T17:00:00Z",
"finish_date": "2023-10-16T15:00:00Z",
"deadline_date": "2023-10-16T15:00:00Z",
"name": "Acelera tus ventas de stock Full",
"offers": [
{
"id": "",
"original_price": 30,
"new_price": 28,
"status": "active",
"start_date": "2023-10-05T14:02:52Z",
"end_date": "",
"benefits": {
"type": "REBATE",
"meli_percent": 0,
"seller_percent": 6.7
}
}
]
}
Response fields
The response contains information about the campaign at the root level and an array of available offers:
- id: Unique promotion identification.
- type: Type of promotion (UNHEALTHY_STOCK).
- status: Current promotion status. See status table below.
- start_date: Campaign start date in ISO 8601 format.
- finish_date: Campaign end date in ISO 8601 format.
- deadline_date: Deadline to join the campaign in ISO 8601 format.
- name: Campaign display name.
- offers: Array containing details of pre-negotiated discounts.
Offers object fields:
- id: Offer identification.
- original_price: Original item price before discount.
- new_price: Final item price after discount.
- status: Current status of the offer.
- start_date: Start date of the offer within the promotion.
- end_date: End date of the offer within the promotion.
- benefits: Object containing promotion benefit details.
Benefits object fields:
- type: Type of benefit applied (e.g., REBATE).
- meli_percent: Percentage of the discount contributed by Mercado Libre.
- seller_percent: Percentage of the discount contributed by the seller.
Status campaign description
The following table describes the possible statuses for an Unhealthy Stock campaign:
| Status | Description |
|---|---|
| pending | Promotion has been approved but has not yet started. |
| started | Promotion is currently active. |
| finished | Promotion has ended. |
Check campaign items
Use this resource to retrieve all items participating or eligible for a specific Unhealthy Stock campaign.
Request:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/marketplace/seller-promotions/promotions/$PROMOTION_ID/items?user_id=$USER_ID \
--header 'version: v2' \
--header 'X-Client-Id: $CLIENT_ID' \
--header 'X-Caller-Id: $CALLER_ID'
Example:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/marketplace/seller-promotions/promotions/P-MLC13457036/items?user_id=1317418862 \
--header 'version: v2' \
--header 'X-Client-Id: 1317417907' \
--header 'X-Caller-Id: 1317417907'
Response:
{
"results": [
{
"id": "MLC1386957825",
"status": "started",
"price": 28,
"original_price": 30,
"currency_id": "USD",
"offer_id": "OFFER-MLC1386957825-10097412984",
"seller_percentage": 6.7,
"start_date": "2023-10-02T17:00:00Z",
"end_date": "2023-10-16T15:00:00Z",
"net_proceeds": {
"amount": 20.68,
"currency": "USD"
}
},
{
"id": "MLC1386957833",
"status": "candidate",
"price": 96.57,
"original_price": 101.54,
"currency_id": "USD",
"offer_id": "CANDIDATE-MLC1386957833-70237414751",
"seller_percentage": 2,
"start_date": "2023-10-02T17:00:00Z",
"end_date": "2023-10-16T15:00:00Z",
"net_proceeds": {
"amount": 20.68,
"currency": "USD"
}
},
{
"id": "MLC1379437243",
"status": "candidate",
"price": 49.99,
"original_price": 0,
"currency_id": "USD",
"offer_id": "CANDIDATE-MLC1379437243-70237419700",
"seller_percentage": 4,
"start_date": "2023-10-02T17:00:00Z",
"end_date": "2023-10-16T15:00:00Z",
"net_proceeds": {
"amount": 20.68,
"currency": "USD"
}
},
{
"id": "MLC1379425217",
"status": "candidate",
"price": 20,
"original_price": 0,
"currency_id": "USD",
"offer_id": "CANDIDATE-MLC1379425217-70237419697",
"seller_percentage": 10,
"start_date": "2023-10-02T17:00:00Z",
"end_date": "2023-10-16T15:00:00Z",
"net_proceeds": {
"amount": 20.68,
"currency": "USD"
}
}
],
"paging": {
"offset": 0,
"limit": 50,
"total": 4
}
}
Response fields
The results array contains the following fields for each item:
- id: Item identification.
- status: Current item status within the promotion. See status item table below.
- price: Final item price after discount.
- original_price: Original item price before discount.
- currency_id: Currency of the prices (e.g., USD, BRL).
- offer_id: Unique offer identification for this item.
- seller_percentage: Percentage of the discount contributed by the seller.
- start_date: Start date of the item's participation in the promotion.
- end_date: End date of the item's participation in the promotion.
- net_proceeds: Object containing the estimated seller earnings.
net_proceeds object fields:
- amount: Estimated net amount the seller will receive for the item.
- currency: Currency of the net proceeds amount.
When a new campaign is created, all applicable items are automatically selected. The initial item status is "candidate" with a unique "offer_id". Once the seller accepts an item into the campaign, the item status changes to programmed or active.
Status item description
The following table describes the possible statuses for items within an Unhealthy Stock campaign:
| Status | Description |
|---|---|
| candidate | Item is eligible to participate in the promotion. |
| programmed | Item has been approved and is scheduled for the promotion. |
| active | Item is currently active in the campaign. |
Add items to campaign
Once a discount has been negotiated for an item, the seller can accept the Unhealthy Stock discount using the following resource.
Request:
curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"promotion_id": "$PROMOTION_ID",
"offer_id": "$OFFER_ID",
"promotion_type": "$PROMOTION_TYPE"
}' \
'https://api.mercadolibre.com/marketplace/seller-promotions/items/$ITEM_ID?user_id=$USER_ID' \
--header 'version: v2' \
--header 'X-Client-Id: $CLIENT_ID' \
--header 'X-Caller-Id: $CALLER_ID'
Example:
curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"promotion_id": "P-MLC13457036",
"offer_id": "CANDIDATE-MLC1379425217-70237419697",
"promotion_type": "UNHEALTHY_STOCK"
}' \
'https://api.mercadolibre.com/marketplace/seller-promotions/items/MLC1379425217?user_id=1317418862' \
--header 'version: v2' \
--header 'X-Client-Id: 1317417907' \
--header 'X-Caller-Id: 1317417907'
Response:
{
"price": 18,
"original_price": 20,
"currency_id": "USD",
"offer_id": "OFFER-MLC1379425217-10098413990"
}
Parameters
The request body must include the following parameters:
- promotion_id: Unique promotion identification.
- offer_id: Identification of the negotiated offer to accept.
- promotion_type: Type of promotion. Use
UNHEALTHY_STOCKfor this campaign.
Remove items from campaign
Use this resource to remove an Unhealthy Stock discount from a specific item.
Request:
curl -X DELETE -H 'Authorization: Bearer $ACCESS_TOKEN' 'https://api.mercadolibre.com/marketplace/seller-promotions/items/$ITEM_ID?user_id=$USER_ID&promotion_type=UNHEALTHY_STOCK&promotion_id=$PROMOTION_ID&offer_id=$OFFER_ID' \
--header 'version: v2' \
--header 'X-Client-Id: $CLIENT_ID' \
--header 'X-Caller-Id: $CALLER_ID'
Example:
curl -X DELETE -H 'Authorization: Bearer $ACCESS_TOKEN' 'https://api.mercadolibre.com/marketplace/seller-promotions/items/MLC1379425217?user_id=1317418862&promotion_type=UNHEALTHY_STOCK&promotion_id=P-MLC13457036&offer_id=OFFER-MLC1379425217-10098413990' \
--header 'version: v2' \
--header 'X-Client-Id: 1317417907' \
--header 'X-Caller-Id: 1317417907'
Response: Status 200 OK