Skip to content

Mercado Libre - Get Orders

This module allows querying sales from your Mercado Libre account with filters by status, date, buyer, and more.

This module requires Mercado Libre (OAuth) credentials with the following fields:

FieldDescription
access_tokenValid OAuth access token
FieldTypeRequiredDescription
credentials_idstringYesCredentials ID
order_idstringNoSpecific order ID
seller_idstringNoSeller ID
statusstringNoOrder status
buyer_idstringNoFilter by buyer
tagsstringNoFilter by tags
date_fromstringNoDate from (ISO 8601)
date_tostringNoDate to (ISO 8601)
sortstringNoSorting
limitnumberNoOrders per page (max 50)
offsetnumberNoOffset
ValueDescription
confirmedConfirmed
payment_requiredPayment pending
payment_in_processPayment in process
partially_paidPartially paid
paidPaid
partially_refundedPartially refunded
cancelledCancelled
ValueDescription
not_deliveredNot delivered
deliveredDelivered
pack_orderCart order
{
"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"
}
{
"credentials_id": "meli_cuenta",
"order_id": "2000001234567890"
}
{
"credentials_id": "meli_cuenta",
"status": "paid",
"limit": 50
}
{
"credentials_id": "meli_cuenta",
"status": "paid",
"tags": "not_delivered"
}
{
"credentials_id": "meli_cuenta",
"date_from": "2024-01-15T00:00:00.000-03:00",
"date_to": "2024-01-15T23:59:59.000-03:00"
}
{
"credentials_id": "meli_cuenta",
"buyer_id": "123456789"
}
{
"credentials_id": "meli_cuenta",
"tags": "delivered",
"sort": "date_desc"
}
FieldDescription
idUnique order ID
statusOrder status
date_createdCreation date
date_closedClosing date
buyerBuyer information
order_itemsOrder products
paymentsAssociated payments
shippingShipping information
total_amountTotal amount
currency_idCurrency
tagsOrder tags
pack_idCart ID (if applicable)
[Paid order webhook] -> [MeliGetOrders] -> [Create ERP order] -> [Prepare shipment]
[Schedule every 15min] -> [MeliGetOrders paid] -> [Update system] -> [Notify]
[Schedule 23:00] -> [MeliGetOrders today] -> [Generate report] -> [Email]
[Schedule every hour] -> [MeliGetOrders not_delivered] -> [Check tracking] -> [Alert]
// Analyze daily sales
const 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 fulfillment
const 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
}));
  • The maximum limit per request is 50 orders
  • Dates must be in ISO 8601 format with timezone
  • The pack_id field indicates cart orders (multiple items)
  • For more shipping details, use meliGetShipment
  • Orders include basic buyer information