get_shipment_label
Downloads a Mercado Envios shipping label for a shipment to a local file, returning its path and size; supports PDF or ZPL2 for thermal printers.
Instructions
Download the Mercado Envios shipping label for a shipment and save it to a local file. Returns the absolute file path and size in bytes so the user can open/print it. The label comes back as PDF (default) or ZPL2 for thermal printers. Gotchas: the label only exists after the shipment is 'ready_to_ship', and some logistic types (e.g. flex / self-service) do not have a printable label — in those cases Meli returns an error, which is surfaced as-is. Shipment ids come from orders (order.shipping.id); call get_orders first if you only have an order id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| shipment_id | Yes | Numeric shipment id, taken from an order's shipping.id | |
| response_type | No | Label format: 'pdf' (default) or 'zpl2' for Zebra thermal printers |