Integrate Your System with the Mercado Libre API: Stock, Prices, Orders

A technical guide to integrating your ERP or in-house system with the Mercado Libre API: OAuth, stock and price sync, order webhooks, and real 2026 costs.

Deepyze Team··6 min read

Connecting your system to Mercado Libre stops being optional once manually entering sales and adjusting stock eats hours of your day. Integrating your system with the Mercado Libre API takes four steps: create an application to get OAuth 2.0 credentials, authorize the seller's account to obtain an access_token, subscribe to order webhooks (the orders_v2 topic) so you react to every sale in seconds, and use the items endpoints to push stock and prices from your ERP. The rest of this guide is how to build that without wrecking your reputation along the way.

Why integrate against the API instead of doing it by hand

Manually entering orders works up to roughly 15-20 orders a day. After that the usual three problems show up: overselling (you sell a unit you no longer have), delays (the order reaches your logistics hours late), and typos in quantities or prices. On Mercado Libre, cancelling a sale for lack of stock hits your reputation directly, and dropping from green to yellow medal can cut sales 20-40% for weeks.

An API integration closes the loop: the sale enters your system on its own, stock decrements immediately, and other channels find out right away. It's the same kind of AI automation we apply to any repetitive flow, except here the engine is the official ML API.

Step 1: credentials and OAuth 2.0

It all starts at developers.mercadolibre.com. You create an application and get:

  • Client ID and Client Secret — identify your app.
  • Redirect URI — the URL ML returns the user to after they authorize.
  • Notification topics — which events you want (orders_v2, items, questions, claims).

The flow is standard OAuth 2.0 (authorization code):

  1. You redirect the seller to ML's authorization URL.
  2. The seller accepts and ML returns them to your Redirect URI with a code.
  3. Your backend exchanges that code for an access_token (valid 6 hours) and a refresh_token.
  4. Before it expires, you use the refresh_token to renew without bothering the user.

The most common mistake here is mishandling renewal: if your token expires at 3 a.m. and nothing renews it, you lose sales until someone notices. Renewal must be automatic and monitored. If you'd rather not build this plumbing from scratch, it's exactly the kind of API development and integration work worth delegating.

Step 2: the endpoints you'll actually use

The Mercado Libre REST API is broad, but for stock, prices, and orders you focus on a handful of endpoints:

Action Method and endpoint Notes
Read a listing GET /items/{item_id} Returns price, stock, status, variants
Update stock PUT /items/{item_id} with available_quantity Hits the listing within seconds
Update price PUT /items/{item_id} with price Respect the rate limit on bulk loads
List seller's items GET /users/{user_id}/items/search To sweep the whole catalog
Read an order GET /orders/{order_id} Buyer, items, amounts, payment status
Search orders GET /orders/search?seller={id} Reconciliation and backup
Shipping data GET /shipments/{shipment_id} To sync logistics

With variants (size/color), stock doesn't live on the item but on each variation, so the PUT targets the variations array. That's the detail that breaks improvised integrations most often.

Want your ERP and Mercado Libre to talk without you touching a single order by hand? Book an intro call and we'll show you how we build it for companies selling across multiple channels.

Step 3: order webhooks (the part that gives you speed)

This is the heart of the automation. Instead of asking ML "any new sales?" every minute, you let ML tell you. You subscribe to the orders_v2 topic and configure your notification URL. When someone buys, ML sends a POST like this:

{
  "resource": "/orders/2000003508419013",
  "user_id": 123456789,
  "topic": "orders_v2",
  "sent": "2026-05-25T14:30:00.000-03:00"
}

Notice the full order isn't included — only the resource. Your system:

  1. Returns 200 immediately (if you're slow, ML retries and floods your queue).
  2. Queues the resource to process separately.
  3. Calls GET /orders/2000003508419013 to fetch the detail.
  4. Creates the order in your ERP and decrements stock.
  5. Pushes the new quantity to other channels if you sell multichannel.

The golden rule: respond fast, process later. If you run all your logic inside the webhook request, any slowness (a heavy query, a billing service down) makes ML flag your endpoint as slow and you start losing notifications.

Step 4: a safety net with reconciliation polling

Webhooks are fast but not infallible: your server goes down, there's a deploy, a timeout sneaks in. That's why no serious integration relies on them alone. You add a job that every 5-15 minutes calls /orders/search and compares against what you've already loaded. If an order shows up that webhooks didn't deliver, you recover it.

Webhooks for speed, polling so nothing gets lost. That duality is the difference between a demo integration and one that survives a big sale event.

Stock and prices flowing from your ERP to ML

The reverse flow matters just as much. When you change stock or price in your system (new merchandise arrived, you adjusted a margin, something sold in-store), it has to travel to ML:

  1. Your ERP detects the change (ideally event-driven, not a full sweep).
  2. You map your internal SKU to ML's item_id (or variation_id).
  3. You issue the corresponding PUT.
  4. You log the response to audit and retry if it failed.

The SKU ↔ item_id mapping is where half of these projects fall apart. You need a reliable, maintained equivalence table; without it, you update the stock of the wrong listing. For competitive repricing, you read the catalog's listings and adjust within margin rules you define: never below cost, never above a ceiling. When this lives inside custom software or your custom CRM, repricing is wired to your real costs instead of being a separate spreadsheet.

When this does NOT make sense

Being honest saves money. A custom Mercado Libre API integration isn't justified if:

  • You sell fewer than 15-20 orders a day. Manual entry is still cheaper than maintaining an integration.
  • You have a single channel and a small catalog. If it's just Mercado Libre with 50 listings, the ML panel and a spreadsheet are enough.
  • An off-the-shelf tool already covers your case. Real Trends, Astroselling, or channel managers (USD 30-150/month) handle simple catalogs without development. Pay that before paying for a project.
  • You have no one to maintain the integration. The ML API changes, tokens expire, rate limits shift. An ownerless integration breaks itself within months.

A custom integration wins when you have an in-house ERP, per-channel price rules, kits/bundles, multiple warehouses, or invoicing tied to the order. That's where no off-the-shelf tool reaches, but custom ecommerce does.

Real costs and timelines (2026)

A well-built stock + prices + orders integration against the ML API, wired to an existing ERP, usually takes 3 to 6 weeks of development. The range depends on how many channels you sync, whether you handle variants, and how clean your SKU data is. Monthly maintenance is real and worth budgeting: the API evolves and someone has to keep pace.

Integrating your system with Mercado Libre isn't magic: it's well-handled OAuth, fast webhooks, backup polling, and clean SKU mapping. If you have the volume and an in-house system that deserves to talk to ML without human intervention, start your project with us and we'll build the integration so every sale enters on its own, stock never lies, and your reputation stays intact.

Frequently asked questions

What do I need to start integrating my system with the Mercado Libre API?+

An application created in the Mercado Libre developer portal (developers.mercadolibre.com), which gives you a Client ID and Client Secret. With those you implement the OAuth 2.0 flow to get an access_token tied to the seller's account. That token lasts 6 hours and renews via a refresh_token, and it's the key to reading and updating stock, prices, and orders.

Does Mercado Libre have webhooks for orders?+

Yes. You subscribe to the 'orders_v2' topic (plus 'questions', 'items', 'claims' if you need them) and Mercado Libre sends a POST to your notification URL whenever an event happens. The notification doesn't carry the full payload: it carries the resource (e.g. /orders/2000003508419013), and your system calls that endpoint to fetch the complete order.

How often can I update stock through the API?+

Mercado Libre doesn't set a fixed interval, but it does enforce rate limits (hundreds of calls per hour depending on the endpoint and app category). The healthy pattern is event-driven, not polling: each sale triggers a stock decrement, and each ERP change pushes the new quantity to ML. That updates in seconds without burning your rate limit.

Can I change prices in bulk with the API?+

Yes. A PUT to /items/{item_id} updates the price field (and available_quantity for stock). For large catalogs, batch the changes and respect the rate limit. For competitive repricing you can read the catalog's competing listings and adjust your price within margin rules you define.

Should I build a custom integration or use an off-the-shelf tool?+

If you sell with a simple catalog and a single warehouse, tools like Real Trends, Astroselling, or channel managers (USD 30-150/month) solve it without development. If you have an in-house ERP, per-channel price rules, kits/bundles, invoicing tied to the order, or multiple warehouses, that almost always calls for a custom integration.

What happens if my system goes down and a sale notification is lost?+

Mercado Libre retries the notification for a while if your endpoint doesn't return 200. Even so, a serious integration doesn't rely on webhooks alone: it runs a reconciliation job that polls /orders/search every few minutes to recover any missed orders. Webhooks for speed, polling as a safety net so nothing slips through.

Want this working in your company?

At Deepyze we turn manual processes into systems that work on their own: AI automation, web and mobile apps, and custom software. Tell us your case and you will have a concrete proposal within 24 hours.

Sin compromiso · Respuesta en 24 hs · Equipo en tu mismo huso horario

Keep reading