Skip to content
Last updated

Create/Update Multiple Orders

This endpoint can be used to create or update multiple orders in one request. If the orderKey is specified, ShipStation will attempt to locate the order with the specified orderKey. If found, the existing order with that key will be updated. If the orderKey is not found, a new order will be created with that orderKey.

For split orders, the orderKey is always required when creating or updating orders, and the orderId is always required for updates.

This call does not currently support partial updates; the entire resource must be provided in the body of the request.

NOTE Only orders in an open status in ShipStation (awaiting_payment,awaiting_shipment, pending_fulfillment and on_hold) can be updated through this method. Orders in the cancelled or shipped status may not be updated. The body of this request should specify an array of Order objects (maximum of 100 per request).

curl -i -X POST \
  -u <username>:<password> \
  https://ssapi.shipstation.com/orders/createorders \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "orderNumber": "TEST-ORDER-API-DOCS-01",
      "orderKey": "0f6bec18-3e89-4881-83aa-f392d84f4c74",
      "orderDate": "2015-06-29T08:46:27.000Z",
      "orderStatus": "awaiting_shipment",
      "customerEmail": "headhoncho@whitehouse.gov",
      "shipTo": {
        "name": "The President",
        "company": "US Govt",
        "street1": "1600 Pennsylvania Ave",
        "city": "Washington",
        "state": "DC",
        "postalCode": "20500",
        "country": "US"
      },
      "items": [
        {
          "sku": "ABC123",
          "name": "Test item #1",
          "quantity": 2,
          "unitPrice": 99.99
        }
      ]
    },
    {
      "orderNumber": "TEST-ORDER-API-DOCS-02",
      "orderKey": "0d6bec18-3e79-4981-83ca-f392d84f4c19",
      "orderDate": "2015-06-29T08:46:27.000Z",
      "orderStatus": "awaiting_shipment",
      "customerEmail": "headhoncho@whitehouse.gov",
      "shipTo": {
        "name": "The President",
        "street1": "1600 Pennsylvania Ave",
        "city": "Washington",
        "state": "DC",
        "postalCode": "20500",
        "country": "US"
      },
      "items": [
        {
          "sku": "XYZ789",
          "name": "Test item #2",
          "quantity": 1,
          "unitPrice": 49.99
        }
      ]
    }
  ]'
Loading...