Documentation Mercado Libre

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

Documentation

Last update 26/02/2024

Lightning Deal

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 the resources below. Remember that this type of offers has a limited stock and the promotion ends once the stock runs out.





Check items in a lightning deal

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-Caller-Id:  \
--header 'X-Client-Id: \

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' 'https://api.mercadolibre.com/marketplace/seller-promotions/promotions/LGH-MLM1000/items?user_id=1317418851' \
--header 'version: v2' \
--header 'X-Caller-Id: 1317417907' \
--header 'X-Client-Id: 1317417907' \

Response:

{
   "results": [
       {
           "id": "MLM2183693560",
           "status": "candidate",
           "price": 70,
           "original_price": 0,
           "currency_id": "USD",
           "start_date": "2024-01-30T07:00:00",
           "finish_date": "2024-01-30T15:00:00",
           "max_discounted_price": 59.9,
           "min_discounted_price": 1.2
       }
   ],
   "paging": {
       "offset": 0,
       "limit": 50,
       "total": 1,
       "searchAfter": ""
   }

Response fields:

  • id: item identification.
  • 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: current item price.
  • currency_id:
  • start_date: campaign start date.
  • finish_date: campaign end date.
  • max_discounted_price: is the lowest price at which that promotion can be offered.
  • min_discounted_price: is the highest price allowed for that promotion (i.e. the lowest discount allowed).
  • 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 Promotion active item.
    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 available stock for this promotion. When the available stock runs out, the item promotion will be automatically ended


    Request:

    curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN'
    
        https://api.mercadolibre.com/marketplace/seller-promotions/items/$ITEM_ID?user_id=$USER_ID
        
        -d 
        {
           "deal_id":"$DEAL_ID",
           "deal_price":$DEAL_PRICE,
           "original_price":$LIST_PRICE,
           "promotion_type":"$PROMOTION_TYPE"
        }

    Example:

    curl -X POST 'https://api.mercadolibre.com/marketplace/seller-promotions/items/MLM2183693560?user_id=1317418851' \
        --header 'Authorization: Bearer APP_USR-3055064291466052-012915-b33fd4fc2a6801580951edcdf26ed3f8-1317417907' \
        --header 'version: v2' \
        --header 'X-Caller-Id: 1317417907' \
        --header 'X-Client-Id: 1317417907' \
        
        -d
        {
            "deal_id": "LGH-MLM1000",
            "original_price": 70,
            "deal_price": 64,
            "promotion_type": "LIGHTNING",
            "stock":50
        }

    Response:

    {
        "price": 64,
        "original_price": 70,
        "currency_id": "USD"
     }

    Parameters

    • deal_price: promotion item price.
    • original_price: item price before included in the 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&promotion_id=$DEAL_ID
        --header 'Authorization: Bearer ' \
        --header 'X-Caller-Id: ' \
        --header 'X-Client-Id: ' \
        --header 'version: v2' \
    

    Example:

    curl -X DELETE -H 'https://api.mercadolibre.com/marketplace/seller-promotions/items/MLM2183693560?user_id=1317418851&promotion_type=LIGHTNING&promotion_id=LGH-MLM1000&offer_id=LGH-MLM1000' \
        --header 'Authorization: Bearer \
        --header 'X-Caller-Id: 1317417907' \
        --header 'X-Client-Id: 1317417907' \
        --header 'version: v2' \

    Response:200 ok.

    Next: Seller campaign.