Documentación Mercado Libre

Descubre toda la información que debes conocer sobre las APIs de Mercado Libre.
circulos azuis em degrade

Documentación

Última actualización 24/04/2024

Domains, products and attributes vehicle accessories references


Available domains

Country Domain
ARGENTINA MLA-CARS_AND_VANS
BRASIL MLB-CARS_AND_VANS
MÉXICO MLM-CARS_AND_VANS_FOR_COMPATIBILITIES
URUGUAY MLU-CARS_AND_VANS
CHILE MLC-CARS_AND_VANS_FOR_COMPATIBILITIES
COLOMBIA MCO-CARS_AND_VANS_FOR_COMPATIBILITIES

According to the domain of the site, we suggest that within your compatibility manager you enable primary, secondary and optional filters as shown in the following images.


Example of attributes used in the vehicle compatibility search engine for the CARS_AND_VANS domain that applies to the MLA, MLB and MLU sites.



Example of attributes used in the vehicle compatibility search engine for the CARS_AND_VANS_FOR_COMPATIBILITIES domain that applies to the MLM, MLC and MCO sites.



Main attributes

Attributes description Attributes of CARS_AND_VANS (MLA, MLB and MLU) Attributes of CARS_AND_VANS_FOR_COMPATIBILITIES (MLM, MLC and MCO)
BRAND BRAND BRAND
MODEL MODEL CAR_AND_VAN_MODEL
YEAR VEHICLE_YEAR YEAR
TRIM SHORT_VERSION CAR_AND_VAN_SUBMODEL
MOTOR ENGINE CAR_AND_VAN_ENGINE

Secondary attributes

Descripción de atributos Atributos de CARS_AND_VANS (MLA, MLB y MLU) Atributos de CARS_AND_VANS_FOR_COMPATIBILITIES (MLM, MLC y MCO)
COMBUSTIBLE FUEL_TYPE N/A
POTENCIA POWER N/A
CARROCERÍA VEHICLE_BODY_TYPE N/A
TRANSMISIÓN TRANSMISSION_CONTROL_TYPE N/A

Optional attributes

Description of attributes Attributes of CARS_AND_VANS (MLA, MLB and MLU) Attributes of CARS_AND_VANS_FOR_COMPATIBILITIES (MLM, MLC and MCO)
MARCHAS GEAR_NUMBER CAR_AND_VAN_ENGINE
PUERTAS DOORS N/A
DIRECCIÓN STEERING N/A
TRACCIÓN TRACTION_CONTROL N/A
VÁLVULAS VALVES_PER_CYLINDER N/A
SISTEMA DE DIRECCIÓN N/A STEERING_SYSTEM
TIPO DE DIRECCIÓN N/A STEERING_TYPE
TIPO DE TRACCIÓN N/A DRIVE_TYPE
CARROCERÍA N/A CAR_AND_VAN_BODY_TYPE
TIPO DE CONTROL DE LA TRANSMISIÓN N/A TRANSMISSION_CONTROL_TYPE
CANTIDAD DE VELOCIDADES DE LA TRANSMISIÓN N/A TRANSMISSION_SPEEDS_NUMBER
CANTIDAD DE PUERTAS N/A BODY_DOORS_NUMBER
FRENOS ABS N/A BRAKE_ABS

Attributes by domain

Remember that the detail of the attributes of each Domain can be achieved with the following request:

curl -X GET --header 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/catalog_domains/$domain_id

Example:

curl -X GET --header 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/catalog_domains/MLA-CARS_AND_VANS

Attributes by category

The detail of the attributes of each category can be achieved with the following request:

curl -X GET --header 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/categories/:CATEGORY_ID/attributes

Example:

curl -X GET --header 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/categories/MLA12345/attributes
Note:
As of April 2024 we are making available the POST resource to /catalog_compatibilities/products_search/chunks with which you will be able to match the vehicle search experience to that of our Mercado Libre ABM.

With the POST resource to /catalog_compatibilities/products_search/chunks and by means of the domain attributes it is possible to perform searches that allow you can:

  1. Obtain the vehicles available in our catalog.
  2. Identify new vehicles that have been added to our catalog.
  3. Identify compatibility suggestions.

Parameters

Limit: optional parameter, which indicates the number of products to return. The default value is = 50 and in case of being informed, this value cannot be greater than 1000.

Offset: optional parameter that indicates the record from which results will be returned. The default value is = 0.



Response fields

Domain_id: mandatory to submit to identify compatibilities.

Site_id: mandatory to put the site you are looking for.

Filter: optional attribute to indicate which products you want to get.

  • Entering the value "NEW" will return the new vehicles recently added to the catalog.
  • Entering "SUGGESTED" will return the list of suggested vehicles for the indicated item or product.
  • In case no value is sent (empty or null), all vehicles (including new and suggested) will be returned taking into account the search attributes.

Item_id: mandatory attribute in case you want to get the item suggestions. In case you do not send the item_id, all the information of the secondary_product_id sent is listed.

Secondary_product_id: ID of the product associated to the item, it is optional, but improves performance and response times when used (in case it is not sent, it will be taken from the item).

Known_attributes: always add them with their "value_ids" and you can put in list format all the options you want.

Sort: is an optional field that allows you to sort results by the attribute_id indicated. For now it is only possible to sort by BRAND in ascending or descending order.


Table of mandatory attributes according to the need of the search performed.

Attribute Obtain vehicles available in our catalog Identify new vehicles Identify suggestions
domain_id Required Required Required
site_id Required Required Required
item_id Optional Optional Required
secondary_product_id Optional Optional Optional, but in case of having this value it is suggested to inform it, since it helps to improve the performance of the request.
known_attributes Optional Optional Optional.
Filter It does not require to be informed. “NEW” “SUGGESTED”
Sort Optional Optional Optional

Response fields

id: product (vehicle) identifier.

attributes: vehicle attribute array.

  • id: vehicle attribute name.
  • value_id: value identifier associated to the vehicle attribute.
  • value_name: value associated to the vehicle's attribute.

filters: this attribute is a list that indicates to which filter the product belongs:

  • In case no filter is sent in the body, it indicates whether the product is new or suggested or both, example: ("filters": ["NEW", "SUGGESTED"] ); in case the product does not belong to any of these options, an empty list will be returned ("filters": [] ).
  • In case of sending a filter in the body, the filter selected in the request is returned in that list, e.g. "filters": ["NEW"] or "filters": ["SUGGESTED"].
  • value_name: value associated with the vehicle attribute.

total: total number of results matching the search.



Get vehicles available in our catalog

By means of the domain attributes, by entering them in "known_attributes", you can perform a search to obtain the vehicles that are available in our catalog.

Request:

curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/catalog_compatibilities/products_search/chunks

Example:

curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' -H 'Content-Type: application/json' -d 
{
 "domain_id": "MLB-CARS_AND_VANS",
 "site_id": "MLB",
 "known_attributes": [
     {
         "id": "BRAND",
         "value_ids": ["60249", "66432", "9909"]
     },
     {
         "id": "MODEL",
         "value_ids": ["389648", "17780469"]
     }
 ],
 "sort": {
     "attribute_id": "BRAND",
     "order": "desc"
 }
}
https://api.mercadolibre.com/catalog_compatibilities/products_search/chunks

Resposta:

{
   "results": [
       {
           "id": "MLB22015088",
           "attributes": [
               {
                   "id": "BRAND",
                   "value_id": "60249",
                   "value_name": "Volkswagen"
               },
               {
                   "id": "MODEL",
                   "value_id": "389648",
                   "value_name": "Voyage"
               },
               {
                   "id": "VEHICLE_YEAR",
                   "value_id": "12023859",
                   "value_name": "2023"
               },
        .
.
.
{
                   "id": "CURRENCY",
                   "value_id": "10837729",
                   "value_name": "r$"
               }
           ],
           "filters": []
       },
       {
           "id": "MLB18230485",
           "attributes": [...],
           "filters": ["NEW"
]
       }
   ],
   "total": 180
}

Identify new vehicles

In order to keep the compatibilities of your publications always updated, with the following resource, by indicating the attribute filter = "NEW" in the call, you will be able to know which are the new vehicles that were added to our catalog as of the 1st day of the previous month.

Request:

curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/catalog_compatibilities/products_search/chunks

Example:

curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' -H 'Content-Type: application/json' -d 
{
 "domain_id": "MLB-CARS_AND_VANS",
 "site_id": "MLB",
 "known_attributes": [
     {
         "id": "BRAND",
         "value_ids": ["60249", "66432", "9909"]
     },
     {
         "id": "MODEL",
         "value_ids": ["389648", "17780469"]
     }
 ],
 "sort": {
     "attribute_id": "BRAND",
     "order": "desc"
 },
  "filter": "NEW"
}
https://api.mercadolibre.com/catalog_compatibilities/products_search/chunks

Resposta:

{
   "results": [
       {
           "id": "MLB34236071",
           "attributes": [
               {
                   "id": "BRAND",
                   "name": "Marca",
                   "value_id": "66432",
                   "value_name": "Ford",
                   "values": [
                       {
                           "id": "66432",
                           "name": "Ford"
                       }
                   ]
               },
               {
                   "id": "MODEL",
                   "name": "Modelo",
                   "value_id": "17780469",
                   "value_name": "Corcel Ii",
                   "values": [
                       {
                           "id": "17780469",
                           "name": "Corcel Ii"
                       }
                   ]
               },
               {
                   "id": "CURRENCY",
                   "name": "Moeda",
                   "value_id": "10837729",
                   "value_name": "r$",
                   "values": [
                       {
                           "id": "10837729",
                           "name": "r$"
                       }
                   ]
               }
           ],
           "filters": [
               "NEW"
           ]
       }
   ],
   "total": 1
}

Identify suggested compatibilities

In order to keep the compatibilities of the items updated and/or in case you identify that an item has the tag "pending_compatibilities" with the following resource (using the attribute filter = "SUGGESTED") you will be able to know which are the suggested vehicles for the items.


Remember that within the call it is not mandatory to inform the secondary_product_id, however, if you do it will help you to have a better performance during the request.

Nota:
EThe secondary_product_id corresponds to the catalog_product_id attribute which is obtained when GETting to /items/$ITEM_ID.

Request:

curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/catalog_compatibilities/products_search/chunks

Example:

curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' -H 'Content-Type: application/json' -d 
{
 "domain_id": "MLB-CARS_AND_VANS",
 "site_id": "MLB",
 "item_id": "MLB4462690924",
 "secondary_product_id": "MLB31779615",
"known_attributes": [
     {
         "id": "BRAND",
         "value_ids": ["60297"]
     },
     {
         "id": "MODEL",
         "value_ids": ["389399"]
     }
 ],
 "sort": {
     "attribute_id": "BRAND",
     "order": "desc"
 },
 "filter": "SUGGESTED"
}

https://api.mercadolibre.com/catalog_compatibilities/products_search/chunks

Resposta:

{
   "results": [
       {
           "id": "MLB7866013",
           "attributes": [
               {
                   "id": "BRAND",
                   "name": "Marca",
                   "value_id": "60297",
                   "value_name": "Toyota",
                   "values": [
                       {
                           "id": "60297",
                           "name": "Toyota"
                       }
                   ]
               },
               {
                   "id": "MODEL",
                   "name": "Modelo",
                   "value_id": "389399",
                   "value_name": "Bandeirante",
                   "values": [
                       {
                           "id": "389399",
                           "name": "Bandeirante"
                       }
                   ]
               },
.
.
.
               {
                   "id": "CURRENCY",
                   "name": "Moeda",
                   "value_id": "10837729",
                   "value_name": "r$",
                   "values": [
                       {
                           "id": "10837729",
                           "name": "r$"
                       }
                   ]
               }
           ],
           "filters": [
               "SUGGESTED"
           ]
       }
   ],
   "total": 293
}

If you want to know how to identify items that have compatibility suggestions you can see more details in identifying items with compatibility suggestions.


Possible errors:

Error_code Error message Description
400 There is no configured compatibility for the category $categoryId The consulted category is not enabled to report compatibilities.
401 Invalid access token. Access Token invalid.
403 Domain is not active. Dominio inactive in buybox.

400: Incorrect format / more than 200 products for the specified domain / more than 10 domains specified.

403: Invalid token or lack of permissions on the item.

404: Item or compatibility does not exist.


Top values

Now you can see how to implement the functionality of obtaining different lists with attribute values through the Top values feature and filter the results.
With the following feature you can obtain the values of each combination and refine the search each time.

Request:

curl -X POST --header 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/catalog_domains/$DOMAIN_ID/attributes/$ATTRIBUTE_ID/top_values 

"BRAND" example:

curl -X POST --header 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/catalog_domains/MLA-CARS_AND_VANS/attributes/BRAND/top_values

Response:

[
   {
       "id": "60249",
       "name": "Volkswagen",
       "metric": 7781
   },
   {
       "id": "66432",
       "name": "Ford",
       "metric": 5616
   },
   {
       "id": "9909",
       "name": "Renault",
       "metric": 4327
   },
   {
       "id": "60279",
       "name": "Peugeot",
       "metric": 4250
   },
   {
       "id": "67781",
       "name": "Fiat",
       "metric": 4172
   },
[…]
]

Example to filter models (MODEL) of a brand (BRAND):

curl -X POST --header 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/catalog_domains/MLA-CARS_AND_VANS/attributes/MODEL/top_values 
{
   "known_attributes": [
       {
           "id": "BRAND",
           "value_id": "60249"
       }
   ]
}

Response:

[
   {
       "id": "63686",
       "name": "Amarok",
       "metric": 1516
   },
   {
       "id": "1252874",
       "name": "Gol Trend",
       "metric": 925
   },
   {
       "id": "62109",
       "name": "Gol",
       "metric": 684
   },
   {
       "id": "1252871",
       "name": "Suran",
       "metric": 604
   },
   {
       "id": "64016",
       "name": "Vento",
       "metric": 585
   },
…
]

Example to get the available years (VEHICLE_YEAR) filtering by brand and model:

curl -X POST --header 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/catalog_domains/MLA-CARS_AND_VANS/attributes/VEHICLE_YEAR/top_values
{
   "known_attributes": [
       {
           "id": "BRAND",
           "value_id": "60249"
       },
       {
           "id": "MODEL",
           "value_id": "63686"
       }
   ]
}

Response:

[
   {
       "id": "6730991",
       "name": "2020",
       "metric": 732
   },
   {
       "id": "423549",
       "name": "2015",
       "metric": 130
   },
   {
       "id": "436694",
       "name": "2017",
       "metric": 115
   },
   {
       "id": "2451646",
       "name": "2019",
       "metric": 104
   },
[…]
]

Back to: Compatibility between items and vehicle accessories.