Create Label

POST https://{{base_url}}.envia.com/ship/generate/

Create a shipping label with a carrier, select if you would like express or ground shipping.

Important Information:

Custom Keys (optional):

Custom Keys are used when you have a direct account with a carrier. This way you create labels with your rates with an additional small fee for service.

Click here to update your clients keys.

This will automatically change the requests directly to the carrier, using your own account.

FieldOptions
(origin or destination).country
(origin or destination).state
package.type
envelope, box, pallet
package.lenghtUnit
CM, IN
package.weightUnit
KG, LB
shipment.carrier
shipment.service
settings.printFormat and printSize
additionalServices (LTL or FTL ONLY)

Request Body

{"origin"=>{"name"=>"oscar envia", "company"=>"envia", "email"=>"noreply@envia.com", "phone"=>"8116300800", "street"=>"av vasconcelos", "number"=>"1400", "district"=>"mirasierra", "city"=>"Monterrey", "state"=>"NL", "country"=>"MX", "postalCode"=>"66236", "reference"=>""}, "destination"=>{"name"=>"oscar", "company"=>"empresa", "email"=>"noreply@envia.com", "phone"=>"8116300800", "street"=>"av vasconcelos", "number"=>"1400", "district"=>"palo blanco", "city"=>"monterrey", "state"=>"NL", "country"=>"MX", "postalCode"=>"66240", "reference"=>""}, "packages"=>[{"content"=>"camisetas rojas", "amount"=>2, "type"=>"box", "dimensions"=>{"length"=>2, "width"=>5, "height"=>5}, "weight"=>63, "insurance"=>0, "declaredValue"=>400, "weightUnit"=>"KG", "lengthUnit"=>"CM"}, {"content"=>"camisetas rojas", "amount"=>2, "type"=>"box", "dimensions"=>{"length"=>1, "width"=>17, "height"=>2}, "weight"=>5, "insurance"=>400, "declaredValue"=>400, "weightUnit"=>"KG", "lengthUnit"=>"CM"}], "shipment"=>{"carrier"=>"fedex", "service"=>"express", "type"=>1}, "settings"=>{"printFormat"=>"PDF", "printSize"=>"STOCK_4X6", "comments"=>"comentarios de el envío"}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: OK

{"meta":"generate","data":[{"carrier":"coordinadora","service":"ground","trackingNumber":"3285ee7a4f8bd205","trackUrl":"https://test.envia.com/rastreo?label=3285ee7a4f8bd205\u0026cntry_code=co","label":"https://s3.us-east-2.amazonaws.com/envia-staging/uploads/fedex/3285ee7a4f8bd205_fedex.pdf","totalPrice":12000,"currentBalance":205005.5,"currency":"MXN"}]}