Site Logo

🎉 ShipEngine is becoming ShipStation API 🎉

Over the next few months you'll notice the ShipEngine website, documentation portal, and dashboard being rebranded as ShipStation API. For our ShipEngine customers, you don't need to take any action or change any of your integrations in any way. All endpoints will remain the same and continue to function as they always have.

To learn more about what's coming, review our New ShipStation API page.

Create a Shipment from a Sales Order

We provide a convenience method for you to automatically create a shipment directly from a sales order. The model accepted is a standard shipment model, with a couple caveats. ship_to and ship_date will not be accepted in the shipment object.

Example

POST /v-beta/shipments/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
POST /v-beta/shipments/sales_order/a401efda-0d0b-59ce-a47c-392c44890189 HTTP/1.1
Host: api.shipengine.com
API-Key: __YOUR_API_KEY_HERE__
Content-Type: application/json
{
"carrier_id": "se-2565",
"service_code": "usps_priority_mail",
"warehouse_id": "se-1951",
"advanced_options": {
"non_machinable": true
},
"packages": [
{
"weight": {
"value": 8.0,
"unit": "ounce"
}
}
]
}
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{
"sales_order_ids": [
"a401efda-0d0b-59ce-a47c-392c44890189"
],
"items": [
{
"sales_order_id": "a401efda-0d0b-59ce-a47c-392c44890189",
"sales_order_item_id": "f42dbf7a-582b-5002-a5e9-bf78030815f7",
"quantity": 1,
"name": "Bubble Popper 4XL",
"sku": "BUB-1-T",
"created_at": "2018-01-30T18:43:46.897Z",
"modified_at": "2018-01-30T18:43:46.897Z"
}
],
"shipment_id": "se-1150919",
"carrier_id": "se-2565",
"service_code": "usps_priority_mail",
"external_shipment_id": null,
"ship_date": "2019-07-25T05:00:00.000Z",
"created_at": "2019-07-25T15:24:46.657Z",
"modified_at": "2019-07-25T15:24:46.657Z",
"shipment_status": "pending",
"ship_to": {
"name": "Amanda Miller",
"phone": "555-555-5555",
"address_line1": "525 S Winchester Blvd",
"city_locality": "San Jose",
"state_province": "CA",
"postal_code": "95128",
"country_code": "US",
"address_residential_indicator": "yes"
},
"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"
},
"dimensions": {
"unit": "inch",
"length": 0,
"width": 0,
"height": 0
},
"insured_value": {
"currency": "usd",
"amount": 0
},
"label_messages": {
"reference1": null,
"reference2": null,
"reference3": null
}
}
],
"total_weight": {
"value": 8,
"unit": "ounce"
}
}