Encuentra articulos, ayuda y consejos sobre nuestra API

International/National Generation of Labels

				
					https://api-drenvio.vercel.app/api/generate				
			

Request

Almost all providers support up to 50 characters in each field, when the ShippingId is N6 it will only allow 25 characters. Keep that in mind when making a shipment. 

Field Description Type Required
Oirigin/Destination
name
Name of the person making/receiving the shipment.
string
true
company
Company of the person making/receiving the shipment, if not provided will be NA.
string
false
email
Email of the person making/receiving the shipment.
string
true
phone
Phone number of the person making/receiving the shipment.
string
true
street
Street of the person making/receiving the shipment.
string
true
number
Number of building of the address.
string
true
int_number
Interior Number of building of the address.
string
false
district
District of the address.
string
true
city
City of the address.
string
true
country
Always MX until next major update.
string
true
reference
A reference to help find the address. if not provided will be NA.
string
false
state

2 digit state code of the address, those can be found here.

string
true
postalCode
5 digit postal code of the address.
string
true
package
length/width/height
All of them must be in CM
number
true
weight
Weight of the package in KG.
number
true
declaredValue
Declared Value of the package
number
false
type
Whether the shipment is a "box" or an "envelope"
string
true
content
A description of what is inside the package
string
true
insurance
If the rate did not provide a value of the insurance, this will not be included
number
false
Shipment
ObjectId
Provided in the rate
null|string
true
ShippingId
Provided in the rate
string
true
carrier
From which carrier you want to make the shipment
string
true
service
From which service from the carrier you want make the shipment
string
true
contenType
In which category does the content of the shipment falls
"DOCUMENTS"| "GIFT"| "SAMPLE"| "MERCHANDISE"| "HUMANITARIAN_DONATION"| "RETURN_MERCHANDISE"| "OTHER"
Required when is an international shipment
contentExplanation
An explanation of the content of the shipment, must include fabrication materials
string
Required when is an international shipment
contentQuantity
How many items are in the box
number
Required when is an international shipment
				
					{
    "origin": {
        "name": "Azael Ayala",
        "company": "Dr.Envio",
        "email": "[email protected]",
        "phone": "55 5555 5555",
        "street": "Av José Vasconcelos",
        "number": "316",
        "int_number": null,
        "district": "Privada Sierra Madre",
        "city": "San Pedro Garza García",
        "country": "MX",
        "reference": "Oficinas Dr.Envio",
        "state": "NL",
        "postalCode": "66250"
    },
    "destination": {
        "name": "Blanca Ayala",
        "company": "Dr.Envio",
        "email": "[email protected]",
        "phone": "55 5555 5555",
        "street": "Av José Vasconcelos",
        "number": "317",
        "int_number": "12",
        "district": "Privada Sierra Madre",
        "city": "San Pedro Garza García",
        "country": "MX",
        "reference": null,
        "state": "NL",
        "postalCode": "66250"
    },
    "package": {
        "weight": 10,
        "height": 10,
        "width": 10,
        "length": 10,
        "declaredValue": 10,
        "type": "box",
        "content": "contenido"
    },
    "insurance": 0,
    "shipment": {
        "ObjectId": null,
        "ShippingId": "E1",
        "carrier": "sendex",
        "service": "ground"
    }
}				
			

Response

				
					{
    "id": "6080505b8e91884f3bb0760f",
    "carrier": "sendex",
    "service": "ground",
    "tracking": "50857560805057df6c7",
    "label": "https://storage.googleapis.com/download/storage/v1/b/drenvio-8741f.appspot.com/o/sendex%2F50857560805057df6c7?generation=1619021914795209&alt=media",
    "price": 167.5,
    "remainingBalance": 160.05
}				
			
On this page