> Part of [WHCC Developer Documentation](https://www.whcc.com/developer/llms.txt)

# Order Import

## Requirements

Create an order request JSON object and POST the request JSON to this endpoint to start a new order.

> Your order will not be processed until you submit the order after importing using [`/api/OrderImport/Submit`](https://www.whcc.com/developer/docs/order-submit-api/order-submit/index.html.md).

## POST `/api/OrderImport`

## Curl Example

```shell
curl https://apps.whcc.com/api/OrderImport \
	-H "Authorization: Bearer 726670514499" \
	-H "Content-Type: application/json" \
	-d '{"EntryId":"12345","Orders":[{"SequenceNumber":1,"Instructions":null,"Reference":"OrderID 12345","SendNotificationEmailAddress":null,"SendNotificationEmailToAccount":true,"ShipToAddress":{"Name":"Chris Hanline","Attn":null,"Addr1":"2840 Lone Oak Parkway","Addr2":null,"City":"Eagan","State":"MN","Zip":"55121","Country":"US","Phone":"6516468263"},"ShipFromAddress":{"Name":"Returns Department","Addr1":"3432 Denmark Ave","Addr2":"Suite 390","City":"Eagan","State":"MN","Zip":"55123","Country":"US","Phone":"8002525234"},"OrderAttributes":[{"AttributeUID":96},{"AttributeUID":545}],"OrderItems":[{"ProductUID":2,"Quantity":1,"ItemAssets":[{"ProductNodeID":10000,"AssetPath":"https://whcc-api-testing.s3.amazonaws.com/sample-images/sample-image-1.jpg","ImageHash":"a9825bb0836325e07ccfed16751b1d07","PrintedFileName":"sample-image-1.jpg","AutoRotate":true}],"ItemAttributes":[{"AttributeUID":1},{"AttributeUID":5}]}]}]}'
```

## Example Order Request JSON

### For additional information, see the [detailed request documentation](https://www.whcc.com/developer/docs/order-submit-api/order-request-schema/index.html.md)

```json
{
	"EntryId": "12345",
	"Orders": [
		{
			"SequenceNumber": 1,
			"Instructions": null,
			"Reference": "OrderID 12345",
			"SendNotificationEmailAddress": null,
			"SendNotificationEmailToAccount": true,
			"ShipToAddress": {
				"Name": "Chris Hanline",
				"Attn": null,
				"Addr1": "2840 Lone Oak Parkway",
				"Addr2": null,
				"City": "Eagan",
				"State": "MN",
				"Zip": "55121",
				"Country": "US",
				"Phone": "6516468263"
			},
			"ShipFromAddress": {
				"Name": "Returns Department",
				"Addr1": "3432 Denmark Ave",
				"Addr2": "Suite 390",
				"City": "Eagan",
				"State": "MN",
				"Zip": "55123",
				"Country": "US",
				"Phone": "8002525234"
			},
			"OrderAttributes": [
				{
					"AttributeUID": 96
				},
				{
					"AttributeUID": 545
				}
			],
			"OrderItems": [
				{
					"ProductUID": 2,
					"Quantity": 1,
					"ItemAssets": [
						{
							"ProductNodeID": 10000,
							"AssetPath": "https://whcc-api-testing.s3.amazonaws.com/sample-images/sample-image-1.jpg",
							"ImageHash": "a9825bb0836325e07ccfed16751b1d07",
							"PrintedFileName": "sample-image-1.jpg",
							"AutoRotate": true,
							"AssetEnhancement": null
						}
					],
					"ItemAttributes": [
						{
							"AttributeUID": 1
						},
						{
							"AttributeUID": 5
						}
					]
				}
			]
		}
	]
}
```

## Example Response

```json
{
	"Account": "10072",
	"ConfirmationID": "d4bcb9a7-caf0-4d2b-aa18-674a5d2c527e",
	"EntryID": "",
	"Key": "B431BE78D2E9FFFE3709",
	"NumberOfOrders": 1,
	"Orders": [{
		"LineItems": [],
		"Note": "",
		"Products": [{
			"Price": "0.65",
			"ProductDescription": "Print Fulfillment 5x7",
			"Quantity": 1
		}, {
			"Price": "3.48",
			"ProductDescription": "Fulfillment Shipping - Economy",
			"Quantity": 1
		}],
		"SequenceNumber": "1",
		"SubTotal": "4.13",
		"Tax": "0.29",
		"Total": "4.42"
	}],
	"Received": "8/19/2018 4:34:01 PM Central Time"
}
```

- **`ConfirmationID`** (String): The ID for the order. This value is needed for the `/api/OrderImport/Submit` call to actually submit the order to be produced.
- **`Account`** (Integer): The WHCC account number this order will be produced under.
- **`NumberOfOrders`** (Integer): The number of orders included in this import.
- **`Received`** (String): The time the order was submitted.
- **`Orders`** (Array): Additional data about the potential orders in this import.
  - **`LineItems`** (Array): An array of LineItems this order contains.
  - **`SequenceNumber`** (String): Value submitted for SequenceNumber with order import request.
  - **`SubTotal`** (String): Cost of order before sales tax.
  - **`Tax`** (String): Sales tax amount for this order.
  - **`Total`** (String): Cost of order including sales tax.
  - **`Products`** (Array): An array of product billing items for this order.
    - **`ProductDescription`** (String): Description of the product billing item.
    - **`Quantity`** (Integer): Number of copies of this item.
    - **`Price`** (String): Price per item for the product billing item.

> ## What's Next
>
> [Submit](https://www.whcc.com/developer/docs/order-submit-api/order-submit/index.html.md) the `ConfirmationId` to confirm your order