EasyPost - Buy Shipment / Label
Description
Section titled “Description”This module buys a selected rate from EasyPost and generates the corresponding shipping label. It receives the shipment ID (obtained from the Get Rates node), the selected rate ID, and the label format. It makes a POST request to the /shipments/{shipment_id}/buy endpoint and returns the shipment ID, tracking code, label URL, carrier, service, price, and status.
Configuration
Section titled “Configuration”| Parameter | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | EasyPost credential (provider: easypost) |
| shipment_id | text | Yes | Shipment ID obtained from the Get Rates node (shp_…) |
| rate_id | text | Yes | Selected rate ID (rate_…) |
| label_format | select | No | Label format: PDF (default), PNG, ZPL (Thermal), EPL2 |
Credentials
Section titled “Credentials”A easypost type credential is required with the following fields:
- api_key: EasyPost API Key
Output
Section titled “Output”{ "success": true, "shipment_id": "shp_abc123", "tracking_code": "9400111899223456789012", "tracker_id": "trk_abc123", "label_url": "https://easypost.com/labels/shp_abc123.pdf", "label_format": "PDF", "carrier": "USPS", "service": "Priority", "rate": "7.58", "status": "purchased", "message": "Etiqueta generada - Tracking: 9400111899223456789012"}Usage Example
Section titled “Usage Example”Basic case
Section titled “Basic case”{ "credentials_id": "mi_credencial_easypost", "shipment_id": "shp_abc123", "rate_id": "rate_def456", "label_format": "PDF"}API Used
Section titled “API Used”- Endpoint: POST
/shipments/{shipment_id}/buy - Base: EasyPost API (via helper
_easypostHelper) - Documentation: https://www.easypost.com/docs/api
- This node is used in combination with the Get Rates node, which provides the shipment_id and the available rate_ids
- Once the label is purchased, a tracker is automatically generated
- The tracker_id can be used to track the shipment with the Track Shipment node
- Available formats include PDF, PNG, ZPL (thermal printers), and EPL2