Quote Shipment
This guide allows you to check shipping rates using the DrEnvío API. It includes information about the available environments, the list of compatible carriers, request parameters, response structure, and more.
Environments
DrEnvio API supports two environments: Production and Sandbox.
Production Environment The production environment is where real shipments are processed. To use the production API, send your requests to the following URL:
https://prod.api-drenvio.com/v2/shipments/rateSandbox Environment The sandbox environment is used for testing purposes. It provides simulated data to help you develop and test your integration before moving to production. To use the sandbox API, send your requests to the following URL:
https://sandbox.api-drenvio.com/v2/shipments/rateAvailable Carriers
The carriers available for quoting depend on two factors: the origin country (MX or CO) and the shipment type (National or International). Make sure to only include carriers valid for your combination — invalid carriers will be ignored or return an error.
Note: In the sandbox environment, the only available carriers for quoting are
JTExpressandQuiken.
Mexico (MX) — National Shipments
Use these carriers when origin.country = "MX" and type = "National":
[ "noventa9Minutos", "aExpress", "ampm", "carssa", "coordinadora", "dhl", "estafeta", "fedex", "ivoy", "mensajerosUrbanos", "paquetexpress", "quiken", "redpack", "scm", "sendex", "tracusa", "uber", "ups", "vencedor", "jtexpress", "entrega", "borzo", "tresguerras", "treggo", "pickit", "test", "imile", "afimex", "ptx"]Mexico (MX) — International Shipments
Use these carriers when origin.country = "MX" and type = "International":
["dhl", "fedex", "ups", "estafeta"]Colombia (CO) — National Shipments
Use these carriers when origin.country = "CO" and type = "National":
[ "fedex", "interrapidisimo", "redServi", "serviEntrega", "mensajerosUrbanos", "noventa9Minutos", "dhl", "coordinadora", "moova", "deprisa", "picap", "tcc", "envia"]Colombia (CO) — International Shipments
Use these carriers when origin.country = "CO" and type = "International":
["dhl", "fedex"]Carrier Coverage Summary
| Origin | Shipment Type | Supported Carriers |
|---|---|---|
| MX | National | noventa9Minutos, aExpress, ampm, carssa, coordinadora, dhl, estafeta, fedex, ivoy, mensajerosUrbanos, paquetexpress, quiken, redpack, scm, sendex, tracusa, uber, ups, vencedor, jtexpress, entrega, borzo, tresguerras, treggo, pickit, test, imile, afimex, ptx |
| MX | International | dhl, fedex, ups, estafeta |
| CO | National | fedex, interrapidisimo, redServi, serviEntrega, mensajerosUrbanos, noventa9Minutos, dhl, coordinadora, moova, deprisa, picap, tcc, envia |
| CO | International | dhl, fedex |
API request
To get a quote for a shipment, send a POST request to the API with the following JSON body:
{ "type": "National", "origin": { "country": "MX", "postal_code": "64000" }, "destination": { "country": "MX", "postal_code": "64380" }, "packages": [ { "weight": 1, "height": 10, "width": 10, "length": 10, "volumetric": 0.2, "type": "box", "main_weight": 1 } ], "carriers": ["fedex", "estafeta", "ampm", "dhl"], "insurance": 0}Fields description
| Field | Description | Type | Required |
|---|---|---|---|
| type | Type of shipment | Enum: National, International | true |
origin | Origin information for shipment address | Object AddressObject | true |
destination | Destination information for shipment address | Object AddressObject | true |
packages | Packages array of items | Array PackageObject | true |
insurance | The insurance of the shipment, if insured the response will contain the amount of the insurance. MXN if national shipping, if not in USD. | number | true |
carriers | An array with each of the carriers you want to rate your shipment. Must match the valid carriers for your origin.country and type combination. See Available Carriers. | Array of strings | true |
Address (Object)
| Field | Description | Type | Required |
|---|---|---|---|
country | 2-digit country code for each address. Origin must always be MX or CO, and destination can be any country. | string | true |
postalCode | Postal Code for the origin and destination addresses. | string | true |
city | City name of the address. | string | false |
district | District or neighborhood of the address. | string | false |
Package (Object)
| Field | Description | Type | Required |
|---|---|---|---|
weight | The weight of the package in kilograms (KG). | number | true |
height | The height of the package in centimeters (CM). | number | true |
width | The width of the package in centimeters (CM). | number | true |
length | The length of the package in centimeters (CM). | number | true |
volumetric | The volumetric weight of the shipment, typically calculated based on the dimensions. | number | false |
type | The type of the package. | Enum: box, envelope, pallet | true |
insurance | The insurance of the shipment, if insured the response will contain the amount of the insurance. MXN if national shipping, if not in USD. | number | false |
API response
[ { "ObjectId": null, "ShippingId": "G1", "carrier": "fedex", "service_id": "fedex_mx_D-C03_ground", "service": "ground", "price": 120, "days": "3 a 5 días", "insurance": 0, "currency": "MXN", "metadata": { "extended_area": { "extended_area": false, "origin": false, "destination": false } } }, { "ObjectId": null, "ShippingId": "G1", "carrier": "fedex", "service_id": "fedex_mx_P-C00_ground", "service": "ground", "price": 94.55, "days": "3 a 5 días", "insurance": 0, "currency": "MXN", "metadata": { "account_id": "648a19d789be2a38ae8eb0d2", "account_price": 1, "extended_area": { "extended_area": false, "origin": false, "destination": false } } }, { "ObjectId": null, "ShippingId": "G1", "carrier": "fedex", "service_id": "fedex_mx_D-C03_express", "service": "express", "price": 145, "days": "1 a 2 días", "insurance": 0, "currency": "MXN", "metadata": { "extended_area": { "extended_area": false, "origin": false, "destination": false } } }, { "ObjectId": null, "ShippingId": "G1", "carrier": "fedex", "service_id": "fedex_mx_P-C00_express", "service": "express", "price": 86.52, "days": "1 a 2 días", "insurance": 0, "currency": "MXN", "metadata": { "account_id": "648a19d789be2a38ae8eb0d2", "account_price": 1, "extended_area": { "extended_area": false, "origin": false, "destination": false } } }, { "ObjectId": "T0", "ShippingId": "N6", "carrier": "estafeta", "service": "metropolitano", "currency": "MXN", "price": 68, "insurance": 0, "service_id": "estafeta_mx_D-C03_metropolitano", "days": "2 días", "metadata": { "extended_area": { "extended_area": false, "origin": false, "destination": false }, "ocurre": false } }, { "ObjectId": "78", "ShippingId": "N6", "carrier": "estafeta", "service": "ground", "currency": "MXN", "price": 120, "insurance": 0, "service_id": "estafeta_mx_D-C03_terrestre", "days": "5 días", "metadata": { "extended_area": { "extended_area": false, "origin": false, "destination": false }, "ocurre": false } }, { "ObjectId": "D8", "ShippingId": "N6", "carrier": "estafeta", "service": "2_days", "currency": "MXN", "price": 134, "insurance": 0, "service_id": "estafeta_mx_D-C03_2dias", "days": "2 días", "metadata": { "extended_area": { "extended_area": false, "origin": false, "destination": false }, "ocurre": false } }, { "ObjectId": "60", "ShippingId": "N6", "carrier": "estafeta", "service": "next_day", "currency": "MXN", "price": 135, "insurance": 0, "service_id": "estafeta_mx_D-C03_next_day", "days": "1 día", "metadata": { "extended_area": { "extended_area": false, "origin": false, "destination": false }, "ocurre": false } }, { "ShippingId": "E1", "ObjectId": "ECONOMY SELECT DOMESTIC", "carrier": "dhl", "service": "ground", "service_id": "dhl_mx_D-C01_ground", "insurance": 0, "currency": "MXN", "days": "1 a 2 días", "metadata": { "dhl": { "productCode": "G", "productName": "ECONOMY SELECT DOMESTIC" } }, "price": 170 }, { "ShippingId": "E1", "ObjectId": "ECONOMY SELECT DOMESTIC", "carrier": "dhl", "service": "ground", "service_id": "dhl_mx_P-C00_ground", "insurance": 0, "currency": "MXN", "days": "1 a 2 días", "metadata": { "account_id": "648a1a9d89be2a38ae8eb21a", "account_price": 1, "dhl": { "productCode": "G", "productName": "ECONOMY SELECT DOMESTIC" } }, "price": 138.14 }, { "ShippingId": "E1", "ObjectId": "EXPRESS DOMESTIC", "carrier": "dhl", "service": "express", "service_id": "dhl_mx_D-C01_express", "insurance": 0, "currency": "MXN", "days": "1 a 2 días", "metadata": { "dhl": { "productCode": "N", "productName": "EXPRESS DOMESTIC" } }, "price": 175 }, { "ShippingId": "E1", "ObjectId": "EXPRESS DOMESTIC", "carrier": "dhl", "service": "express", "service_id": "dhl_mx_P-C00_express", "insurance": 0, "currency": "MXN", "days": "1 a 2 días", "metadata": { "account_id": "648a1a9d89be2a38ae8eb21a", "account_price": 1, "dhl": { "productCode": "N", "productName": "EXPRESS DOMESTIC" } }, "price": 138.14 }, { "ObjectId": "next_day_guaranteed", "ShippingId": "N4", "carrier": "quiken", "service": "ground", "service_id": "quiken_mx_D-C01_ground", "price": 92, "currency": "MXN", "days": "Siguiente día", "extra": "Next Day Guaranteed", "metadata": {} }, { "ObjectId": "local_express", "ShippingId": "N4", "carrier": "quiken", "service": "ground", "service_id": "quiken_mx_D-C01_ground36hrs", "price": 69, "currency": "MXN", "days": "36 horas", "extra": "Next Day - 36 hrs", "metadata": {} }, { "ObjectId": null, "ShippingId": "E1", "carrier": "mensajerosUrbanos", "service": "ground", "service_id": "mensajerosUrbanos_mx_A-P01_ground", "insurance": 0, "price": 117.29, "currency": "MXN", "days": "2 horas", "metadata": {} }]