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:

Data Type Description
Order An array of Order objects (maximum of 100 per request).

Required

Example Request

POST /orders/createorders HTTP/1.1
Host: ssapi.shipstation.com
Authorization: __YOUR_AUTH_HERE__
Content-Type: application/json


[
  {
    "orderNumber": "TEST-ORDER-API-DOCS-01",
    "orderKey": "0f6bec18-3e89-4881-83aa-f392d84f4c74",
    "orderDate": "2015-06-29T08:46:27.0000000",
    "paymentDate": "2015-06-29T08:46:27.0000000",
    "shipByDate": "2015-07-05T00:00:00.0000000",
    "orderStatus": "awaiting_shipment",
    "customerId": 37701499,
    "customerUsername": "[email protected]",
    "customerEmail": "[email protected]",
    "billTo": {
      "name": "The President",
      "company": null,
      "street1": null,
      "street2": null,
      "street3": null,
      "city": null,
      "state": null,
      "postalCode": null,
      "country": null,
      "phone": null,
      "residential": null
    },
    "shipTo": {
      "name": "The President",
      "company": "US Govt",
      "street1": "1600 Pennsylvania Ave",
      "street2": "Oval Office",
      "street3": null,
      "city": "Washington",
      "state": "DC",
      "postalCode": "20500",
      "country": "US",
      "phone": "555-555-5555",
      "residential": true
    },
    "items": [
      {
        "lineItemKey": "vd08-MSLbtx",
        "sku": "ABC123",
        "name": "Test item #1",
        "imageUrl": null,
        "weight": {
          "value": 24,
          "units": "ounces"
        },
        "quantity": 2,
        "unitPrice": 99.99,
        "taxAmount": 2.5,
        "shippingAmount": 5,
        "warehouseLocation": "Aisle 1, Bin 7",
        "options": [
          {
            "name": "Size",
            "value": "Large"
          }
        ],
        "productId": 123456,
        "fulfillmentSku": null,
        "adjustment": false,
        "upc": "32-65-98"
      },
      {
        "lineItemKey": null,
        "sku": "DISCOUNT CODE",
        "name": "10% OFF",
        "imageUrl": null,
        "weight": {
          "value": 0,
          "units": "ounces"
        },
        "quantity": 1,
        "unitPrice": -20.55,
        "taxAmount": null,
        "shippingAmount": null,
        "warehouseLocation": null,
        "options": [],
        "productId": 123456,
        "fulfillmentSku": "SKU-Discount",
        "adjustment": true,
        "upc": null
      }
    ],
    "amountPaid": 218.73,
    "taxAmount": 5,
    "shippingAmount": 10,
    "customerNotes": "Please ship as soon as possible!",
    "internalNotes": "Customer called and would like to upgrade shipping",
    "gift": true,
    "giftMessage": "Thank you!",
    "paymentMethod": "Credit Card",
    "requestedShippingService": "Priority Mail",
    "carrierCode": "fedex",
    "serviceCode": "fedex_2day",
    "packageCode": "package",
    "confirmation": "delivery",
    "shipDate": "2015-07-02",
    "weight": {
      "value": 25,
      "units": "ounces"
    },
    "dimensions": {
      "units": "inches",
      "length": 7,
      "width": 5,
      "height": 6
    },
    "insuranceOptions": {
      "provider": "carrier",
      "insureShipment": true,
      "insuredValue": 200
    },
    "internationalOptions": {
      "contents": null,
      "customsItems": null
    },
    "advancedOptions": {
      "warehouseId": null,
      "nonMachinable": false,
      "saturdayDelivery": false,
      "containsAlcohol": false,
      "mergedOrSplit": false,
      "mergedIds": [],
      "parentId": null,
      "storeId": null,
      "customField1": "Custom data that you can add to an order. See Custom Fields #2 & #3 for more info!",
      "customField2": "Per UI settings, this information can appear on some carriers' shipping labels. See the link below",
      "customField3": "https://help.shipstation.com/hc/en-us/articles/206639957",
      "source": "Webstore",
      "billToParty": null,
      "billToAccount": null,
      "billToPostalCode": null,
      "billToCountryCode": null
    },
    "tagIds": [
      53974
    ]
  },
  {
    "orderNumber": "TEST-ORDER-API-DOCS-02",
    "orderKey": "0d6bec18-3e79-4981-83ca-f392d84f4c19",
    "orderDate": "2015-06-29T08:46:27.0000000",
    "paymentDate": "2015-06-29T08:46:27.0000000",
    "shipByDate": "2015-07-05T00:00:00.0000000",
    "orderStatus": "awaiting_shipment",
    "customerId": 37701499,
    "customerUsername": "[email protected]",
    "customerEmail": "[email protected]",
    "billTo": {
      "name": "The President",
      "company": null,
      "street1": null,
      "street2": null,
      "street3": null,
      "city": null,
      "state": null,
      "postalCode": null,
      "country": null,
      "phone": null,
      "residential": null
    },
    "shipTo": {
      "name": "The President",
      "company": "US Govt",
      "street1": "1600 Pennsylvania Ave",
      "street2": "Oval Office",
      "street3": null,
      "city": "Washington",
      "state": "DC",
      "postalCode": "20500",
      "country": "US",
      "phone": "555-555-5555",
      "residential": true
    },
    "items": [
      {
        "lineItemKey": "vd08-MSLbtx",
        "sku": "ABC123",
        "name": "Test item #1",
        "imageUrl": null,
        "weight": {
          "value": 24,
          "units": "ounces"
        },
        "quantity": 2,
        "unitPrice": 99.99,
        "taxAmount": 2.5,
        "shippingAmount": 5,
        "warehouseLocation": "Aisle 1, Bin 7",
        "options": [
          {
            "name": "Size",
            "value": "Large"
          }
        ],
        "productId": 123456,
        "fulfillmentSku": null,
        "adjustment": false,
        "upc": "32-65-98"
      },
      {
        "lineItemKey": null,
        "sku": "DISCOUNT CODE",
        "name": "10% OFF",
        "imageUrl": null,
        "weight": {
          "value": 0,
          "units": "ounces"
        },
        "quantity": 1,
        "unitPrice": -20.55,
        "taxAmount": null,
        "shippingAmount": null,
        "warehouseLocation": null,
        "options": [],
        "productId": 123456,
        "fulfillmentSku": "SKU-Discount",
        "adjustment": true,
        "upc": null
      }
    ],
    "amountPaid": 218.73,
    "taxAmount": 5,
    "shippingAmount": 10,
    "customerNotes": "Please ship as soon as possible!",
    "internalNotes": "Customer called and would like to upgrade shipping",
    "gift": true,
    "giftMessage": "Thank you!",
    "paymentMethod": "Credit Card",
    "requestedShippingService": "Priority Mail",
    "carrierCode": "fedex",
    "serviceCode": "fedex_2day",
    "packageCode": "package",
    "confirmation": "delivery",
    "shipDate": "2015-07-02",
    "weight": {
      "value": 25,
      "units": "ounces"
    },
    "dimensions": {
      "units": "inches",
      "length": 7,
      "width": 5,
      "height": 6
    },
    "insuranceOptions": {
      "provider": "carrier",
      "insureShipment": true,
      "insuredValue": 200
    },
    "internationalOptions": {
      "contents": null,
      "customsItems": null
    },
    "advancedOptions": {
      "warehouseId": null,
      "nonMachinable": false,
      "saturdayDelivery": false,
      "containsAlcohol": false,
      "mergedOrSplit": false,
      "mergedIds": [],
      "parentId": null,
      "storeId": null,
      "customField1": "Custom data that you can add to an order. See Custom Field #2 & #3 for more info!",
      "customField2": "Per UI settings, this information can appear on some carrier's shipping labels. See link below",
      "customField3": "https://help.shipstation.com/hc/en-us/articles/206639957",
      "source": "Webstore",
      "billToParty": null,
      "billToAccount": null,
      "billToPostalCode": null,
      "billToCountryCode": null
    },
    "tagIds": [
      53974
    ]
  }
]

Example Response

{
    "hasErrors": false,
    "results": [
        {
            "orderId": 168426889,
            "orderNumber": "TEST-ORDER-API-DOCS-01",
            "orderKey": "0f6bec18-3e89-4881-83aa-f392d84f4c74",
            "success": true,
            "errorMessage": null
        },
        {
            "orderId": 168432343,
            "orderNumber": "TEST-ORDER-API-DOCS-02",
            "orderKey": "0d6bec18-3e79-4981-83ca-f392d84f4c19",
            "success": true,
            "errorMessage": null
        }
    ]
}