Skip to content

Envia.com - Create Shipment / Label

This module creates a shipment in Envia.com and generates the corresponding shipping label. It receives the origin and destination data in JSON format, packages as a JSON array, the carrier name, and the service type. It makes a POST request to the /ship/generate/ endpoint and returns the shipment ID, tracking number, tracking URL, label URL, carrier, service, and status. Envia.com is a shipping aggregator focused on Latin America.

ParameterTypeRequiredDescription
credentials_idcredentialsYesEnvia.com credential (provider: envia)
origintextareaYesOrigin data in JSON (name, street, city, state, zip, country, phone, email)
destinationtextareaYesDestination data in JSON
packagestextareaYesArray of packages in JSON with dimensions and weight
carriertextYesCarrier name (e.g.: fedex, dhl, estafeta)
servicetextYesCarrier service type

A envia type credential is required with the following fields:

  • api_key: Envia.com API Key

Credentials are obtained from the Envia.com dashboard (https://app.envia.com/).

{
"success": true,
"shipment_id": "12345",
"tracking_number": "794644790138",
"tracking_url": "https://envia.com/rastreo/794644790138",
"label_url": "https://envia.com/labels/12345.pdf",
"carrier": "fedex",
"service": "express",
"status": "created",
"message": "Guia generada - Tracking: 794644790138"
}
{
"credentials_id": "mi_credencial_envia",
"origin": "{\"name\":\"Mi Empresa\",\"street\":\"Reforma 222\",\"city\":\"Ciudad de Mexico\",\"state\":\"DF\",\"zip\":\"06600\",\"country\":\"MX\",\"phone\":\"+525512345678\",\"email\":\"envios@miempresa.com\"}",
"destination": "{\"name\":\"Cliente\",\"street\":\"Av Juarez 100\",\"city\":\"Guadalajara\",\"state\":\"JA\",\"zip\":\"44100\",\"country\":\"MX\",\"phone\":\"+525512345679\"}",
"packages": "[{\"content\":\"Producto\",\"amount\":1,\"weight\":2,\"length\":25,\"width\":15,\"height\":10}]",
"carrier": "fedex",
"service": "express"
}
  • Endpoint: POST /ship/generate/
  • Base: Envia.com API (via helper _enviaHelper)
  • Documentation: https://docs.envia.com/
  • Packages are always sent as an array; if an individual object is passed, it is automatically converted
  • Envia.com supports multiple carriers in LATAM: FedEx, DHL, Estafeta, Redpack, etc.
  • Carrier and service names must match those available in your account (use the List Carriers node)
  • Weight is expressed in kilograms and dimensions in centimeters
  • Envia.com - Get Rates (enviaGetRates)
  • Envia.com - Track Shipment (enviaGetTracking)
  • Envia.com - Cancel Shipment (enviaCancelShipment)
  • Envia.com - List Carriers (enviaGetCarriers)