Documentación Mercado Libre
Descubre toda la información que debes conocer sobre las APIs de Mercado Libre.Documentación
Lightning deal
Check items
Perform the query below to check the items included in a lightening deal:
Request:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' 'https://api.mercadolibre.com/seller-promotions/promotions/$PROMOTION_ID/items?app_version=v2&promotion_type=LIGHTNING'
Example:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/seller-promotions/promotions/LGH-MLB1000/items?app_version=v2&promotion_type=LIGHTNING
Response:
{
"results": [
{
"id": "MLB3293401743",
"start_date": "2023-04-21T15:00:00",
"finish_date": "2023-04-21T23:00:00",
"status": "candidate",
"price": 4000,
"original_price": 5000,
"max_discounted_price": 4950,
"min_discounted_price": 1500,
"stock": {
"min": 2,
"max": 5
}
}
],
"paging": {
"offset": 0,
"limit": 50,
"total": 1
}
}
Response fields
id: item identification.
start_date: campaign start date.
finish_date: campaign end date.
status: promotion item status. ( (See table) )
price: promotion item price. In case the status of the item is candidate, it refers to the suggested price.
original_price: preço atual do item.
min_discounted_price: is the highest price allowed for that promotion (i.e. the lowest discount allowed).
stock: information value about the minimum and maximum stock to assigned to a promotion.
Item status
The table below shows the possible item status in this type of promotion.
Status | Description |
---|---|
candidate | Candidate item to participate in the promotion. |
pending | Programmed promotion item. |
started | Item active for a deal. |
finished | Item deleted from campaign. |
Specify items for a lightning deal.
Once you are invited to participate in a lightening deal, you can specify the candidates to be included. Remember that you need to report the stock to be available for this promotion. When the available stock is used up, the item promotion will be automatically ended.
Request:
curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN'
-d '{
"deal_price":$deal_price,
"stock": $STOCK,
"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 '{
"stock": 4000,
"stock":2,
"promotion_type":"LIGHTNING"
}'
https://api.mercadolibre.com/seller-promotions/items/MLB3293401743?app_version=v2
Response:
{
"price": 14999,
"original_price": 17000
}
Parameters
deal_price: promotion item price.
original_price: item price before inclusion in the promotion.
stock: stock of item to be reserved for this promotion.
promotion_type: type of promotion LIGHTNING.
Delete items
Use this resource to remove an item offer.
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=LIGHTNING
Response: Status 200 OK
Next: Seller campaigns.