Create Label
You'll use the /v1/labels/ endpoint to purchase a label from your desired carrier. The response returns a label for the specified carrier and service class and includes the tracking number you'll use to track the shipment.
If you are new to ShipEngine, make sure you read the Create a Shipping Label documentation first. It provides a step-by-step guide on creating your first label in ShipEngine.
Example Request & Response
POST /v1/labels/
123456789101112131415161718192021222324252627282930313233343536373839404142434445
POST /v1/labels HTTP/1.1Host: api.shipengine.comAPI-Key: __YOUR_API_KEY_HERE__Content-Type: application/json{"shipment": {"validate_address": "validate_and_clean","service_code": "usps_priority_mail","ship_from": {"name": "John Doe","company_name": "Example Corp.","address_line1": "4009 Marathon Blvd","city_locality": "Austin","state_province": "TX","postal_code": "78756","country_code": "US","phone": "512-555-5555",},"ship_to": {"name": "Amanda Miller","address_line1": "525 S Winchester Blvd","city_locality": "San Jose","state_province": "CA","postal_code": "95128","country_code": "US",},"packages": [{"weight": {"value": 17,"unit": "pound"},"dimensions": {"length": 36,"width": 12,"height": 24,"unit": "inch"}}]}}'
Response
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
{"label_id": "se-392157963","status": "completed","shipment_id": "se-1053748895","ship_date": "2023-12-20T08:00:00Z","created_at": "2023-12-20T18:02:07.7650796Z","shipment_cost": {"currency": "usd","amount": 175.0400},"insurance_cost": {"currency": "usd","amount": 0.0},"requested_comparison_amount": {"currency": "usd","amount": 0.0},"rate_details": [{"rate_detail_type": "shipping","carrier_description": null,"carrier_billing_code": "Base Rate","carrier_memo": null,"amount": {"currency": "usd","amount": 175.04},"billing_source": "Carrier"}],"tracking_number": "9405511899562082413495","is_return_label": false,"rma_number": null,"is_international": false,"batch_id": "","carrier_id": "se-4712287","service_code": "usps_priority_mail","package_code": "package","voided": false,"voided_at": null,"label_format": "pdf","display_scheme": "label","label_layout": "4x6","trackable": true,"label_image_id": null,"carrier_code": "stamps_com","tracking_status": "in_transit","label_download": {"pdf": "https://api.shipengine.com/v1/downloads/10/wpTzhiFW9ke8L-_6rJHmEA/label-392157963.pdf","png": "https://api.shipengine.com/v1/downloads/10/wpTzhiFW9ke8L-_6rJHmEA/label-392157963.png","zpl": "https://api.shipengine.com/v1/downloads/10/wpTzhiFW9ke8L-_6rJHmEA/label-392157963.zpl","href": "https://api.shipengine.com/v1/downloads/10/wpTzhiFW9ke8L-_6rJHmEA/label-392157963.pdf"},"form_download": null,"qr_code_download": null,"insurance_claim": null,"packages": [{"package_id": 410478985,"package_code": "package","weight": {"value": 17.00,"unit": "pound"},"dimensions": {"unit": "inch","length": 36.00,"width": 12.00,"height": 24.00},"insured_value": {"currency": "usd","amount": 0.00},"tracking_number": "9405511899562082413495","qr_code_download": null,"label_messages": {"reference1": null,"reference2": null,"reference3": null},"external_package_id": null,"content_description": null,"sequence": 1,"alternative_identifiers": []}],"charge_event": "carrier_default","alternative_identifiers": []}