Validación de guía de talles
Definir dominio de moda para publicar
Para avanzar en el flujo de publicación de un artículo de moda con guía de talles asociada, es necesario revisar ejecutar el predictor de categorías mediante el recurso de /domain_discovery y así obtener el dato del domain_id sobre el cual se va a publicar.
Ejemplo de respuesta del predictor de categorías para un dominio de moda:
[
{
"domain_id": "MLA-SNEAKERS",
"domain_name": "Zapatillas",
"category_id": "MLA109027",
"category_name": "Zapatillas",
"attributes": []
}
]
Consultar ficha técnica del dominio
Ya con la categoría y dominio identificado para la publicación, deberás
realizar una consulta al recurso de
/domains/$domain_id/technical_specs y consultar la ficha
técnica del dominio reconociendo los atributos con
value_type: grid_id y grid_row_id que
permitirán identificar si el dominio requiere una guía de talles.
Adicionalmente
tendrás que reconocer aquellos atributos que cuenten con el tag de
grid_template_required los cuales serán requeridos para la
búsqueda de la ficha técnica de la guía de talles.
Llamada:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/domains/$DOMAIN_ID/technical_specs
Ejemplo que consulta la ficha técnica del dominio MLA-SNEAKERS:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/domains/MLA-SNEAKERS/technical_specs
Respuesta con el detalle de la ficha técnica del dominio:
{
"input": {
"groups": [
{
"id": "MAIN",
"label": "Características principales",
"relevance": 1,
"section": "SPECIFICATIONS",
"ui_config": {},
"components": [
{
"component": "COMBO",
"label": "Marca",
"ui_config": {
"hint": "Escribe la marca real del producto o 'Genérica' si no tiene marca.",
"allow_custom_value": true,
"allow_filtering": true
},
"attributes": [
{
"id": "BRAND",
"name": "Marca",
"value_type": "string",
"value_max_length": 255,
"tags": [
"grid_filter",
"catalog_required",
"required"
],
"values": [],
"hierarchy": "PARENT_PK",
"relevance": 1
}
],
"unified_units": []
},
{},
{},
{},
{
"component": "COMBO",
"label": "Género",
"ui_config": {
"allow_custom_value": false,
"allow_filtering": true
},
"attributes": [
{
"id": "GENDER",
"name": "Género",
"value_type": "list",
"tags": [
"grid_template_required",
"grid_filter",
"catalog_required",
"required"
],
"values": [
{
"id": "339665",
"name": "Mujer"
},
{
"id": "339666",
"name": "Hombre"
},
{
"id": "339668",
"name": "Niñas"
},
{
"id": "339667",
"name": "Niños"
},
{
"id": "110461",
"name": "Sin género"
}
],
"hierarchy": "PARENT_PK",
"relevance": 1
}
],
"unified_units": []
},
{},
{},
{},
{},
{
"component": "GRID_ROW_INPUT",
"label": "ID de la fila de la guía de talles",
"ui_config": {
"allow_custom_value": false,
"allow_filtering": false
},
"attributes": [
{
"id": "SIZE_GRID_ROW_ID",
"name": "ID de la fila de la guía de talles",
"value_type": "grid_row_id",
"value_max_length": 255,
"tags": [
"vip_hidden",
"hidden",
"variation_attribute"
],
"hierarchy": "CHILD_PK",
"relevance": 1
}
],
"unified_units": []
},
{}
]
},
{
"id": "DMT",
"label": "Otras características",
"relevance": 1,
"section": "SPECIFICATIONS",
"ui_config": {},
"components": [
{},
{},
{},
{},
{},
{
"component": "GRID_INPUT",
"label": "ID de la guía de talles",
"ui_config": {
"allow_custom_value": false,
"allow_filtering": false
},
"attributes": [
{
"id": "SIZE_GRID_ID",
"name": "ID de la guía de talles",
"value_type": "grid_id",
"value_max_length": 255,
"tags": [
"vip_hidden"
],
"hierarchy": "FAMILY",
"relevance": 1
}
],
"unified_units": []
},
{},
{
"component": "COMBO",
"label": "Deportes recomendados",
"ui_config": {
"allow_custom_value": true,
"allow_filtering": true
},
"attributes": [
{
"id": "RECOMMENDED_SPORTS",
"name": "Deportes recomendados",
"value_type": "string",
"value_max_length": 255,
"tags": [
"multivalued",
"grid_filter"
],
"values": [],
"hierarchy": "FAMILY",
"relevance": 1
}
],
"unified_units": []
},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{}
]
}
]
},
"output": {}
}
Consulta ficha técnica de la guía de talles
La ficha técnica de la guía de talles va a determinar la estructura de los atributos que tiene una guía de talles dentro de la publicación, deberás realizar un POST al recurso de /domains/$domain_id/technical_specs?section=grids y enviar todos los atributos reconocidos anteriormente con el tag de grid_template_required.
Llamada:
curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' -H "Content-Type: application/json" -d{...}https://api.mercadolibre.com/domains/$DOMAIN_ID/technical_specs/?section=grids
Ejemplo que consulta el detalle de la ficha técnica para una guía de talles de la marca Nike y el género mujer:
curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' -H "Content-Type: application/json" -d
'
{
"attributes": [
{
"id": "BRAND",
"name": "Marca",
"value_id": "14671",
"value_name": "Nike",
"value_struct": null,
"values": [
{
"id": "14671",
"name": "Nike",
"struct": null
}
],
"attribute_group_id": "OTHERS",
"attribute_group_name": "Otros"
},
{
"id": "GENDER",
"name": "Género",
"value_id": "339665",
"value_name": "Mujer",
"value_struct": null,
"values": [
{
"id": "339665",
"name": "Mujer",
"struct": null
}
],
"attribute_group_id": "OTHERS",
"attribute_group_name": "Otros"
}
]
}'
https://api.mercadolibre.com/domains/MLA-SNEAKERS/technical_specs/?section=grids
Respuesta con el detalle de la ficha técnica de la guía de talles:
{
"input": {
"groups": [
{
"id": "SIZE_CHART",
"label": "Guía de talles",
"relevance": 1,
"section": "GRIDS",
"ui_config": {},
"components": [
{
"component": "GRID",
"label": "Guia de Talles",
"ui_config": {
"max_allowed": 75,
"allow_custom_value": true,
"allow_filtering": false
},
"components": [
{
"component": "TEXT_OUTPUT",
"label": "Género",
"ui_config": {},
"attributes": [
{
"id": "GENDER",
"name": "Género",
"value_type": "string",
"tags": [
"grid_template_required",
"grid_filter",
"fixed",
"catalog_required",
"required"
],
"values": [
{
"id": "339665",
"name": "Mujer"
}
],
"hierarchy": "PARENT_PK",
"relevance": 1
}
],
"unified_units": []
},
{
"component": "TEXT_OUTPUT",
"label": "Marca",
"ui_config": {},
"attributes": [
{
"id": "BRAND",
"name": "Marca",
"value_type": "string",
"value_max_length": 255,
"tags": [
"grid_filter",
"catalog_required",
"required"
],
"hierarchy": "PARENT_PK",
"relevance": 1
}
],
"unified_units": []
},
{
"component": "TEXT_INPUT",
"label": "Edad",
"ui_config": {},
"attributes": [
{
"id": "AGE_GROUP",
"name": "Edad",
"value_type": "string",
"value_max_length": 255,
"tags": [
"hidden",
"read_only",
"grid_filter"
],
"hierarchy": "PARENT_PK",
"relevance": 1
}
],
"unified_units": []
},
{
"component": "TEXT_INPUT",
"label": "Estilo",
"ui_config": {},
"attributes": [
{
"id": "STYLE",
"name": "Estilo",
"value_type": "string",
"value_max_length": 255,
"tags": [
"grid_filter",
"required"
],
"hierarchy": "FAMILY",
"relevance": 1
}
],
"unified_units": []
},
{
"component": "TEXT_INPUT",
"label": "Deportes recomendados",
"ui_config": {},
"attributes": [
{
"id": "RECOMMENDED_SPORTS",
"name": "Deportes recomendados",
"value_type": "string",
"value_max_length": 255,
"tags": [
"multivalued",
"grid_filter"
],
"hierarchy": "FAMILY",
"relevance": 1
}
],
"unified_units": []
},
{
"component": "NUMBER_UNIT_INPUT",
"label": "Largo del pie",
"ui_config": {
"allow_custom_value": false,
"allow_filtering": false
},
"attributes": [
{
"id": "FOOT_LENGTH",
"name": "Largo del pie",
"value_type": "number_unit",
"value_max_length": 255,
"tags": [
"required"
],
"default_unit_id": "cm",
"units": [
{
"id": "\"",
"name": "\""
},
{
"id": "cm",
"name": "cm"
}
],
"hierarchy": "CHILD_PK",
"relevance": 1
}
],
"default_unified_unit_id": "cm",
"unified_units": [
{
"id": "\"",
"name": "\""
},
{
"id": "cm",
"name": "cm"
}
]
},
{
"component": "TEXT_INPUT",
"label": "Talle de marca",
"ui_config": {
"allow_custom_value": false,
"allow_filtering": false
},
"attributes": [
{
"id": "MANUFACTURER_SIZE",
"name": "Talle de marca",
"value_type": "string",
"value_max_length": 255,
"tags": [
"unique",
"main_attribute_candidate"
],
"hierarchy": "ITEM",
"relevance": 1
}
],
"unified_units": []
},
{
"component": "NUMBER_UNIT_INPUT",
"label": "AR",
"ui_config": {
"allow_custom_value": false,
"allow_filtering": false
},
"attributes": [
{
"id": "AR_SIZE",
"name": "AR",
"value_type": "number_unit",
"value_max_length": 255,
"tags": [
"main_attribute_candidate"
],
"default_unit_id": "AR",
"units": [
{
"id": "AR",
"name": "AR"
}
],
"hierarchy": "CHILD_PK",
"relevance": 1
}
],
"default_unified_unit_id": "AR",
"unified_units": [
{
"id": "AR",
"name": "AR"
}
]
},
{
"component": "NUMBER_UNIT_INPUT",
"label": "US-F",
"ui_config": {
"allow_custom_value": false,
"allow_filtering": false
},
"attributes": [
{
"id": "F_US_SIZE",
"name": "US-F",
"value_type": "number_unit",
"value_max_length": 255,
"tags": [
"main_attribute_candidate"
],
"default_unit_id": "US",
"units": [
{
"id": "US",
"name": "US"
}
],
"hierarchy": "CHILD_PK",
"relevance": 1
}
],
"default_unified_unit_id": "US",
"unified_units": [
{
"id": "US",
"name": "US"
}
]
},
{
"component": "NUMBER_UNIT_INPUT",
"label": "EU",
"ui_config": {
"allow_custom_value": false,
"allow_filtering": false
},
"attributes": [
{
"id": "EU_SIZE",
"name": "EU",
"value_type": "number_unit",
"value_max_length": 255,
"tags": [
"main_attribute_candidate"
],
"default_unit_id": "EU",
"units": [
{
"id": "EU",
"name": "EU"
}
],
"hierarchy": "CHILD_PK",
"relevance": 1
}
],
"default_unified_unit_id": "EU",
"unified_units": [
{
"id": "EU",
"name": "EU"
}
]
},
{
"component": "NUMBER_UNIT_INPUT",
"label": "UK",
"ui_config": {
"allow_custom_value": false,
"allow_filtering": false
},
"attributes": [
{
"id": "UK_SIZE",
"name": "UK",
"value_type": "number_unit",
"value_max_length": 255,
"tags": [
"main_attribute_candidate"
],
"default_unit_id": "UK",
"units": [
{
"id": "UK",
"name": "UK"
}
],
"hierarchy": "CHILD_PK",
"relevance": 1
}
],
"default_unified_unit_id": "UK",
"unified_units": [
{
"id": "UK",
"name": "UK"
}
]
}
]
}
]
}
]
}
}
Al consultar la ficha técnica de la guía de talles en dominios de TOPS and BOTTOMS se encontrará un tipo de dato list el cual determina los posibles valores de una Lista, estos valores se deben tener en cuenta al momento de crear una guía de talles personalizada en dichos dominios:
"attributes": [
{
"id": "FILTRABLE_SIZE",
"name": "Talle estándar",
"value_type": "list",
"value_max_length": 255,
"tags": [
"vip_hidden",
"hidden",
"read_only",
"variation_attribute",
"required"
],
"values": [
{
"id": "4147746",
"name": "26"
},
{
"id": "3259523",
"name": "27"
},
{
"id": "3259504",
"name": "28"
},
{
"id": "3259505",
"name": "29"
},
{
"id": "3259506",
"name": "30"
},
{
"id": "3259507",
"name": "31"
},
{
"id": "3189126",
"name": "32"
},
{
"id": "3189128",
"name": "33"
},
{
"id": "3189130",
"name": "34"
},
{
"id": "4608574",
"name": "35"
},
{
"id": "3259450",
"name": "36"
},
{
"id": "3259451",
"name": "38"
},
{
"id": "3189142",
"name": "40"
},
{
"id": "3259453",
"name": "42"
},
{
"id": "3259454",
"name": "44"
},
{
"id": "3189154",
"name": "46"
},
{
"id": "3189158",
"name": "48"
},
{
"id": "3189161",
"name": "50"
},
{
"id": "4146158",
"name": "52"
},
{
"id": "3259459",
"name": "54"
},
{
"id": "3259460",
"name": "56"
},
{
"id": "4294027",
"name": "58"
},
{
"id": "4294028",
"name": "60"
},
{
"id": "3259463",
"name": "62"
},
{
"id": "3259464",
"name": "64"
},
{
"id": "3259465",
"name": "66"
},
{
"id": "3259466",
"name": "68"
},
{
"id": "2920269",
"name": "70"
},
{
"id": "5576727",
"name": "72"
},
{
"id": "5576729",
"name": "74"
},
{
"id": "5576730",
"name": "76"
}
],
"hierarchy": "ITEM",
"relevance": 2
}
]
Dominios de Marca y Estándar
Este recurso tiene como objetivo informar los dominios que tienen guías de talles creadas ya sea por marca (BRAND) o estándar (STANDARD) para un site específico. Debes enviar en el body del POST el filtro de type=BRAND o type=STANDARD y el site correspondiente.
Llamada:
curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' -H "Content-Type: application/json" -d{...}https://api.mercadolibre.com/catalog/charts/domains/search
Ejemplo de dominios configurados con guías por marca:
curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' -H "Content-Type: application/json" -d
'
{
"site_id": "MLA",
"type": "BRAND"
}'
https://api.mercadolibre.com/catalog/charts/domains/search
Ejemplo de dominios configurados con guías estándar:
curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' -H "Content-Type: application/json" -d
'
{
"site_id": "MLA"
"type": "STANDARD"
}'
https://api.mercadolibre.com/catalog/charts/domains/search
Respuesta:
{
"domains": [
{
"domain_id": "SNEAKERS"
},
{
"domain_id": "BOOTS_AND_BOOTIES"
},
{
"domain_id": "SANDALS_AND_CLOGS"
},
{
"domain_id": "LOAFERS_AND_OXFORDS"
},
{
"domain_id": "FOOTBALL_SHOES"
},
{
"domain_id": "SNEAKERS_TEST"
}
]
}
Dominios disponibles para guía de talles
Podrás consultar los dominios encendidos con la experiencia de guía de talles especificando el SITE_ID.
Llamada:
curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' 'https://api.mercadolibre.com/catalog/charts/$SITE_ID/configurations/active_domains'
Ejemplo de la respuesta obtenida para MLA, donde el array domains especifica todos los id de dominios activados para el site específico, en el ejemplo, Argentina:
{
"domains": [
{
"domain_id": "MLA-SNEAKERS"
},
{
"domain_id": "MLA-BOOTS_AND_BOOTIES"
},
{
"domain_id": "MLA-LOAFERS_AND_OXFORDS"
},
{
"domain_id": "MLA-FOOTBALL_SHOES"
},
{
"domain_id": "MLA-SANDALS_AND_CLOGS"
}
]
}
Ejemplo de respuesta cuando el site no tiene ningún dominio activado para el uso de guía de talles:
{
"error": "config_not_found",
"message": "Config not found",
"status": 404
}
Validaciones y mensajes de error
La obligatoriedad de la guía de talles tiene como objetivo validar que la información de la publicación es consistente a la guía de talles mediante mensajes de error, los cuales detallamos a continuación.
1. El atributo SIZE_GRID_ID no existe en la publicación:
{
"code": "missing.fashion_grid.grid_id.values",
"message": "Attribute [SIZE_GRID_ID] is missing",
"type": "ERROR",
"cause_id": 2610,
"references": [
"item.attributes"
],
"department": "structured-data",
"validation": "fashion-validator",
"custom_data": {}
}
2. Para la publicación existe el atributo SIZE_GRID_ID pero no existe el atributo que especifica el row SIZE_GRID_ROW_ID:
{
"code": "missing.fashion_grid.grid_row_id.values",
"message": "Attribute [SIZE_GRID_ROW_ID] is missing",
"type": "ERROR",
"cause_id": 2611,
"references": [
"item.attributes"
],
"department": "structured-data",
"validation": "fashion-validator",
"custom_data": {}
}
3. Para la publicación y/o sus variaciones no se está especificando el atributo SIZE:
{
"code": "missing.fashion_grid.size.values",
"message": "Attribute [SIZE] is missing",
"type": "ERROR",
"cause_id": 2612,
"references": [
"item.attributes"
],
"department": "structured-data",
"validation": "fashion-validator",
"custom_data": {}
}
4. La publicación cuenta con la especificación del atributo SIZE_GRID_ID pero el código de guía enviado es inválido, por ejemplo, cuando a la publicación se le asocia una guía de talle de otra categoría:
{
"code": "invalid.fashion_grid.grid_id.values",
"message": "Attribute [SIZE_GRID_ID] is not valid",
"type": "ERROR",
"cause_id": 2613,
"references": [
"item.name"
],
"department": "structured-data",
"validation": "fashion-validator",
"custom_data": {}
}
5. La publicación cuenta con la especificación del atributo SIZE_GRID_ID y SIZE_GRID_ROW_ID pero el id enviado en el row es inválido, es decir, no existe dentro de la guía especificada en el grid_id:
{
"code": "invalid.fashion_grid.grid_row_id.values",
"message": "Attribute [SIZE_GRID_ROW_ID] is not valid",
"type": "ERROR",
"cause_id": 2614,
"references": [
"item.name"
],
"department": "structured-data",
"validation": "fashion-validator",
"custom_data": {}
}
6. Al atributo size de la publicación o de la variación debe corresponder consistentemente al de la row de la guía que se está seleccionando, es decir, deben ser idénticos, si el SIZE de la publicación o variación no es válido en esta comparación:
{
"code": "invalid.fashion_grid.size.values",
"message": "Attribute [SIZE] is not valid",
"type": "WARNING",
"cause_id": 2615,
"references": [
"item.name"
],
"department": "structured-data",
"validation": "fashion-validator",
"custom_data": {}
}
7. Los atributos que están detallados en la guía deben corresponder consistentemente con la información de la publicación, por ejemplo el atributo GENDER de la guía debe ser el mismo que el de la publicación:
{
"code": "invalid.fashion_grid.size.values",
"message": "Attribute [GENDER] is not valid",
"type": "WARNING",
"cause_id": 2616,
"references": [
"item.name"
],
"department": "structured-data",
"validation": "fashion-validator",
"custom_data": {}
}
Moderaciones
Las nuevas publicaciones que se crearon satisfactoriamente dentro de Mercado Libre, pero que incumplen con uno o varios de los motivos de validación antes descritos, serán moderadas y pausadas. Podrás consultar la razón y el remedy de las mismas desde nuestra API de moderaciones.
Ejemplo de respuesta de un ítem moderado por inconsistencias en guía de talles:
{
"infractions": [
{
"id": "1119693123",
"date_created": "2023-01-31T15:54:09.537-0400",
"user_id": "1241259814",
"related_item_id": "MLM1791370022",
"element_id": "MLM1791370022",
"element_type": "ITM",
"site_id": "MLM",
"filter_subgroup": "TP",
"reason": "La pausamos porque el género de la guía de tallas no coincide con el de la publicación. Asocia otra guía para reactivarla.",
"remedy": "Asocia otra guía de tallas para reactivar la publicación
- El género de la guía de tallas no coincide con el de la publicación.
"
}
],
"paging": {
"offset": 0,
"limit": 20,
"total": 1
},
"sorting_type": "date_created_desc"
}
Conoce más sobre Recomendaciones.