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).countryhttps://queries.envia.com/country
(origin or destination).statehttp://queries.envia.com/state?country_code=MX
package.typeenvelope, box, pallet
package.lenghtUnitCM, IN
package.weightUnitKG, LB
shipment.carrierhttp://queries.envia.com/carrier?country_code=MX
shipment.servicehttps://queries.envia.com/service?country_code=MX
settings.printFormat and printSizehttps://queries.envia.com/carrier-print-option
additionalServices (LTL or FTL ONLY)https://queries.envia.com/additional-services

Request Body

{"origin"=>{"name"=>"oscar mx", "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"}]}