Cotizar envio
Esta guía te permite consultar las tarifas de envío utilizando el API de DrEnvio. Incluye información sobre los distintos entornos disponibles, la lista de transportistas compatibles, los parámetros de solicitud, la estructura de la respuesta y más.
Environments
DrEnvio API supports two environments: Production and Sandbox.
Production Environment El entorno de producción es donde se procesan los envíos reales. Para utilizar el API de producción, envía tus solicitudes a la siguiente URL:
Sandbox Environment El entorno de sandbox se utiliza con fines de prueba. Proporciona datos simulados para ayudarte a desarrollar y probar tu integración antes de pasar a producción. Para utilizar el API de sandbox, envía tus solicitudes a la siguiente URL:
Available Carriers
DrEnvio actualmente soporta 17 transportistas, que puedes utilizar para obtener tarifas de envío para tus envíos.
- Fedex
- Sendex
- DHL
- UPS
- Carssa
- Ivoy
- Scm
- Quiken
- Ampm
- Estafeta
- Paquetexpress
- 99minutos
- Uber
- Mensajeros Urbanos
- JTExpress
- Borzo
Nota: En el entorno sandbox, las paqueterías disponibles para cotizar son: JTExpress y Quiken.
API request
To get a quote for a shipment, send a POST request to the API with the following JSON body:
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 that you want to rate your shipment. International rates are only available with fedex, dhl, ups, and estafeta. | Array of strings: AllCarriers | true |
Address (Object)
Field | Description | Type | Required |
---|---|---|---|
country | 2-digit country code for each address. Origin must always be MX , and destination can be any country. | MX | CO (or any country code) |
postalCode | Postal Code for the origin and destination addresses. | 64000 | 64380 (or any valid postal code) |
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 |