Documentation Mercado Libre
Check out all the necessary information about APIs Mercado Libre.
Documentation
Co-funded campaigns (MARKETPLACE CAMPAIGN)
Check Co-funded campaign details
For Deal promotion details, perform the query below:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/marketplace/seller-promotions/promotions/P-MLM649001?promotion_type=MARKETPLACE_CAMPAIGN&user_id=739768312
Response:
{
"id": "P-MLM649001",
"type": "MARKETPLACE_CAMPAIGN",
"status": "started",
"start_date": "2021-07-15T20:00:00Z",
"finish_date": "2021-12-05T04:00:00Z",
"deadline_date": "2021-12-05T04:00:00Z",
"name": "Co funded CBT",
"benefits": {
"type": "REBATE",
"meli_percent": 2,
"seller_percent": 13
}
}
Specific campaign fields
Benefits: promotion benefit details.
- type: type of benefit.
- meli_percent: percentage contributed by Mercado Libre.
Status
pending_approval: promotion approved.
pending: promotion approved but not yet started.
started: active promotion.
finished: finished promotion.
Check items in a Co-funded campaign
Request:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/marketplace/seller-promotions/promotions/P-MLM649001/items?user_id=739768312
Response:
{
"results": [
{
"id": "MLM902892898",
"status": "candidate",
"price": 139.98,
"original_price": 0,
"currency_id": "USD"
},
{
"id": "MLM902892876",
"status": "active",
"price": 71.93,
"original_price": 79.91,
"offer_id": "MLM902892876-e2c22989-ad86-5ed9-6b1d-2c1da0ac21a8"
"currency_id": "USD"
},
{
"id": "MLM902888695",
"status": "candidate",
"price": 89.99,
"original_price": 0,
"currency_id": "USD"
},
{
"id": "MLM902892891",
"status": "candidate",
"price": 119.86,
"original_price": 0,
"currency_id": "USD"
}
],
"paging": {
"offset": 0,
"limit": 0,
"total": 4
}
}
When a new campaign is created, all applicable items are selected. The initial item (status) is "candidate" with no assigned offer id. When the seller adds an item to the campaign, item status changes and a unique "offer_id" is assigned.
Campaign item status
candidate: candidate item to participate in the promotion.
programmed: approved and programmed promotion item.
active: campaign active item.
Specify items for a Co-funded campaign
Once you are invited to participate in a co-funded campaign, you can specify the products to be included.
Request:
curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' \
-d
{
"deal_id":"$DEAL_ID",
"promotion_type":"$PROMOTION_TYPE"
}
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":"P-MLM649001",
"promotion_type":"MARKETPLACE_CAMPAIGN"
}
https://api.mercadolibre.com/marketplace/seller-promotions/items/MLM902892876?user_id=739768312
Response:
{
"offer_id": "MLM902892876-e2c22989-ad86-5ed9-6b1d-2c1da0ac21a8",
"price": 71.93,
"original_price": 79.91,
"currency_id": "USD"
}
Parameters
deal_id: promotion identification. MARKETPLACE_CAMPAIGN.
promotion_type: type of promotion MARKETPLACE_CAMPAIGN.
Edit items
Since prices cannot be changed directly, follow the steps below to change the price of an item included in a volume discount campaign.
Steps:
- Delete the item from the campaign
- Change item price just like regular price synchronization
- Add the item back to the campaign
Delete items
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=MARKETPLACE_CAMPAIGN&deal_id=$DEAL_ID
Example:
curl -X DELETE -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/marketplace/seller-promotions/items/MLM902892876?user_id=739768312&promotion_type=MARKETPLACE_CAMPAIGN&deal_id=P-MLM649001