> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runalloy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Mercado Libre

> Integration details and setup guide for the Mercado Libre connector in Alloy Automation.

## Pre-Built Tooling

| Category                            | Details                                                  |
| ----------------------------------- | -------------------------------------------------------- |
| **Authentication**                  | OAuth 2.0 (Authorization Code with refresh tokens)       |
| **Two-Way Sync**                    | No                                                       |
| **Events Supported**                | Yes (via webhooks)                                       |
| **Realtime**                        | Yes (webhooks for order and listing updates)             |
| **Supports Rate Limiting**          | Yes                                                      |
| **Authentication Scopes Supported** | No granular scopes (OAuth provides account-level access) |

***

## Objects Supported

Alloy Automation supports syncing the following objects from **Mercado Libre**:

Based on the Mercado Libre API, typical objects include:

* **Items (Listings)**
* **Orders**
* **Users**
* **Categories**
* **Questions**
* **Shipments**
* **Payments**

***

## Set Up Guide

### Trial Access

| Question                                           | Answer                                                                                                                                |
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| **Offers free trial?**                             | Yes. You can create a free seller account to test API functionality. [Create developer account](https://developers.mercadolibre.com/) |
| **Requires paid sandbox**                          | No. Mercado Libre does not require payment for testing.                                                                               |
| **Requires partnership to obtain authentication?** | No, but you must register an application in the Mercado Libre developer portal.                                                       |

***

### Authentication (OAuth 2.0)

For customers who want to completely whitelabel their OAuth experience, you can provide your own developer keys instead of using Alloy Automation's.

#### Create your OAuth app (Mercado Libre Developer Portal)

1. Go to **Mercado Libre Developers** ([https://developers.mercadolibre.com/](https://developers.mercadolibre.com/)) and sign in with your Mercado Libre account.
2. Navigate to **My Applications** and click **Create New Application**.
3. Fill in your application details:
   * **Application Name**: Your application's name
   * **Short Description**: Brief description of your application
   * **Redirect URI**: `https://api.runalloy.com/api/strategy/connector/mercadoLibre/callback`
   * **Application Website**: Your application's website URL
4. Select the appropriate **Scopes** for your application (typically `read`, `write`, and `offline_access`).
5. Accept the Terms and Conditions and click **Create Application**.
6. Once created, you'll receive your **App ID (Client ID)** and **Secret Key (Client Secret)**.
7. Copy these credentials into Alloy Automation.

#### Important Notes

* Mercado Libre operates in multiple countries (Argentina, Brazil, Mexico, etc.). The API endpoints and user authentication are region-specific.
* OAuth tokens expire after 6 hours. Refresh tokens are valid for 6 months and must be used to obtain new access tokens.
* The authorization URL uses a global endpoint: `https://global-selling.mercadolibre.com/authorization`.

***

## Use Cases

### 1) Multi-channel inventory synchronization

Sync product listings between your e-commerce platform and Mercado Libre, automatically updating stock levels, prices, and product descriptions across channels to prevent overselling and maintain consistency.

### 2) Order fulfillment automation

Pull new orders from Mercado Libre into your order management system, automatically creating shipments, printing labels, and updating tracking information back to the marketplace.

### 3) Customer service integration

Aggregate customer questions from Mercado Libre listings into your support ticketing system, enabling your team to respond quickly and track resolution metrics alongside other support channels.

### 4) Dynamic pricing management

Monitor competitor pricing and marketplace trends, then automatically adjust your Mercado Libre listings based on predefined business rules to maximize competitiveness and profitability.

### 5) Cross-border selling automation

Manage listings across multiple Mercado Libre country sites (Brazil, Argentina, Mexico, etc.) from a single platform, handling currency conversion, local compliance requirements, and region-specific shipping rules.

***

## API Gotchas

* Mercado Libre's OAuth tokens have a short 6-hour lifespan. You must implement robust token refresh logic to avoid service interruptions. Refresh tokens are valid for 6 months but must be actively renewed before expiration.

* The API uses site-specific identifiers (e.g., `MLB` for Brazil, `MLA` for Argentina, `MLM` for Mexico) in most resource URLs. You must include the correct site ID when fetching categories, creating listings, or querying orders.

* Rate limiting is strict and varies by endpoint and user account type. Standard accounts typically get 1,000 requests per hour, but burst limits can be much lower. Always respect the `X-RateLimit-*` headers and implement exponential backoff.

* When creating or updating listings, certain fields are required based on the category. The required fields vary by category and country, so you must use the `/categories/{category_id}` endpoint to fetch requirements before posting items.

> For questions or troubleshooting, contact **[support@runalloy.com](mailto:support@runalloy.com)**.
