Mercado Libre - Get Shipment
Description
Section titled “Description”This module allows querying the shipment status, tracking, label, and delivery address of a sale.
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 |
shipment_id | string | Conditional | Shipment ID |
order_id | string | Conditional | Order ID (alternative) |
include_tracking | boolean | No | Include tracking history |
include_label | boolean | No | Include label data |
Either
shipment_idORorder_idis required
Shipment Statuses
Section titled “Shipment Statuses”| Status | Description |
|---|---|
pending | Pending |
handling | In preparation |
ready_to_ship | Ready to ship |
shipped | In transit |
delivered | Delivered |
not_delivered | Not delivered |
cancelled | Cancelled |
Output
Section titled “Output”{ "success": true, "shipment": {...}, "shipment_id": 41234567890, "status": "shipped", "substatus": "in_transit", "tracking_number": "ABC123456789", "tracking_method": "correo_argentino", "receiver_address": { "street_name": "Av. Corrientes", "street_number": "1234", "city": "Buenos Aires", "state": "AR-C", "zip_code": "1043" }, "tracking_history": [...], "message": "Shipment 41234567890 retrieved successfully"}Usage Example
Section titled “Usage Example”Get shipment by ID
Section titled “Get shipment by ID”{ "credentials_id": "meli_cuenta", "shipment_id": "41234567890"}Get shipment from an order
Section titled “Get shipment from an order”{ "credentials_id": "meli_cuenta", "order_id": "2000001234567890"}Include tracking history
Section titled “Include tracking history”{ "credentials_id": "meli_cuenta", "shipment_id": "41234567890", "include_tracking": true}Include label data
Section titled “Include label data”{ "credentials_id": "meli_cuenta", "shipment_id": "41234567890", "include_label": true}Full information
Section titled “Full information”{ "credentials_id": "meli_cuenta", "order_id": "2000001234567890", "include_tracking": true, "include_label": true}Shipment Fields
Section titled “Shipment Fields”| Field | Description |
|---|---|
id | Shipment ID |
status | Current status |
substatus | Detailed sub-status |
tracking_number | Tracking number |
tracking_method | Shipping method |
date_created | Creation date |
receiver_address | Delivery address |
sender_address | Origin address |
shipping_option | Shipping option |
cost | Shipping cost |
Example Workflows
Section titled “Example Workflows”Automatic tracking
Section titled “Automatic tracking”[Shipment webhook] -> [MeliGetShipment] -> [Update status] -> [Notify customer]Label printing
Section titled “Label printing”[Paid order] -> [MeliGetShipment label] -> [Generate PDF] -> [Print]Delivery monitor
Section titled “Delivery monitor”[Schedule every hour] -> [Get shipped shipments] -> [MeliGetShipment tracking] -> [Verify]Usage with ExecuteScript
Section titled “Usage with ExecuteScript”// Check delivery statusconst envio = ctx.data.shipment;
const estadoFinal = ['delivered', 'not_delivered', 'cancelled'];
ctx.data = { shipment_id: envio.id, esta_en_transito: envio.status === 'shipped', esta_entregado: envio.status === 'delivered', requiere_accion: envio.status === 'not_delivered', tracking: envio.tracking_number, direccion: `${envio.receiver_address.street_name} ${envio.receiver_address.street_number}`, ciudad: envio.receiver_address.city};API Used
Section titled “API Used”- API: Mercado Libre Shipments API
- Endpoint:
GET /shipments/{id} - Documentation: https://developers.mercadolibre.com/
- The
shipment_idis obtained from the order (order.shipping.id) - Tracking history may not be available for all shipments
- The label is only available for Mercado Envios
- Statuses vary depending on the shipping type (ME, Flex, Collection)
Related Nodes
Section titled “Related Nodes”- MeliGetOrders - Get orders with shipping information
- MeliSendMessage - Notify buyer about the shipment
- MeliGetUser - Get buyer data