ShipEngine API allows users to create sales orders manually via the API. At minimum, you need:
external_order_idorder_dateship_tofor every sales order item
You can also provide additional sales order information.
POST /v-beta/sales_orders
POST /v-beta/sales_orders HTTP/1.1
Host: api.shipengine.com
API-Key: __YOUR_API_KEY_HERE__
Content-Type: application/json{
"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": "amanda@example.com"
},
"bill_to": {
"email": "amanda@example.com",
"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
}
]
}You can leave order_source empty - a default api order source will be created automatically if none exists. If you have multiple api order sources, you must specify which to use.
You can only create sales orders via API with an api order source. Third-party sources like Amazon or Shopify must be imported by connecting that order source.
You can specify ship_to address either for the entire sales order or for individual items. If specified at the order level, it applies to all items. You may specify both as long as addresses are identical.