Documentation Mercado Libre

Check out all the necessary information about APIs Mercado Libre.
circulos azuis em degrade

Documentation

Last update 04/03/2024

Size Chart Validations

In order to improve the experience in fashion publications, we have a size guide where sellers can detail the measurements of their products to buyers. This functionality allows to reduce the number of questions, returns due to problems with sizes and increase sales.
Review the documentation to see how to upload a size chart.

Recommendations for fashion publications

Validations to create size charts

In order to maintain size charts with quality information, we have created validations that, through error messages, will inform us of the actions to be taken by the seller before creating a size chart, which are detailed below:


1. The value {VALUE_NAME} specified for the gender attribute is not a valid value in the product specification sheet of the domain.

{
    "error": "chart_tech_specs_not_found",
    "message": "Chart technical specification not found for SITE:{SITE_ID}-DOMAIN:{DOMAIN_ID}-GENDER:{VALUE_NAME}",
    "status": 404
    }

2. A main attribute or main_attribute has not been specified.

{
    "error": "main_attribute_missing_error",
    "message": "Main attribute for site {SITE_ID} is missing.",
    "status": 400
    }

3. The attribute {ATTRIBUTE_ID} chosen as main_attribute is not a valid attribute, you should consult the product specification sheet of the size chart, which will provide information on possible candidate attributes.

{
    "code": "invalid_main_attribute_id",
    "message": "Chart main attribute with ID {ATTRIBUTE_ID} is invalid."
}

4. There are required attributes {ATTRIBUTE_ID} within the product specification sheet of the size chart, which were not specified. The message adds detailed information of the row {ROW_MAIN_ATTRIBUTE_VALUE_NAME} where there is missing information.

{
"code": "required_row_attribute_not_found",
"message": "Required attribute {ATTRIBUTE_ID} was not found in row {MAIN_ATTRIBUTE_ID} {ROW_MAIN_ATTRIBUTE_VALUE_NAME}.",
"cell": {
"attribute_id": "{ATTRIBUTE_ID}",
"row": {
"id": null,
"main_attribute": {
"id": "{MAIN_ATTRIBUTE_ID}",
"value": "{ROW_MAIN_ATTRIBUTE_VALUE_NAME}"
}
}
}
}

5. The value {VALUE_NAME} entered in the attribute {ATTRIBUTE_ID} is not valid, you should refer to the product specification sheet of the size chart for the list of values you can use. The message adds detailed information for the {ROW_MAIN_ATTRIBUTE_VALUE_NAME} row with the error.

"code": "invalid_row_attribute_value",
"message": "Attribute {ATTRIBUTE_ID} in row {MAIN_ATTRIBUTE_ID} {VALUE_NAME} has an invalid value.",
"cell": {
"attribute_id": "{ATTRIBUTE_ID}",
"row": {
"id": null,
"main_attribute": {
"id": "{MAIN_ATTRIBUTE_ID}",
"value": "{ROW_MAIN_ATTRIBUTE_VALUE_NAME}"
}
}
}
}

6. The value {VALUE_NAME} of the attribute {ATTRIBUTE_ID} is outside the allowed range, range information is added. The message adds detailed information for the row {ROW_MAIN_ATTRIBUTE_VALUE_NAME} with the error.

{
"code": "value_out_of_range",
"message": "The value {VALUE_NAME} of the {ATTRIBUTE_ID} attribute of the row main attribute {MAIN_ATTRIBUTE_ID} {ROW_MAIN_ATTRIBUTE_VALUE_NAME} is out of range. The value must be within the range: {MINIMUM_RANGE} - {MAXIMUM_RANGE}",
"cell": {
"attribute_id": "{ATTRIBUTE_ID}",
"row": {
"id": null,
"main_attribute": {
"id": "{MAIN_ATTRIBUTE_ID}",
"value": "{ROW_MAIN_ATTRIBUTE_VALUE_NAME}"
}
}
}
}

7. The value {VALUE_NAME} of the main attribute is incorrect as it is making use of words like gender, colors, etc. It should only contain words that relate to size. The message adds detailed information for the row {ROW_MAIN_ATTRIBUTE_VALUE_NAME} with the error.

{
"code": "invalid_attribute_value",
"message": "The value {VALUE_NAME} of the attribute {ATTRIBUTE_ID}   is incorrect. The value must contain only words related to SIZE",
"cell": {
"attribute_id": "{ATTRIBUTE_ID}",
"row": {
"id": null,
"main_attribute": {
"id": "{MAIN_ATTRIBUTE_ID}",
"value": "{ROW_MAIN_ATTRIBUTE_VALUE_NAME}"
}
}
}
}

8. You are trying to associate a custom or specific size guide that does not belong to the actual seller.

{
"department": "structured-data",
"cause_id": 2617,
"type": "error",
"code": "invalid.fashion_grid.seller_id.values",
"references": [
"item.seller_id"
],
"message": "The size chart {CHART_ID} doesn't belong to the seller id [{SELLER_ID}]"
}

9. The values of the FILTRABLE_SIZE field for the same size guide are either numeric or alphanumeric, no combination of data types is allowed in the attribute.

{
            "code": "value_is_not_the_same_type",
            "message": "All FILTRABLE_SIZE values must be the same type, only numbers or alphanumeric",
            "cell": {
                "attribute_id": "FILTRABLE_SIZE",
                "row": {
                    "id": null,
                    "main_attribute": {
                        "id": "{MAIN_ATTRIBUTE_ID}",
                        "value": "{ROW_MAIN_ATTRIBUTE_VALUE_NAME}"
                    }
                }
            }
        }

10. The {ATTRIBUTE_ID} attribute should not be in the size chart, this error is due to the fact that you are trying to enter an attribute of type BODY_MEASURE or CLOTHING_MEASURE, and the size chart has a different size type configured than the attribute. Size charts can only have one size type.

{
           "code": "invalid_row_attribute",
           "message": "Attribute {ATTRIBUTE_ID} found in row {MAIN_ATTRIBUTE_ID} {ROW_MAIN_ATTRIBUTE_VALUE_NAME} is not valid and should not be present in the chart rows.",
           "cell": {
               "attribute_id": "{ATTRIBUTE_ID}",
               "row": {
                   "id": null,
                   "main_attribute": {
                       "id": "{MAIN_ATTRIBUTE_ID}",
                       "value": "{ROW_MAIN_ATTRIBUTE_VALUE_NAME}"
                   }
               }
           }
        }

Validations for associating a chart to a listing

For some domains in the Fashion, it is mandatory to associate a size chart to the listings, that's why we validate that the information in the listing is consistent by using error messages seeking for corrective action by the seller, which we detail below.


Notes:
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 charts 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:g:

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

8. You are trying to associate a custom or specific size guide that does not belong to the actual seller.

{
    "department": "structured-data",
    "cause_id": 2617,
    "type": "error",
    "code": "invalid.fashion_grid.seller_id.values",
    "references": [
    "item.seller_id"
    ],
    "message": "The size chart {CHART_ID} doesn't belong to the seller id [{SELLER_ID}]"
    }

9. The values of the FILTRABLE_SIZE field for the same size guide are either numeric or alphanumeric, no combination of data types is allowed in the attribute.

{
 "code": "value_is_not_the_same_type",
 "message": "All FILTRABLE_SIZE values must be the same type, only numbers or alphanumeric",
 "cell": {
 "attribute_id": "FILTRABLE_SIZE",
 "row": {
 "id": null,
 "main_attribute": {
 "id": "{MAIN_ATTRIBUTE_ID}",
 "value": "{ROW_MAIN_ATTRIBUTE_VALUE_NAME}"
 }
 }
 }
 }

10. The {ATTRIBUTE_ID} attribute should not be in the size chart, this error is due to the fact that you are trying to enter an attribute of type BODY_MEASURE or CLOTHING_MEASURE, and the size chart has a different size type configured than the attribute. Size charts can only have one size type.4

{
   "code": "invalid_row_attribute",
   "message": "Attribute {ATTRIBUTE_ID} found in row {MAIN_ATTRIBUTE_ID} {ROW_MAIN_ATTRIBUTE_VALUE_NAME} is not valid and should not be present in the chart rows.",
   "cell": {
       "attribute_id": "{ATTRIBUTE_ID}",
       "row": {
           "id": null,
           "main_attribute": {
               "id": "{MAIN_ATTRIBUTE_ID}",
               "value": "{ROW_MAIN_ATTRIBUTE_VALUE_NAME}"
           }
       }

Next: Fashion photo quality.