Site Logo

Create a Label from a Sales Order

You can use our beta endpoint for creating a label from a sales order ID, if this function is available to your ShipEngine account.

Requirements

Before you begin, be sure you are familiar with the following:

Example Request & Response

POST /v-beta/labels/sales_order/:sales_order_id

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
POST /v-beta/labels/sales_order/sh-123456-789 HTTP/1.1
Host: api.shipengine.com
API-Key: __YOUR_API_KEY_HERE__
Content-Type: application/json
{
"label_format": "pdf",
"shipment": {
"carrier_id": "se-123890",
"service_code": "usps_priority_mail",
"ship_from": {
"company_name": "Example Corp.",
"name": "John Doe",
"phone": "111-111-1111",
"address_line1": "4009 Marathon Blvd",
"address_line2": "Suite 300",
"city_locality": "Austin",
"state_province": "TX",
"postal_code": "78756",
"country_code": "US",
"address_residential_indicator": "no"
},
"packages": [
{
"package_code": "package",
"weight": {
"value": 1,
"unit": "ounce"
}
}
]
}
}

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
"label_id": "se-419215",
"status": "completed",
"shipment_id": "se-2116034",
"ship_date": "2019-07-25T05:00:00.000Z",
"created_at": "2019-07-25T15:24:46.657Z",
"shipment_cost": {
"currency": "USD",
"amount": 6.86
},
"insurance_cost": {
"currency": "USD",
"amount": 0.0
},
"tracking_number": "9405511899560441854156",
"is_return_label": false,
"is_international": false,
"batch_id": "",
"carrier_id": "se-123890",
"service_code": "usps_priority_mail",
"package_code": "package",
"voided": false,
"label_format": "pdf",
"label_layout": "4x6",
"trackable": false,
"carrier_code": "stamps_com",
"tracking_status": "unknown",
"label_download": {
"href": "https://api.shipengine.com/v1/downloads/8G1sj2vKeU2yfmsk1NquXQ/label-12893.pdf"
},
"form_download": null,
"insurance_claim": null,
"packages": [
{
"package_code": "package",
"weight": {
"value": 1.00,
"unit": "ounce"
},
"dimensions": {
"unit": "inch",
"length": 0.0,
"width": 0.0,
"height": 0.0
},
"insured_value": {
"currency": "usd",
"amount": 0.00
},
"tracking_number": null,
"label_messages": {
"reference1": null,
"reference2": null,
"reference3": null
}
}
]
}