Skip to content

Envia.com - Get Rates

This module gets shipping quotes from multiple carriers through Envia.com. It receives the origin and destination data in JSON format and packages as a JSON array with weight in kg and dimensions in cm. It makes a POST request to the /ship/rate/ endpoint and processes the response to extract rates from each carrier with carrier, service, rate ID, price, currency, delivery days, and estimate. It automatically identifies the cheapest rate.

ParameterTypeRequiredDescription
credentials_idcredentialsYesEnvia.com credential (provider: envia)
origintextareaYesOrigin data in JSON (name, street, city, state, zip, country)
destinationtextareaYesDestination data in JSON
packagestextareaYesArray of packages in JSON (content, amount, weight, length, width, height)

A envia type credential is required with the following fields:

  • api_key: Envia.com API Key
{
"success": true,
"rates": [
{
"carrier": "fedex",
"service": "express",
"rate_id": "rate_123",
"price": "250.00",
"currency": "MXN",
"delivery_days": 2,
"delivery_estimate": "2026-03-25"
}
],
"rates_count": 6,
"cheapest": {
"carrier": "estafeta",
"service": "ground",
"price": "120.00",
"currency": "MXN"
},
"message": "6 cotizaciones obtenidas"
}
{
"credentials_id": "mi_credencial_envia",
"origin": "{\"name\":\"Mi Empresa\",\"street\":\"Reforma 222\",\"city\":\"Ciudad de Mexico\",\"state\":\"DF\",\"zip\":\"06600\",\"country\":\"MX\"}",
"destination": "{\"name\":\"Cliente\",\"street\":\"Av Juarez 100\",\"city\":\"Guadalajara\",\"state\":\"JA\",\"zip\":\"44100\",\"country\":\"MX\"}",
"packages": "[{\"content\":\"Producto\",\"amount\":1,\"weight\":2,\"length\":25,\"width\":15,\"height\":10}]"
}
  • Quotes include all carriers enabled in your Envia.com account
  • The default currency is MXN (Mexican pesos)
  • Weight is expressed in kilograms and dimensions in centimeters
  • Packages are always sent as an array
  • Envia.com - Create Shipment / Label (enviaCreateShipment)
  • Envia.com - Track Shipment (enviaGetTracking)
  • Envia.com - Cancel Shipment (enviaCancelShipment)
  • Envia.com - List Carriers (enviaGetCarriers)