Skip to content

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:

Terminal window
https://prod.api-drenvio.com/v2/shipments/rate

Sandbox 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:

Terminal window
https://sandbox.api-drenvio.com/v2/shipments/rate

Available Carriers

DrEnvío currently supports 17 carriers, which you can use to get shipping rates for your shipments.

  1. Fedex
  2. Sendex
  3. DHL
  4. UPS
  5. Carssa
  6. Ivoy
  7. Scm
  8. Quiken
  9. Ampm
  10. Estafeta
  11. Paquetexpress
  12. 99minutos
  13. Uber
  14. Mensajeros Urbanos
  15. JTExpress
  16. Borzo

Note: In the sandbox environment, the available carriers for quoting are JTExpress and Quiken.

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

FieldDescriptionTypeRequired
typeType of shipmentEnum: National, Internationaltrue
originOrigin information for shipment addressObject AddressObjecttrue
destinationDestination information for shipment addressObject AddressObjecttrue
packagesPackages array of itemsArray PackageObjecttrue
insuranceThe insurance of the shipment, if insured the response will contain the amount of the insurance. MXN if national shipping, if not in USD.numbertrue
carriersAn array with each of the carriers that you want to rate your shipment. International rates are only available with fedex, dhl, ups, and estafeta.Array of strings: AllCarrierstrue

Address (Object)

FieldDescriptionTypeRequired
country2-digit country code for each address. Origin must always be MX, and destination can be any country.MXCO (or any country code)
postalCodePostal Code for the origin and destination addresses.6400064380 (or any valid postal code)

Package (Object)

FieldDescriptionTypeRequired
weightThe weight of the package in kilograms (KG).numbertrue
heightThe height of the package in centimeters (CM).numbertrue
widthThe width of the package in centimeters (CM).numbertrue
lengthThe length of the package in centimeters (CM).numbertrue
volumetricThe volumetric weight of the shipment, typically calculated based on the dimensions.numberfalse
typeThe type of the package.Enum: box, envelope, pallettrue
insuranceThe insurance of the shipment, if insured the response will contain the amount of the insurance. MXN if national shipping, if not in USD.numberfalse

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": {}
}
]