Site Logo

Update a Sales Order

ShipEngine allows users to update sales orders manually via the API.

At a minimum, you will need the following pieces of information to update your sales order:

  • order_date
  • ship_to for every sales order item, if any

You may also provide most of the additional information available on a sales order, as seen below. Your sales order will be completely replaced with the information you provide in the request. Key identifying information of the sales order, such as the external_order_id and order_source, cannot be changed and are not included in the update request.

Example

PUT /v-beta/sales_orders/: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
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
75
76
77
78
79
80
81
PUT /v-beta/sales_orders/32e18d70-52e0-5002-ab7a-ae33843c2187 HTTP/1.1
Host: api.shipengine.com
API-Key: __YOUR_API_KEY_HERE__
Content-Type: application/json
{
"order_date": "2019-07-25T15:24:46.657Z$",
"payment_details":
{
"subtotal": {
"currency": "usd",
"amount": 200
},
"estimated_shipping": {
"currency": "usd",
"amount": 10
},
"estimated_tax": {
"currency": "usd",
"amount": 5
},
"grand_total": {
"currency": "usd",
"amount": 215
}
},
"customer": {
"name": "Amanda Miller",
"phone": "555-555-5555",
"email": "[email protected]"
},
"bill_to": {
"email": "[email protected]",
"address": {
"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_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"
},
"sales_order_items": [
{
"sales_order_item_id": "02202633-d038-5cfc-bdc2-777968435771",
"line_item_details": {
"name": "ball of string A",
"sku": "ball of string A"
},
"price_summary": {
"unit_price": {
"currency": "usd",
"amount": 200
}
},
"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"
},
"quantity": 4,
"is_gift": false
}]
}

Updating sales order items

You may only update sales order items that already exist on the sales order. You cannot add or remove sales order items from a sales order at this time. Make sure you include all of the sales order items in your request, even if you have not made any changes to them. Sales order items are identified by their sales_order_item_id.

Order source of the sales order

You may only use the API to update sales orders that have an api order source, meaning you may not use the API to update your Amazon or Shopify sales orders. Those sales orders must be updated and reimported from your connected order source.

Different shipping addresses for different sales order items

You may specify your ship_to address either for the sales order as a whole, or for each individual sales order item. If you specify the ship_to address for the sales order, the address will apply across all of the sales order items. You may also specify the ship_to address for the sales order as well as all the items, as long as the addresses are identical.