Mercado Libre - Get Orders
Description
Section titled “Description”This module allows querying sales from your Mercado Libre account with filters by status, date, buyer, and more.
Configuration
Section titled “Configuration”Credentials
Section titled “Credentials”This module requires Mercado Libre (OAuth) credentials with the following fields:
| Field | Description |
|---|---|
access_token | Valid OAuth access token |
Parameters
Section titled “Parameters”| Field | Type | Required | Description |
|---|---|---|---|
credentials_id | string | Yes | Credentials ID |
order_id | string | No | Specific order ID |
seller_id | string | No | Seller ID |
status | string | No | Order status |
buyer_id | string | No | Filter by buyer |
tags | string | No | Filter by tags |
date_from | string | No | Date from (ISO 8601) |
date_to | string | No | Date to (ISO 8601) |
sort | string | No | Sorting |
limit | number | No | Orders per page (max 50) |
offset | number | No | Offset |
Order Statuses (status)
Section titled “Order Statuses (status)”| Value | Description |
|---|---|
confirmed | Confirmed |
payment_required | Payment pending |
payment_in_process | Payment in process |
partially_paid | Partially paid |
paid | Paid |
partially_refunded | Partially refunded |
cancelled | Cancelled |
Order Tags
Section titled “Order Tags”| Value | Description |
|---|---|
not_delivered | Not delivered |
delivered | Delivered |
pack_order | Cart order |
Output
Section titled “Output”{ "success": true, "orders": [ { "id": 2000001234567890, "status": "paid", "status_detail": {...}, "date_created": "2024-01-15T10:30:00.000-03:00", "buyer": { "id": 123456789, "nickname": "COMPRADOR123" }, "order_items": [...], "payments": [...], "shipping": {...}, "total_amount": 89999 } ], "total": 250, "offset": 0, "limit": 50, "message": "50 orders retrieved"}Usage Example
Section titled “Usage Example”Get order by ID
Section titled “Get order by ID”{ "credentials_id": "meli_cuenta", "order_id": "2000001234567890"}Paid orders
Section titled “Paid orders”{ "credentials_id": "meli_cuenta", "status": "paid", "limit": 50}Orders pending shipment
Section titled “Orders pending shipment”{ "credentials_id": "meli_cuenta", "status": "paid", "tags": "not_delivered"}Today’s orders
Section titled “Today’s orders”{ "credentials_id": "meli_cuenta", "date_from": "2024-01-15T00:00:00.000-03:00", "date_to": "2024-01-15T23:59:59.000-03:00"}Buyer’s orders
Section titled “Buyer’s orders”{ "credentials_id": "meli_cuenta", "buyer_id": "123456789"}Delivered orders
Section titled “Delivered orders”{ "credentials_id": "meli_cuenta", "tags": "delivered", "sort": "date_desc"}Order Fields
Section titled “Order Fields”| Field | Description |
|---|---|
id | Unique order ID |
status | Order status |
date_created | Creation date |
date_closed | Closing date |
buyer | Buyer information |
order_items | Order products |
payments | Associated payments |
shipping | Shipping information |
total_amount | Total amount |
currency_id | Currency |
tags | Order tags |
pack_id | Cart ID (if applicable) |
Example Workflows
Section titled “Example Workflows”Process new orders
Section titled “Process new orders”[Paid order webhook] -> [MeliGetOrders] -> [Create ERP order] -> [Prepare shipment]Sales sync
Section titled “Sales sync”[Schedule every 15min] -> [MeliGetOrders paid] -> [Update system] -> [Notify]Daily report
Section titled “Daily report”[Schedule 23:00] -> [MeliGetOrders today] -> [Generate report] -> [Email]Delivery tracking
Section titled “Delivery tracking”[Schedule every hour] -> [MeliGetOrders not_delivered] -> [Check tracking] -> [Alert]Usage with ExecuteScript
Section titled “Usage with ExecuteScript”// Analyze daily salesconst ordenes = ctx.data.orders;
const resumen = { total_ordenes: ordenes.length, total_ventas: ordenes.reduce((sum, o) => sum + o.total_amount, 0), ticket_promedio: ordenes.length > 0 ? ordenes.reduce((sum, o) => sum + o.total_amount, 0) / ordenes.length : 0, por_estado: {}};
ordenes.forEach(o => { resumen.por_estado[o.status] = (resumen.por_estado[o.status] || 0) + 1;});
ctx.data = resumen;// Prepare orders for fulfillmentconst ordenes = ctx.data.orders;
ctx.data = ordenes .filter(o => o.status === 'paid' && o.shipping?.status === 'ready_to_ship') .map(o => ({ order_id: o.id, buyer_name: o.buyer.nickname, items: o.order_items.map(i => ({ title: i.item.title, quantity: i.quantity, sku: i.item.seller_custom_field })), shipping_id: o.shipping.id }));API Used
Section titled “API Used”- API: Mercado Libre Orders API
- Endpoint:
GET /orders/search,GET /orders/{id} - Documentation: https://developers.mercadolibre.com/
- The maximum limit per request is 50 orders
- Dates must be in ISO 8601 format with timezone
- The
pack_idfield indicates cart orders (multiple items) - For more shipping details, use
meliGetShipment - Orders include basic buyer information
Related Nodes
Section titled “Related Nodes”- MeliGetShipment - Get order shipping details
- MeliGetItems - Get sold item information
- MeliSendMessage - Send message to buyer
- MeliGetUser - Get buyer data