### Get Active Domains Response Example (Domains Available) Source: https://developers.mercadolivre.com.br/primeiros-pasos This is an example response when domains are available for a specific SITE_ID, listing the domain_ids that are activated for the size chart feature. ```json { "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" } ] } ``` -------------------------------- ### Steps for Integration Source: https://developers.mercadolivre.com.br/pt_br/pt_br/experiencia-para-imoveis A step-by-step guide for partners to integrate with the Mercado Livre platform, covering account registration, application setup, authentication, and item publishing. ```APIDOC ## Integration Steps ### Description A step-by-step process for vendors and integrators to get started with the Mercado Livre platform. ### Steps 1. **Register Professional Seller Account:** Ensure a professional seller account is registered. 2. **Register Application:** Obtain an access token by registering your application. 3. **Authenticate:** Authenticate as a seller or integrator, as applicable. 4. **Publish Items:** Post items to the platform. 5. **Mark Items for Visit Request:** Designate items to be available for visit requests. 6. **Obtain Agenda Details:** Retrieve agenda details to understand the workflow. ``` -------------------------------- ### Get Active Domains Response Example (No Domains Found) Source: https://developers.mercadolivre.com.br/primeiros-pasos This is an example response when no domains are activated for the size chart feature for a given SITE_ID. It indicates a 'config_not_found' status. ```json { "error": "config_not_found", "message": "Config not found", "status": 404 } ``` -------------------------------- ### Making Your First API Request Source: https://developers.mercadolivre.com.br/pt_br/configuracao-ou-requisitos-previos This section demonstrates how to make a simple GET request to the /users/me endpoint using cURL to verify your API setup and access token. ```APIDOC ## GET /users/me ### Description This endpoint retrieves the profile information of the authenticated user. ### Method GET ### Endpoint https://api.mercadolibre.com/users/me ### Parameters #### Query Parameters - **ACCESS_TOKEN** (string) - Required - The access token obtained after authentication. ### Request Example ```bash curl -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/me ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier of the user. - **nickname** (string) - The user's nickname. - **email** (string) - The user's email address. #### Response Example ```json { "id": "USER_ID", "nickname": "USER_NICKNAME", "email": "user@example.com" } ``` ``` -------------------------------- ### Get Compatibility Note - Example Response Source: https://developers.mercadolivre.com.br/compatibilidades-itens-e-produtos-de-autopecas An example JSON response containing the compatibility note for a specific item. This response is concise and only includes the 'note' field with the relevant text. ```json { "note": "Solo para versiones con frenos a disco en las ruedas traseras" } ``` -------------------------------- ### Create a Buy N Get 1 Free Promotion (curl) Source: https://developers.mercadolivre.com.br/pt_br/gestao-de-promocoes-mshops This example demonstrates creating a '2x1' type of volume promotion, where a certain number of units can be bought while paying for fewer. It requires specifying the quantity to buy and the quantity to pay. ```curl curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' -H "Content-Type: application/json" -d { "name": " DXV TESTE 3 2x1", "discount_type": "discount_by_quantity", "start_date": "2023-05-02T00:00:00.000+0000", "end_date": "2023-05-31T00:00:00.000+0000", "type": "volume", "target": "SELECTED_PRODUCTS", "buy_quantity": 2, "pay_quantity": 1, "status": "ACTIVE" } https://api.mercadolibre.com/seller-promotions/users/805246766?channel=mshops ``` -------------------------------- ### Query Item Compatibility Exceptions - Example Source: https://developers.mercadolivre.com.br/compatibilidades-itens-e-produtos-de-autopecas An example of querying for item compatibility exceptions. It shows how to make the GET request with an item ID and the expected response format. ```curl curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/items/MLB12345678/compatibilities/exception { "has_exception": true/false } ``` -------------------------------- ### Get Category Predictor Response Example Source: https://developers.mercadolivre.com.br/primeiros-pasos This is an example response from the category predictor using the /domain_discovery resource. It helps identify the domain_id for publishing fashion items with size charts. ```json [ { "domain_id": "MLA-SNEAKERS", "domain_name": "Zapatillas", "category_id": "MLA109027", "category_name": "Zapatillas", "attributes": [] } ] ``` -------------------------------- ### Get Available Rules for an Item - Example Request (curl) Source: https://developers.mercadolivre.com.br/pt_br/automatizacoes-de-precos_nocache=true An example cURL command to fetch available pricing automation rules for a specific item (MLA12345678). This demonstrates the endpoint usage with a placeholder access token and item ID. ```curl curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/pricing-automation/items/MLA12345678/rules ``` -------------------------------- ### Get Compatibility Note (cURL Example) Source: https://developers.mercadolivre.com.br/pt_br/compatibilidades-itens-e-produtos-de-autopecas An example cURL request to fetch the compatibility note for a given item and compatibility ID, using an access token. ```bash curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/items/MLM12456789/compatibilities/bcbd413f-cd65-0e0f-88c9-5eb4aebb5372/note ``` -------------------------------- ### Get Active Domains for Size Charts Source: https://developers.mercadolivre.com.br/primeiros-pasos Retrieve a list of available domains that are configured for the size chart experience for a specific site. ```APIDOC ## GET /catalog/charts/{SITE_ID}/configurations/active_domains ### Description This endpoint allows you to check which domains are active and configured to support the size chart functionality for a given Mercado Livre site. ### Method GET ### Endpoint /catalog/charts/{SITE_ID}/configurations/active_domains ### Parameters #### Path Parameters - **SITE_ID** (string) - Required - The ID of the Mercado Livre site (e.g., 'MLA' for Argentina). ### Request Example ```bash curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' 'https://api.mercadolibre.com/catalog/charts/MLA/configurations/active_domains' ``` ### Response #### Success Response (200) - **domains** (array) - A list of domain objects, each containing a `domain_id` that is active for size charts on the specified site. - **domain_id** (string) - The ID of an active domain. #### Response Example ```json { "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" } ] } ``` #### Error Response (404) - **error** (string) - Indicates that no configuration was found for the given site. - **message** (string) - A message explaining the error. - **status** (integer) - The HTTP status code, typically 404. #### Error Response Example ```json { "error": "config_not_found", "message": "Config not found", "status": 404 } ``` ``` -------------------------------- ### Product Attribute Example - JSON Source: https://developers.mercadolivre.com.br/primeiros-pasos This JSON snippet represents a product attribute, detailing its ID, name, value type, maximum length, associated tags, default unit, and available units. It's used to define characteristics of products sold on Mercado Livre. ```json { "id": "4147746", "name": "26" } ``` -------------------------------- ### Get Specific Item Compatibility by ID - Example Response Source: https://developers.mercadolivre.com.br/compatibilidades-itens-e-produtos-de-autopecas This is an example JSON response when successfully retrieving a specific item compatibility. It includes details like the compatibility ID, domain ID, catalog product information, notes, and restrictions. ```json { "id": "bcbd413f-cd65-0e0f-88c9-5eb4aebb5372", "domain_id": "MLM-CARS_AND_VANS_FOR_COMPATIBILITIES", "catalog_product_id": "MLM15847548", "catalog_product_name": "Volkswagen Jetta 2010 GLI Manual 5", "note": "Solo para versiones con frenos a disco en las ruedas traseras", "note_status": "PENDING", "restrictions": [{ "attribute_id": "POSITION", "attribute_values": [{ "values":[{"value_id": "12456","value_name": "Delantero"}] }] }], "reputation:" { "level": "RED", } } ``` -------------------------------- ### Example Product Search with Specific Parameters - cURL Source: https://developers.mercadolivre.com.br/pt_br/buscador-de-produtos An example `curl` command for searching products on MercadoLibre. This specific example searches for 'Samsung Series 8 QN55Q8CAMGXZS' within the 'MLA-TELEVISIONS' domain for the 'MLA' site, using an active status. ```bash curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/products/search?status=active&site_id=MLA&q=Samsung Series 8 QN55Q8CAMGXZS&domain_id=MLA-TELEVISIONS ``` -------------------------------- ### Consultar Ficha Técnica do Domínio com cURL Source: https://developers.mercadolivre.com.br/primeiros-pasos Este snippet demonstra como consultar a ficha técnica de um domínio específico utilizando o comando cURL. É necessário fornecer um token de acesso e o ID do domínio desejado. ```bash curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/domains/$DOMAIN_ID/technical_specs ``` ```bash curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/domains/MLA-SNEAKERS/technical_specs ``` -------------------------------- ### Create BNGM Volume Promotion (curl) Source: https://developers.mercadolivre.com.br/pt_br/campanhas-de-desconto-por-quantidade Example using curl to create a 'Buy N Get M' (BNGM) volume promotion. This type allows for combining different items and requires buy_quantity and pay_quantity parameters. ```curl curl -X POST -H 'https://api.mercadolibre.com/seller-promotions/promotions?app_version=v2' \ --header 'Content-Type: application/json' \ --header 'Authorization: ••••••' \ --data '{ "promotion_type": "VOLUME", "sub_type": "BNGM", "buy_quantity": 3, "pay_quantity": 2, "allow_combination": true, "name": "DxV teste BNGM", "start_date": "2024-08-29T00:00:00", "finish_date": "2024-09-29T00:00:00" } ' ``` -------------------------------- ### Get Available Rules Response Example (JSON) Source: https://developers.mercadolivre.com.br/automatizacoes-de-precos An example of the JSON response when successfully retrieving available pricing automation rules for an item. It contains the item_id and a list of rule objects, each with a rule_id. ```json { "item_id": "MLA123456", "rules": [ { "rule_id": "INT_EXT" }, { "rule_id": "INT" } ] } ``` -------------------------------- ### Create BNGM Volume Promotion (cURL) Source: https://developers.mercadolivre.com.br/campanhas-de-desconto-por-quantidade Example of creating a 'Buy N Get M' (BNGM) volume promotion using cURL. This type allows combining different items and requires 'buy_quantity' and 'pay_quantity'. ```curl curl -X POST -H 'https://api.mercadolibre.com/seller-promotions/promotions?app_version=v2' \ --header 'Content-Type: application/json' \ --header 'Authorization: ••••••' \ --data '{ "promotion_type": "VOLUME", "sub_type": "BNGM", "buy_quantity": 3, "pay_quantity": 2, "allow_combination": true, "name": "DxV teste BNGM", "start_date": "2024-08-29T00:00:00", "finish_date": "2024-09-29T00:00:00" }' ``` -------------------------------- ### Mercado Livre API - Example Pagination Request with Specific IDs Source: https://developers.mercadolivre.com.br/gerenciar-ofertas This `curl` command provides a concrete example of a GET request to the Mercado Livre Seller Promotions API for a specific promotion ID (`P-MLB13451002MLB9377`). It showcases the use of `promotion_type`, `limit`, and a sample `search_after` token to fetch paginated results. ```shell curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' 'https://api.mercadolibre.com/seller-promotions/promotions/P-MLB13451002MLB9377/items?promotion_type=DEAL&app_version=v2&limit=50&search_after=d3e3fb02371ca8e49ceb3e998c4a1b8da189235497375e55d3027c7dacf5a4ef0175b2aaca4f4a0fdf31299947d82ba661037482172ba7f9cfb1b0250d3134aa71c889367aa7c1401e4c3ff5bd70ee14337dfaa18c99bbe5e52dc3a2c1b55b195131903ecbc60a1c639e01dbecf11b15126d4b38cdb6122182acde2eca1b1a42' ``` -------------------------------- ### Consult Promotions by ID - Example Source: https://developers.mercadolivre.com.br/gestao-de-promocoes-mshops An example cURL command demonstrating how to query a specific 'BOLETO' promotion for the 'mshops' channel. ```curl curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/seller-promotions/promotions/TR-496907760-202112031641564156?promotion_type=BOLETO&channel=mshops ``` -------------------------------- ### Resposta da API sem Resultados Source: https://developers.mercadolivre.com.br/primeiros-pasos Formato da resposta JSON quando nenhuma tabela de medidas é encontrada com os filtros especificados. Indica que uma nova tabela pode precisar ser criada. ```json { "paging": { "total": 0, "offset": 1, "limit": 50 }, "charts": [] } ``` -------------------------------- ### Resposta da API para Tabelas de Medidas Source: https://developers.mercadolivre.com.br/primeiros-pasos Exemplo de resposta JSON quando tabelas de medidas são encontradas. Inclui informações de paginação e uma lista de tabelas com seus IDs, nomes e tipos. ```json { "paging": { "total": 7, "offset": 1, "limit": 100 }, "charts": [ { "id": "426237", "names": { "MLA": "Guia de talles de calzado de mujer de adidas TEST APPAREL" }, "domain_id": "SNEAKERS", "type": "BRAND", "main_attribute_id": "EU_SIZE", "secondary_attribute_id": "F_US_SIZE", "attributes": [], "rows": [] }, { "id": "426238", "names": { "MLA": "Guía de talles Standard de calzado de mujer TEST" }, "domain_id": "SNEAKERS", "type": "STANDARD", "main_attribute_id": "AR_SIZE", "secondary_attribute_id": "F_US_SIZE", "attributes": [], "rows": [] }, {}, {}, {}, {} ] } ``` -------------------------------- ### Steps to Initiate Integration Source: https://developers.mercadolivre.com.br/pt_br/experiencia-para-imoveis A step-by-step guide for sellers and integrators to begin the integration process with Mercado Livre's property experience APIs. ```APIDOC ## Steps to Initiate Integration ### Description Follow these steps to begin your integration with the Mercado Livre property platform: 1. **Register Professional Seller Account:** Ensure your professional seller account is registered. 2. **Register Application for Token:** Proceed with registering your application to obtain the necessary API token. 3. **Authentication:** Authenticate either as a seller or an integrator, as applicable to your role. 4. **Publish Items:** Publish your property listings on the platform. 5. **Mark Items for Visit Request:** Designate items that should be available for visit requests. 6. **Obtain Agenda Details:** Retrieve details from the agenda to understand and verify the workflow. ``` -------------------------------- ### Discover Category Domain Source: https://developers.mercadolivre.com.br/primeiros-pasos Use the domain discovery resource to obtain the domain_id for publishing fashion items with associated size charts. ```APIDOC ## POST /domain_discovery ### Description This endpoint is used to discover the appropriate domain for publishing an item, particularly for fashion items intended to have a size chart associated with them. ### Method POST ### Endpoint /domain_discovery ### Parameters #### Request Body - **domain_data** (object) - Required - Information about the item to determine its domain. - **attributes** (array) - Required - A list of attributes describing the item. - **id** (string) - Required - The ID of the attribute. - **value_id** (string) - Optional - The ID of the attribute's value. - **value_name** (string) - Optional - The name of the attribute's value. - **value_struct** (object) - Optional - A structured value for the attribute. - **number** (number) - Optional - Numerical value. - **unit** (string) - Optional - Unit of the numerical value. - **attribute_category** (string) - Required - The category of the attribute. - **attribute_id** (string) - Required - The ID of the attribute. - **attribute_name** (string) - Required - The name of the attribute. ### Request Example ```json { "domain_data": { "attributes": [ { "id": "BRAND", "value_name": "Nike", "attribute_category": "normal", "attribute_id": "BRAND", "attribute_name": "Marca" }, { "id": "ITEM_TYPE", "value_name": "T-Shirt", "attribute_category": "normal", "attribute_id": "ITEM_TYPE", "attribute_name": "Tipo de artículo" } ] } } ``` ### Response #### Success Response (200) - **domain_id** (string) - The identified domain ID for the item. - **domain_name** (string) - The human-readable name of the domain. - **category_id** (string) - The ID of the most relevant category. - **category_name** (string) - The name of the most relevant category. - **attributes** (array) - Any relevant attributes associated with the domain or category. #### Response Example ```json [ { "domain_id": "MLA-SNEAKERS", "domain_name": "Zapatillas", "category_id": "MLA109027", "category_name": "Zapatillas", "attributes": [] } ] ``` ``` -------------------------------- ### Product Attributes Example Source: https://developers.mercadolivre.com.br/pt_br/gerenciar-tabela-de-medida This snippet shows an example of product attributes data, including various size measurements. ```APIDOC ## Product Attributes Data Structure ### Description This section details a sample JSON structure representing product attributes, focusing on different size variations and measurements like foot length. ### Method N/A (Data Structure Example) ### Endpoint N/A (Data Structure Example) ### Parameters N/A (Data Structure Example) ### Request Example ```json { "attributes": [ { "id": "SIZE", "name": "Talle", "values": [ { "name": "9 US", "struct": { "number": 9.0, "unit": "US" } } ] }, { "id": "FOOT_LENGTH", "name": "Largo del pie", "values": [ { "name": "10 cm", "struct": { "number": 10.0, "unit": "cm" } } ] }, { "id": "AR_SIZE", "name": "AR", "values": [ { "name": "40 AR", "struct": { "number": 40.0, "unit": "AR" } } ] }, { "id": "M_US_SIZE", "name": "US-M", "values": [ { "name": "8,5 US", "struct": { "number": 8.5, "unit": "US" } } ] } ] } ``` ### Response #### Success Response (200) N/A (Data Structure Example) #### Response Example N/A (Data Structure Example) ``` -------------------------------- ### Check Item for Compatibility Exceptions - Example Source: https://developers.mercadolivre.com.br/pt_br/pt_br/compatibilidades-itens-e-produtos-de-autopecas An example of checking an item for compatibility exceptions using a curl command. It includes a sample item ID. ```curl curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/items/MLB12345678/compatibilities/exception ``` -------------------------------- ### Clothing Measurement Attribute Example - JSON Source: https://developers.mercadolivre.com.br/primeiros-pasos An example of a clothing measurement attribute in JSON format. This attribute, `LENGTH_FROM_INSEAM_TO_ANKLE_FROM`, is tagged as `BODY_MEASURE` and specifies measurements for clothing items, including units like centimeters and inches. ```json { "id": "LENGTH_FROM_INSEAM_TO_ANKLE_FROM", "name": "Comprimento da virilha ao tornozelo de", "value_type": "number_unit", "value_max_length": 255, "tags": [ "BODY_MEASURE" ], "default_unit_id": "cm", "units": [ { "id": "\"", "name": "\"" }, { "id": "cm", "name": "cm" } ], "hierarchy": "CHILD_DEPENDENT", "relevance": 3 } ``` -------------------------------- ### Example Response for Return Reviews Source: https://developers.mercadolivre.com.br/pt_br/gerenciar-devolucoes This is an example JSON response when fetching reviews for a return. It includes details about the resource, resource ID, review method, and a list of resource reviews with their respective stages, statuses, and reasons. ```JSON { "reviews": [ { "resource": "order", "resource_id": 2000008958860420, "method": "triage", "resource_reviews": [ { "stage": "", "status": "success", "product_condition": "unsaleable", "product_destination": "seller", "reason_id": "accepted", "benefited": "buyer", "seller_status": "failed", "seller_reason": "SRF2", "benefited_type": null, "benefited_reason": null, "missing_quantity": 1 } ], "date_created": "2024-08-27T14:58:21.978Z", "last_updated": "2024-08-27T14:58:21.978Z" } ] } ``` -------------------------------- ### Resposta da API: Domínios com Tabela de Medidas Source: https://developers.mercadolivre.com.br/primeiros-pasos Exemplo de resposta JSON da API ao consultar domínios com tabelas de medidas. A resposta contém uma lista de objetos, onde cada objeto possui um 'domain_id' que identifica um domínio configurado. ```json { "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" } ] } ``` -------------------------------- ### Get Pack Message Guide - cURL Source: https://developers.mercadolivre.com.br/mocks-para-mensagens-por-vendas-de-itens-full This example demonstrates how to retrieve information about the message guide for a specific pack, particularly useful for identifying exceptions or reasons why direct messaging might be blocked. It requires an access token and the pack ID. ```curl curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/messages/action_guide/packs/2000000000000012?tag=post_sale ``` -------------------------------- ### Get City Information Example (curl) Source: https://developers.mercadolivre.com.br/localizar-imoveis An example of how to call the API to get information for the city with ID 'TUxBQ1RNTzc4N2Fm'. This demonstrates the expected request format. ```curl curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/classified_locations/cities/TUxBQ1RNTzc4N2Fm ``` -------------------------------- ### Example Redirect URI with Code and State Source: https://developers.mercadolivre.com.br/pt_br/autenticacao-e-autorizacao_nocache=true A concrete example of a redirect URI, illustrating the format for receiving the authorization code and state parameter after a user grants permission to the application. ```url https://localhost.com/redirect?code=TG-61828b7fffcc9a001b4bc890-314029626&state=ABC1234 ``` -------------------------------- ### Create a Percentage Discount by Unit Promotion (curl) Source: https://developers.mercadolivre.com.br/pt_br/gestao-de-promocoes-mshops This example demonstrates creating a volume promotion where a percentage discount is applied to a specific unit purchased. It requires defining the discount percentage, the buy quantity, and the status. ```curl curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' -H "Content-Type: application/json" -d '{ "name": " DXV TESTE 1", "discount_type": "percentage_by_unit", "value": 20.0, "start_date": "2023-02-02T00:00:00.000+0000", "end_date": "2023-03-31T00:00:00.000+0000", "type": "volume", "target": "SELECTED_PRODUCTS", "buy_quantity": 6, "status": "ACTIVE" }' https://api.mercadolibre.com/seller-promotions/users/805246766?channel=mshops } ``` -------------------------------- ### Get Authorized Applications by User Example - curl Source: https://developers.mercadolivre.com.br/gerencie-seu-aplicativo An example demonstrating how to request applications authorized by a specific user ID. This shows the GET request structure with a placeholder user ID. ```curl curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/users/26317316/applications ``` -------------------------------- ### GET /sites/{site_id}/categories Source: https://developers.mercadolivre.com.br/categorias-e-atributos-veiculos Retrieves the structure of categories for a given country. For example, you can get all categories for Brazil (MLB). ```APIDOC ## GET /sites/{site_id}/categories ### Description Retrieves the structure of categories for a given country. This endpoint provides a list of top-level categories for a specified site. ### Method GET ### Endpoint /sites/{site_id}/categories ### Parameters #### Path Parameters - **site_id** (string) - Required - The ID of the site (e.g., 'MLB' for Brazil). ### Request Example ```bash curl -X GET https://api.mercadolibre.com/sites/MLB/categories ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the category. - **name** (string) - The name of the category. #### Response Example ```json [ { "id": "MLB5672", "name": "Acessórios para Veículos" }, { "id": "MLB271599", "name": "Agro" } ] ``` ``` -------------------------------- ### Search Product Components - Initial Request (Curl) Source: https://developers.mercadolivre.com.br/kits-virtuais This cURL command demonstrates how to perform an initial search for product components without any specific filters applied. It targets the Mercado Livre API for searching kit components. ```curl curl -L -X POST \ https://api.mercadolibre.com/users/$SELLER_ID/kits/components/search?searchText=$STRING&limit=2 \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer $ACCESS_TOKEN' ``` -------------------------------- ### Application Creation and Management Source: https://developers.mercadolivre.com.br/pt_br/pt_br/crie-uma-aplicacao-no-mercado-livre Details on how to create a new application, fill in required information, and manage existing applications. ```APIDOC ## Create an Application To create an application, log in and access **My Applications** (Argentina, Brazil, Chile, Mexico, Colombia, Uruguay, Peru, Ecuador, and Venezuela) and fill in the requested information. You will then obtain the Client_Id and Secret_Key, which are necessary for authentication with our API. Before creating an application, ensure that the account being used **is the owner account** of the solution to be developed, avoiding future account transfer issues. We recommend that the account be created under a legal entity. These are the steps to create an application on Mercado Livre, which will allow you to access our public API ecosystem from an integration: 1. Access our DevCenter. 2. Click on "Create an application" and fill in all mandatory fields. **Note:** - In some countries (Argentina, Mexico, Brazil, and Chile), it is only allowed to create 1 application after the inclusion and validation of the account holder's data. For this, it is necessary to observe the information included when creating the account, because it must be the same. If this information is not available, we suggest you contact Mercado Livre customer service to obtain information about the account. ### Basic Application Information - **Name:** Application name. Must be unique. - **Short Name:** Name that Mercado Livre uses to generate the application URL. - **Description:** This description (up to 150 characters) will be displayed when the application requests authorization. - **Logo:** Include an image of the company, observing the dimensions. 3. The possible redirect URIs to which the **Code** of the received authorization will be returned will be gathered in **Redirect URIs**. Fill in with the root of the domain. **Important:** To create an application in the **My Applications** section, it is necessary to use the HTTPS protocol in the redirect URI, as this ensures that the message will be sent encrypted and only authorized individuals will be able to view it. ### Use PKCE (Proof Key for Code Exchange) This determines whether the application will have PKCE validation enabled to generate the token. This allows for a second verification to prevent authorization code injection and CSRF (Cross-Site Request Forgery) attacks. Its use is optional, although recommended. **Device Grant:** This flow is used when applications request an access token, using only their credentials, to access their own resources, and not on behalf of a user. The main difference with other flows is that, for this token, recurring calls are made until the user finalizes the permission and the authorization token is returned, or until the time allocated for the flow is exceeded. 4. **Scopes** * Read: Allows the use of GET HTTPS API methods. * Write: Allows the use of PUT, POST, and DELETE HTTPS API methods. Learn more about our functional Permissions in this documentation. 5. **Topics** Includes a checklist that classifies by specific themes. You can select only what you are interested in to receive notifications, and in the "**Notification Return URL**" field, you must configure a route to receive these notifications. **Important:** Fill in this field with an adequate, valid, and configured URL to receive notifications. **Topics:** These are the main ones among several: * Orders * Messages * Items * Catalog * Shipments * Promotions Mercado Livre makes requests to this route whenever there is news in the selected topics. For more information, consult the notifications documentation. 6. Save the project and you will be redirected to the homepage, where your application will be listed. You can check the ID and the secret key (**Secret_Key**) displayed by your application. With this data, we can start the integration. After the application is created and configured correctly, it is necessary to review the authentication and authorization documentation to proceed with the integration and learn how to generate a token. ## Manage My Applications After creating an application on Mercado Livre, you can access it in the DevCenter. If you have an application already created, access "Edit" to view and manage your application. ``` -------------------------------- ### Get Category Attributes - cURL Example Source: https://developers.mercadolivre.com.br/pt_br/referencias-de-dominios-produtos-e-atributos-para-autopecas This is an example of the 'Get Category Attributes' command, showing how to retrieve attributes for a category identified as 'MLA12345'. This helps in understanding the specific attributes available for a given product category. ```cURL curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/categories/MLA12345/attributes ``` -------------------------------- ### Add Product Domain Compatibilities Example (cURL) Source: https://developers.mercadolivre.com.br/pt_br/compatibilidades-itens-e-produtos-de-autopecas_nocache=true This cURL command shows a concrete example of adding product compatibilities for non-MLM items. It specifies the domain, creation source, and attributes like BRAND and YEAR. It also includes an example of restrictions for the POSITION attribute with specific values. ```shell curl -X POST -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/items/MLA794706391/compatibilities { "products_families": [{ "domain_id": "MLA-CARS_AND_VANS", "creation_source": "ITEM_SUGGESTIONS", "attributes": [{ "id": "BRAND", "value_id": "60249" }, { "id": "YEAR", "value_name": "2010" }, ], "note": "Solamente para vehículos de fabricación Europea", "restrictions": [{"attribute_id": "POSITION", "attribute_values": [{"values":[{"value_id": "12456","value_name": "Delantero"}]},{"values":[{"value_id": "65432","value_name": "Trasero"}, {"value_id": "87675","value_name": "Inferior"}]}]} } ``` -------------------------------- ### Get Specific Catalog Domain - cURL Example Source: https://developers.mercadolivre.com.br/pt_br/referencias-de-dominios-produtos-e-atributos-para-autopecas This is a specific example of the 'Get Catalog Domains by ID' command, demonstrating how to fetch data for the 'MLA-CARS_AND_VANS' domain. It's useful for understanding the structure of domain-specific data. ```cURL curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/catalog_domains/MLA-CARS_AND_VANS ``` -------------------------------- ### Example API Request (Shell) Source: https://developers.mercadolivre.com.br/envios-turbo An example of a cURL command to retrieve subscription details for a user on the 'MLA' site from the Mercado Livre API. This demonstrates how to substitute the placeholder variables with actual values. ```shell curl -X GET -H "Authorization: Bearer $ACCESS_TOKEN" https://api.mercadolibre.com/flex/sites/MLA/users/1438865529/subscriptions/v1 ``` -------------------------------- ### Publish Real Estate Listing - API Request Example Source: https://developers.mercadolivre.com.br/passos-rapidos-para-publicar-um-imovel-de-teste This snippet demonstrates a cURL command to publish a real estate listing. It requires an access token and includes various parameters for the listing details such as type, category, price, attributes, and location. The actual code for constructing the request body with these parameters is not shown but is implied. ```bash curl -X POST -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" https://api.mercadolibre.com/items -d '{ "title": "Casa de 3 quartos em São Paulo", "category_id": "PROPERTIES", "price": 1000000, "currency_id": "BRL", "available_quantity": 1, "listing_type_id": "gold_premium", "attributes": [ { "id": "TOTAL_AREA", "value_name": "200m²" }, { "id": "BEDROOMS", "value_name": "3" }, { "id": "FULL_BATHROOMS", "value_name": "2" }, { "id": "condition", "value_name": "new" } ], "location": { "neighborhood": "Jardins", "city": "São Paulo", "state": "SP", "country": "BR" } }' ``` -------------------------------- ### Example API Call to Get Claim Details Source: https://developers.mercadolivre.com.br/pt_br/gerenciar-reclamacoes An example of a cURL command to fetch details for a specific claim (ID: 5204934310) using the Mercado Livre API. This demonstrates the practical application of the GET request for claim details. ```curl curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/post-purchase/v1/claims/5204934310/detail ``` -------------------------------- ### List User Products Compatibilities (GET) Source: https://developers.mercadolivre.com.br/pt_br/compatibilidades-itens-e-produtos-de-autopecas_nocache=true This endpoint lists all compatibilities for a given user's products. It requires an access token, the user products ID, and the main domain ID. The 'extended' parameter can be used to fetch more details. Reputation information is only returned if there are incompatibility complaints. ```bash curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/user-products/$USER_PRODUCTS_ID/compatibilities?main_domain_id=MLM-CARS_AND_VANS_FOR_COMPATIBILITIES&extended=true ``` ```bash curl -X GET -H 'Authorization: Bearer $ACCESS_TOKEN' https://api.mercadolibre.com/user-products/MLMU427597763/compatibilities?main_domain_id=MLM-CARS_AND_VANS_FOR_COMPATIBILITIES&extended=true ``` -------------------------------- ### Product Size Attributes Configuration Source: https://developers.mercadolivre.com.br/primeiros-pasos This configuration defines various size attributes for product listings, including US, EU, and UK sizing. It specifies the data type, hierarchy, and available units for each attribute, enabling structured and standardized size information. ```json { "component": "NUMBER_UNIT_INPUT", "label": "US", "ui_config": { "allow_custom_value": false, "allow_filtering": false }, "attributes": [ { "id": "US_SIZE", "name": "US", "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" } ] } ``` ```json { "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" } ] } ``` ```json { "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" } ] } ``` -------------------------------- ### Example API Call for Item Quality Actions (Shell) Source: https://developers.mercadolivre.com.br/pt_br/qualidade-das-publicacoes-veiculos An example of how to call the Mercado Livre API to get the health actions for a specific item (MLM735814032). This demonstrates the practical application of the GET request with the item ID. ```Shell curl -X GET -H "Authorization: Bearer $ACCESS_TOKEN" https://api.mercadolibre.com/items/MLM735814032/health/actions ``` -------------------------------- ### API Endpoint Documentation (OPTIONS) Source: https://developers.mercadolivre.com.br/consideracoes-de-design Example of fetching API endpoint documentation using an OPTIONS request. This provides metadata about the endpoint, including its name, description, attributes, and available methods. ```Bash curl -X OPTIONS https://api.mercadolibre.com/currencies ``` ```JSON { "name":"Monedas", "description":"Devuelve información correspondiente al ISO de las monedas que se usan en MercadoLibre.", "attributes": { "id":"ID de la moneda (Código ISO)", "description":"Denominación oficial de la moneda", "symbol":"Símbolo ISO para representar la moneda", "decimal_places":"Número de decimales manejados con la moneda" }, "methods": [ { "method":"GET", "example":"/currencies/", "description":"Devuelve el listado con todas las monedas." }, { "method":"GET", "example":"/currencies/:id", "description":"Devuelve información con respecto a una moneda específica." } ], "related_resources":[], "connections": { "id":"/currencies/:id" } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.