Documentation Mercado Libre

Check out all the necessary information about APIs Mercado Libre.
circulos azuis em degrade

Documentation

Last update 21/12/2022

Lightning Deal (LIGHTNING)

Sellers are regularly invited to participate in different website promotions. If you received an invitation to participate in a Lightening Deal and want to join, use this API. Remember that this type of offers has a reserved stock and the promotion ends when the stock is used up.





Get items in a lightning deal

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/marketplace/seller-promotions/promotions/LGH-MLM1000/items?user_id=481244699

Response:

{
    "results": [
        {
            "id": "MLM745913661",
            "status": "candidate",
            "price": 26.05,
            "original_price": 0,
            "currency_id": "USD",
            "stock": {
                "min": 10,
                "max": 15
            }
        },
        {
            "id": "MLM755504940",
            "status": "candidate",
            "price": 22.2,
            "original_price": 0,
            "currency_id": "USD",
            "stock": {
                "min": 10,
                "max": 15
            }
        }
    ],
    "paging": {
        "offset": 0,
        "limit": 50,
        "total": 2
    }
}

Response fields

id: item identification.
status: promotion item status.

  • candidate: candidate item to participate in the promotion.
  • pending: programmed promotion item.
  • started: item active for a deal.

price: promotion item price. A candidate, item status makes reference to suggested price.
original_price: current item price.
max_original_price: maximum price for an item as original_price to participate in a promotion.
stock: information value about the minimum and maximum stock to assigned to a promotion.


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_id": "$DEAL_ID",
   "deal_price": "$DEAL_PRICE",
   "original_price": "$LIST_PRICE",
   "promotion_type": "$PROMOTION_TYPE",
   "stock": $STOCK
}
https://api.mercadolibre.com/marketplace/seller-promotions/items/$ITEM_ID?user_id=$USER_ID

Example:

curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' -d 
{
    "deal_id": "LGH-MLM1000",
    "original_price": 21.89,
    "deal_price": 15,
    "promotion_type": "LIGHTNING",
    "stock": 12
}
https://api.mercadolibre.com/marketplace/seller-promotions/items/MLM755504940?user_id=481244699

Response:

{
  "price": 15,
  "original_price": 21.89
  "currency_id": "USD"
}

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 offer

Use this resource to remove an item offer.

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=LIGHTNING&deal_id=$DEAL_ID

Example:

curl -X DELETE -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/marketplace/seller-promotions/items/MLM755504940?user_id=481244699&promotion_type=LIGHTNING&deal_id=LGH-MLM1000

Next: Volume discount campaigns.