Documentación Mercado Libre
Descubre toda la información que debes conocer sobre las APIs de Mercado Libre.
Documentación
Tiendas Oficiales
ID de marcas
Este recurso recupera marcas asociadas a un user_id. Puede haber más de una por usuario. La tienda se identifica con el atributo official_store_id.
Ejemplo:
curl -X GET https://api.mercadolibre.com/users/$USER_ID/brands
Respuesta:
{
"cust_id": 12345678,
"tags": [
"large_seller",
"user_info_verified",
"brand"
],
"brands": [
{
"tags": [
"girls",
"female"
],
"official_store_id": 16,
"categories_ids": [
"MLA1430"
],
"fantasy_name": "47 Street",
"site_id": "MLA",
"status": "active",
"name": "47 Street",
"pictures": [
{
"id": 104,
"name": "big_logo",
"secure_url": null,
"url": "http://static.mlstatic.com/org-img/apparel/images/47street/149254178-logo-g2.jpg",
"size": "174x164"
},
{},
{},
{},
{},
{}
],
"relevance_position": 50
},
{},
{},
{},
{}
],
"site_id": "MLA",
"user_type": "brand"
}
Accede a toda la información sobre una marca específica
Para obtener información sobre una marca específica, puedes realizar la llamada al brand_id que deseas conocer, tal como ves.
Ejemplo:
curl -X GET https://api.mercadolibre.com/users/58715193/brands/133
Respuesta:
{
"tags": [
"home",
"standout"
],
"official_store_id": 133,
"categories_ids": [
"MLA1403"
],
"fantasy_name": "Bodega Lanzarini",
"users": [
{
"cust_id": 58715193,
"tags": [
"eshop",
"large_seller",
"user_info_verified",
"brand"
],
"site_id": "MLA",
"user_type": "brand"
}
],
"site_id": "MLA",
"status": "active",
"name": "Bodega Lanzarini",
"date_created": "2014-08-04T04:00:00.000Z",
"pictures": [
{
"id": 632,
"name": "big_logo",
"secure_url": null,
"url": "http://static.mlstatic.com/org-img/apparel/images/bodegalanzarini/58715193-logo-g.jpg",
"size": "174x164"
},
{
"id": 2474,
"name": "facebook_logo",
"secure_url": null,
"url": "http://static.mlstatic.com/org-img/apparel/images/mla-fb/58715193-logo-fb.jpg",
"size": "1600x750"
},
{
"id": 9428,
"name": "home_app",
"secure_url": null,
"url": "http://static.mlstatic.com/org-img/apparel/bkg_apps/58715193-bkg.jpg",
"size": "270x155"
},
{
"id": 634,
"name": "logo",
"secure_url": null,
"url": "http://static.mlstatic.com/org-img/apparel/images/bodegalanzarini/58715193-logo-home.jpg",
"size": "160x80"
},
{
"id": 633,
"name": "logo_landing",
"secure_url": null,
"url": "http://static.mlstatic.com/org-img/apparel/images/bodegalanzarini/58715193-logo-home.jpg",
"size": "160x80"
},
{
"id": 631,
"name": "background",
"secure_url": null,
"url": "http://static.mlstatic.com/org-img/apparel/images/bodegalanzarini/58715193-bkg.jpg",
"size": "1600x750"
},
{
"id": 635,
"name": "small_logo",
"secure_url": null,
"url": "http://static.mlstatic.com/org-img/apparel/images/bodegalanzarini/58715193-logo-ch2.jpg",
"size": "96x70"
}
],
"boost": {
"is_active": false,
"last_update": "2015-08-17T20:55:12.000Z"
},
"relevance_position": 69
}
Errores comunes en la respuesta de la API al publicar en Tiendas Oficiales multimarca
Si no envías el official_store_id del artículo para una Tienda Oficial multimarca, como respuesta recibirás los posibles ID que podrías enviar con tu usuario:
"message": "Validation error",
"error": "validation_error",
"status": 400,
"cause": [{
"code": "item.official_store_id.invalid",
"message": "Users type brand have to provide one of this [60, 274, 257] official store id"
Si envías un official_store_id inválido para una Tienda Oficial multimarca recibirás:
{
"message": "body.invalid_official_store_id",
"error": "The seller 148829068 is not allowed to use official_store_id 315 on site MLA.",
"status": 403,
"cause": []
}
¡Excelente! Ya conoces los brand_id asociados a tu usuario, los cuales deberás enviar cada vez que desees publicar un item.
Siguiente: Categoriza productos.