Create a Sales Order Manually

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

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

  • external_order_id
  • 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.

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 '
{
  "external_order_id": "1111",
  "external_order_number": "2222",
  "order_source": {
    "order_source_id": "9ab83300-39ba-4159-96f8-0d0ef6dfcbfa"
  },
  "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": [
    {
      "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

Order source for the sales order

You can leave the order_source empty in your request and a default api order source will be created automatically for you if no api order source exists. If you already have an api order source connected to your account, it will be used if none is specified in the request. However, if you have multiple connected api order sources, you must specify which one you'd like to use in your request.

info

Third-party order sources

You may only create sales orders via the API with an api order source, meaning you cannot manually create sales orders for your Amazon or Shopify order source. Sales orders from Amazon, Shopify, or any other third-party order source must be imported by connecting that 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.