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.
Llamada:
curl -X GET https://api.mercadolibre.com/users/$USER_ID/brands
Ejemplo:
curl -X GET https://api.mercadolibre.com/users/1477536226/brands
Respuesta:
{
"status": "LINKED",
"cust_id": 1477536226,
"site_id": "MLA",
"user_type": "brand",
"brands": [
{
"site_id": "MLA",
"official_store_id": 1450,
"name": "Nike",
"type": "brand",
"relevance_position": 10000,
"status": "active",
"fantasy_name": "Nike",
"date_created": "2018-04-26T13:30:28Z",
"return_policy": null,
"landing_permalink": "https://www.mercadolibre.com.ar/tienda/nike",
"pictures": [
{},
"size": "160x80"
{},
"size": "160x80"
{},
"size": "1600x250"
{},
"size": "96x70"
{},
"size": "174x164"
{},
"size": "200x200"
{},
"size": "1024x747"
},
{},
"tags": [
"TOP_BRAND"
],
"categories_ids": [
"MLA1276"
],
"main_categories": [
{
"id": "MLA1276"
}
],
"permalink": "https://tienda.mercadolibre.com.ar/nike",
"normalized_name": "nike",
"last_updated": "2023-12-12T19:28:34Z"
}
],
"tags": [
"large_seller",
"messages_as_seller",
"brand"
]
}
Campos de respuesta
- status: tendrá el estado del usuario con respecto a la tienda
- normalized_name: tendrá el nombre de la tienda normalizado (sin tildes, dobles espacios, diéresis, etc.)
- last_updated: fecha en la que se actualizó la tienda por la última vez.
Error que puede pasar en el recurso anterior:
curl -X GET https://api.mercadolibre.com/users/14775362261111111/brands
{
"error": "U00002",
"message": "U00002 - The user '14775362261111111' was not found",
"status": 404
}
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.
Llamada:
curl -X GET https://api.mercadolibre.com/users/1477536226/brands/1450
Ejemplo:
curl -X GET https://api.mercadolibre.com/users/$USER_ID/brands/$BRAND
Respuesta:
{
"site_id": "MLA",
"official_store_id": 1450,
"name": "Nike",
"type": "brand",
"relevance_position": 10000,
"status": "active",
"fantasy_name": "Nike",
"date_created": "2018-04-26T13:30:28Z",
"return_policy": null,
"landing_permalink": "https://www.mercadolibre.com.ar/tienda/nike",
"users": [
{
"status": "LINKED",
"cust_id": 1477536226,
"site_id": "MLA",
"user_type": "brand",
"tags": [
"large_seller",
"messages_as_seller",
"brand"
]
}
],
"pictures": [
{
"id": 46926,
"name": "logo",
"secure_url": "https://http2.mlstatic.com/storage/official-stores-images/nike/logo201804260918.jpg",
"url": "https://http2.mlstatic.com/storage/official-stores-images/nike/logo201804260918.jpg",
"size": "160x80"
},
{
"id": 46927,
"name": "logo_landing",
"secure_url": "https://http2.mlstatic.com/storage/official-stores-images/nike/logo_landing201804260918.jpg",
"url": "https://http2.mlstatic.com/storage/official-stores-images/nike/logo_landing201804260918.jpg",
"size": "160x80"
},
{
"id": 46928,
"name": "background",
"secure_url": "https://http2.mlstatic.com/storage/official-stores-images/nike/background20231910174134.jpg",
"url": "https://http2.mlstatic.com/storage/official-stores-images/nike/background20231910174134.jpg",
"size": "1600x250"
},
{
"id": 46929,
"name": "small_logo",
"secure_url": "https://http2.mlstatic.com/storage/official-stores-images/nike/small_logo201804260922.jpg",
"url": "https://http2.mlstatic.com/storage/official-stores-images/nike/small_logo201804260922.jpg",
"size": "96x70"
},
{
"id": 46930,
"name": "big_logo",
"secure_url": "https://http2.mlstatic.com/storage/official-stores-images/nike/big_logo201804260920.jpg",
"url": "https://http2.mlstatic.com/storage/official-stores-images/nike/big_logo201804260920.jpg",
"size": "174x164"
},
{
"id": 46931,
"name": "facebook_logo",
"secure_url": "https://http2.mlstatic.com/storage/official-stores-images/nike/facebook_logo201804260919.jpg",
"url": "https://http2.mlstatic.com/storage/official-stores-images/nike/facebook_logo201804260919.jpg",
"size": "200x200"
},
{
"id": 46932,
"name": "high_resolution_logo",
"secure_url": "https://http2.mlstatic.com/storage/official-stores-images/nike/high_resolution_logo201804260920.jpg",
"url": "https://http2.mlstatic.com/storage/official-stores-images/nike/high_resolution_logo201804260920.jpg",
"size": "1024x747"
},
{
"id": 46933,
"name": "dynamic_logo",
"secure_url": "https://http2.mlstatic.com/D_Q_NP_741174-MLA27255272398_042018-F.jpg",
"url": "http://mla-s2-p.mlstatic.com/741174-MLA27255272398_042018-F.jpg",
"size": "1024x747"
}
],
"tags": [
"TOP_BRAND"
],
"categories_ids": [
"MLA1276"
],
"main_categories": [
{
"id": "MLA1276"
}
],
"permalink": "https://tienda.mercadolibre.com.ar/nike",
"normalized_name": "nike",
"last_updated": "2023-12-12T19:28:34Z"
}
Errores que pueden presentarse en el recurso anterior:
Llamada:
curl -X GET https://api.mercadolibre.com/users/1477536226/brands/aaaaa
Respuesta:
{
"error": "invalid_parameter",
"message": "The officialStoreId must contain only digits.",
"status": 400
}
Llamada:
curl -X GET https://api.mercadolibre.com/users/1477536226/brands/14501111111
Respuesta:
{
"error": "B00001",
"message": "B00001 - The brand '14501111111' was not found for site 'MLA'",
"status": 404
}
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.