• API Docs
  • Guide for products
  • Size guide validations
Last update 04/08/2022

Size guide validations

Importante:
This resource is available for Brazil, Argentina, and Mexico.

Our goal is to improve the experience on the site. For this reason, we have made available the size guide, where sellers of fashion vertical can give more details of the measurements of their products to buyers. This way, the seller can decrease the number of questions, returns due to size problems, and increase sales.
Review the documentation to see how to upload a size guide.


Define fashion domain to publish

To proceed with the flow of publishing with an associated size guide, you need to review the category suggests using the /domain_discovery feature.

Request:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/sites/$SITE_ID/domain_discovery/search?q=$Q

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/sites/MLA/domain_discovery/search?limit=1&q=Zapatillas

Response:

[
  {
    "domain_id": "MLA-SNEAKERS",
    "domain_name": "Zapatillas",
    "category_id": "MLA109027",
    "category_name": "Zapatillas",
    "attributes": []
  }
]

Consult attributes for the table in the domain data sheet

Once the category of the publication has been identified, a search will have to be made on the resource /domains/$domain_id/technical_specs, the domain's data sheet will have to be consulted, the attributes with "value_type": "grid_id" and "grid_row_id" will have to be recognized, which allow identifying if the domain requires a size guide.

You will also have to recognize those attributes that contain the tag "grid_template_required", which will be required for the search of the measure table's data sheet.

Nota:
From now on, size guides will have a technical file, which is defined according to the domain of the item. Based on this data sheet, it is defined what information must be taken into account when creating the size guide.

Once you have identified the attributes, you must continue to complete the attributes for the creation of the size guide.

Request:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/domains/$DOMAIN_ID/technical_specs

Example:

curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/domains/MLA-SNEAKERS/technical_specs

Response:

{
   "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": {}
}

Consulting a size guides data sheet

The size guide data sheet will determine the structure of the attributes with a measure table in the publication, it should perform a POST to the resource of /domains/$domain_id/technical_specs?section=grids and send all the attributes previously recognized with the "grid_template_required" tag.


Request:

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

Example:

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

Response:

Nota:
Consider this answer which is the data sheet for creating a size guide in the product.

{
    "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"
                        }]
                    }
                ]
            }]
        }]
    }
}

Search for domains with created size guides

With the resource of /catalog/charts/$site_id/domains/search it will be possible to recognize the domains that currently have size guides so that the merchant can use them either by Brand (which are the measurement tables offered by the brands (BRAND), standard (STANDARD) or personalized (SPECIFIC) configured by site, sending the filter “type=BRAND” , “type=STANDARD” or “type=SPECIFIC” and the corresponding site in the body of the POST.

Nota:
The standard size guide in the Mercado Libre and those provided by the brands already have all the required information already complete (technical data and values).

Request:

curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' -H "Content-Type: application/json" -d {...} https://api.mercadolibre.com/catalog/charts/domains/search

Example of domains configured with size guides provided by the brand:

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

Example of domains configured with standard Mercado Libre size guides:

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

Example domains set up with customized size guides:

curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' -H "Content-Type: application/json" -d
'{
         "site_id": "MLA",      
        "type": "SPECIFIC"
}'
https://api.mercadolibre.com/catalog/charts/domains/search

Response:

{
   "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"
       }
   ]
}


Domains available for the size guides

Below, we detail which domains are activated to use the size guide.

Domain Available at
SNEAKERS Argentina, México and Brasil.
BOOTS_AND_BOOTIES Argentina, México and Brasil.
LOAFERS_AND_OXFORDS Argentina, México and Brasil.
FOOTBALL_SHOES Argentina, México and Brasil.
SANDALS_AND_CLOGS Argentina, México and Brasil.



Validations and errors messages

The requirement of the size guide is meant to validate that the information in the publication is consistent by using error messages, which we detail below.

Nota:
In the validations of the requirement of a size guide for Live Listing, are not considered adjustments such as:
  • Stock and price changes in the publication
  • Paused or closed status changes in the publication
  • This means that, the error will not appear at the moment you make a PUT to the /items/ resource

    1. The "SIZE_GRID_ID" attribute does not exist in the publication:

    {
        "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. For the publication where there is the "SIZE_GRID_ID" attribute, but there is no attribute that specifies the 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. For the publication and/or its variations the attribute "SIZE" is not specified:

    {
        "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. The publication with the "SIZE_GRID_ID" attribute specification, but the table code sent is invalid, for example when the publication associates with a size guide of another category:

    {
        "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. The publication has the attribute specification "SIZE_GRID_ID" and "SIZE_GRID_ROW_ID" but the id sent in row is invalid, it does not exist in the table specified in 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. The size attribute of the publication or variation must consistently match that of the row in the table you are selecting; they must be identical if the "SIZE" of the publication or variation is invalid in this comparison:

    {
        "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. The attributes detailed in the table must correspond consistently with the information in the publication, for example, the "GENDER" attribute in the table must be the same as the one in the publication:

    {
        "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": {}
    } 


    Know more about Recommendations

    .
    banner footer

    Subscribe to our Newletter

    or register to recieve the latest news about our API