Documentación Mercado Shops
Descubre toda la información que debes conocer sobre las APIs de Mercado Shops.![circulos azuis em degrade](https://http2.mlstatic.com/storage/developers-site-cms-admin/DevImgs/230801158836-ImgMS--1-.png)
Documentación
Publications
Link seller to store
To find out if the seller has a store created, do a search with the site and seller ID. If you have the mshops tag it means that you have your store created in Mercado Shops. If you do not have this tag, you can create a store in Mercado Shops.
Request:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/sites/$SITE_ID/search?seller_id=$SELLER_ID
Example:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/sites/MLB/search?seller_id=618515328
Response:
{
"site_id":"MLB",
"seller":{
"id":618515328,
"nickname":"TETE1835554",
"permalink":"http://perfil.mercadolivre.com.br/TETE1835555",
"registration_date":"2020-07-31T09:59:53.000-04:00",
"seller_reputation":{
"level_id":"5_green",
"power_seller_status":null,
"transactions":{
"total":1,
"canceled":0,
"period":"historic",
"ratings":{
"negative":0,
"positive":0,
"neutral":1
},
"completed":1
},
"metrics":{
"sales":{
"period":"365 days",
"completed":1
}
}
},
"real_estate_agency":false,
"car_dealer":false,
"tags":[
"normal",
"test_user",
"mshops",
"messages_as_seller",
"messages_as_buyer"
],
"eshop":null
},
"paging":{
"total":0,
"primary_results":1000,
"offset":0,
"limit":50
},
"results":[ ],
"secondary_results":[ ],
"related_results":[ ],
"sort":{
"id":"relevance",
"name":"Mais relevantes"
},
"available_sorts":[
{
"id":"price_asc",
"name":"Menor preço"
},
{
"id":"price_desc",
"name":"Maior preço"
}
],
"filters":[ ],
"available_filters":[ ]
}
Publish in Mercado Libre and/or Mercado Shops
By using the channels field you can define in which channel you want to publish your item (Mercado Libre and/or Mercado Shops). This same action can be performed at any time you want to change the publication for a particular channel.
Example of an item listed only in Mercado Shops:
curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' -H "Content-Type: application/json" -d
{
[...]
"channels": ["mshops"]
[...]
}
https://api.mercadolibre.com/items
Example of an item listed only in Mercado Libre:
curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' -H "Content-Type: application/json" -d
{
[...]
"channels": ["marketplace"]
[...]
}
https://api.mercadolibre.com/items
For more details, check marketplace listings.
Example of an item listed in two channels:
curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' -H "Content-Type: application/json" -d
{
[...]
"channels": ["marketplace",
"mshops"
]
[...]
}
https://api.mercadolibre.com/items
Edit publishing channel
You can also modify the channel in which the publication is found by putting a PUT to the /items resource.
Editing example from marketplace to mshops listing:
curl -X PUT -H 'Authorization: Bearer $ACCESS_TOKEN' -H
{
[...]
"channels": ["mshops"]
[...]
}
https://api.mercadolibre.com/items
If you want to edit marketplace listings,can request /items resource.
To manage prices and subscribe to Price notifications, visit Product prices.
Delete price
By eliminating the price in Mercado Shops you can maintain a standard price, without differentiating the Mercado Libre and Mercado Shops listings.
Request:
curl -X DELETE -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/items/$ITEM_ID/prices/types/standard/channels/mshops
Get post permalinks
You will now have the /permalinks resource to obtain the links corresponding to the Mercado Shops posts from the stores, allowing you to easily get the information of the item posted on the MShops channel.
Parameters:
You can obtain the permalinks of specific items that correspond to a seller by making a query with the following parameters.
Name | Type | Description | Example |
---|---|---|---|
Item_id | String | Publication ID | MLA594239600 |
Request:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/seller-promotions/users/$SELLER_ID/permalinks?ids=$ITEM_ID_1,$ITEM_ID_2,$ITEM_ID_3,$ITEM_ID_4,$ITEM_ID_5&channel=mshops
Example:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/seller-promotions/users/123/permalinks?ids=MLA1,MLA2,MLA3,MLA4,MLA5&channel=mshops
Response:
{
"results": [
{
"item_id": "MLA1",
"code": 200,
"permalink": "https://internal-shop.mercadoshops.com.ar/MLA_1_PATH"
},
{
"item_id": "MLA2",
"code": 400,
"cause": "Item has not a valid format"
},
{
"item_id": "MLA3",
"code": 403,
"cause": "Item does not belong to seller"
},
{
"item_id": "MLA4",
"code": 404,
"cause": "Error retrieving item"
},
{
"item_id": "MLA5",
"code": 500,
"cause": "Error retrieving item"
}
]
}
Response fields
The response of a GET to the /permalinks resource will provide the following parameters
- results:
- item_id: Unique identifier of the item or publication within Mercado Libre and/or the store under Mercado Shops.
- code: Response code indicating the status of the request made to the API. The response codes are numerical values that follow the HTTP standard.
- permalink: Unique permanent link (URL) of the publication, used to directly access the item's page on the platform.
Permalink Errors
Non-existent or malformed item code
{
"item_id": "ITEM_ID",
"code": 400,
"cause": "Item has not a valid format"
}
Item does not belong to seller
{
"item_id": "ITEM_ID",
"code": 403,
"cause": "Item does not belong to seller"
}
Error retrieving the item's permalink
{
"item_id": "ITEM_ID",
"code": 404,
"cause": "Error retrieving item"
}
Error retrieving the item's permalink
{
"item_id": "ITEM_ID",
"code": 500,
"cause": "Error retrieving item"
}
Error using access token to retrieve permalink information
Request-code: 401
{
"code": "unauthorized",
"message": "invalid access token"
}
Next: Free shipping.