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

POST /v-beta/sales_orders

curl -iX POST https://api.shipengine.com/v-beta/sales_orders \
-H 'Content-Type: application/json' \
-H 'API-Key: __YOUR_API_KEY_HERE__' \
-d '
{
  "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
  }
]
}'
  • curl

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.