Documentation Mercado Libre
Check out all the necessary information about APIs Mercado Libre.
Documentation
Co-funded campaigns
Query campaign details
To get the details of a co-funded offer, make the following query:
Request:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/seller-promotions/promotions/P-MLB1806015?promotion_type=MARKETPLACE_CAMPAIGN&app_version=v2'
Response:
{
"id": "P-MLB1806015",
"type": "MARKETPLACE_CAMPAIGN",
"status": "started",
"start_date": "2023-04-20T02:00:00Z",
"finish_date": "2023-08-01T02:00:00Z",
"deadline_date": "2023-08-01T01:00:00Z",
"name": "Campanha de teste v2",
"benefits": {
"type": "REBATE",
"meli_percent": 5,
"seller_percent": 25
}
}
Specific fields for this campaign
Benefits: promotion benefits details.
- type: the seller will not be able to send messages to the buyer.
- meli_percent: percentage contributed by Mercado Libre.
Statuses
These are the different statuses that a co-funded campaign can go through.
| Status | Description |
|---|---|
| pending | Approved promotion that has not yet started. |
| started | Active promotion. |
| finished | Finished promotion. |
Query items in a campaign
To find out the candidate items and/or those that are part of a co-funded campaign, you can make the following query:
Request:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/seller-promotions/promotions/P-MLB1806015/items?promotion_type=MARKETPLACE_CAMPAIGN&app_version=v2'
Response:
{
"results": [
{
"id": "MLB3293401659",
"status": "started",
"price": 700,
"original_price": 1000,
"offer_id": "OFFER-MLB3293401659-177366",
"meli_percentage": 5,
"seller_percentage": 25,
"start_date": "2023-04-23T23:06:53Z",
"end_date": "2023-08-01T02:00:00Z"
}
],
"paging": {
"offset": 0,
"limit": 50,
"total": 1
}
}
When a new campaign is created, all applicable items are selected. The initial status of the items is candidate and without an assigned offer id. When the seller adds an item to the campaign, its status is modified and a unique offer_id is assigned.
Item statuses
In the following table you can find the possible statuses that items can have within this type of campaign.
| Status | Description |
|---|---|
| candidate | Candidate item to participate in the promotion. |
| pending | Item with approved and scheduled promotion. |
| started | Item active in the campaign. |
| finished | Item removed from the campaign |
Add items to a campaign
Once you have been invited to participate in a co-funded campaign, you can indicate which products you want to include in it.
Request:
curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' \
-d '{
"promotion_id":"$PROMOTION_ID",
"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 '{
"promotion_id":"P-MLB1806015",
"promotion_type":"MARKETPLACE_CAMPAIGN"
}'
https://api.mercadolibre.com/seller-promotions/items/MLB3293401659?app_version=v2
Response:
{
"offer_id": "OFFER-MLB3293401659-177366",
"price": 700,
"original_price": 1000
Parameters
promotion_id: promotion identification.
promotion_type: promotion type (MARKETPLACE_CAMPAIGN).
Modify items
To modify the price of an item that is participating in a co-funded campaign, the following steps must be taken, since it is not possible to modify the price directly.
- Remove the item from the campaign
- Modify the item price as normal price synchronization
- Include the item in the campaign again
Delete items
With this resource you can delete the item offer.
Request:
curl -X DELETE -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/seller-promotions/items/$ITEM_ID?promotion_type=$PROMOTION_TYPE&promotion_id=$PROMOTION_ID&offer_id=$OFFER_ID
Example:
curl -X DELETE -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/seller-promotions/items/MLA632979587?promotion_type=MARKETPLACE_CAMPAIGN&promotion_id=1804&offer_id=MLA876618673-9eafadd4-16d2-49ae-b272-9a7a34585cb8&app_version=v2'
Response: Status 200 OK
Learn more about Co-funded campaigns.