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

# Order Request Schema

This document outlines the format and fields that are passed in when creating an order request.

## Example Order Request JSON

```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
						}
					]
				}
			]
		}
	]
}
```

- **`SequenceNumber`** (String - 10, required): A way for you to reference the orders you are sending. This will be returned in all API requests and webhooks related to this order, but not visible to the end-user anywhere. We recommend some sort of unique identifier, such as an incrementing order ID.
- **`Reference`** (String - 32, optional): Your own identifier for this order that does not need to be unique. This will be visible on any order paperwork and the shipping label. If you have an order number your users can see, this would be a good place to include it.
- **`Instructions`** (String - 500, optional): Special order instructions for the order. We don't recommend using this for any production orders.
- **`SendNotificationEmailAddress`** (String - 128, optional): Email address for WHCC branded order received and shipping confirmation emails.
- **`SendNotificationEmailToAccount`** (Boolean, optional): Send WHCC branded order received and shipping confirmation emails to the email address attached to the WHCC account.
- **`ShipToAddress`** (Address, required): The ship to address for the order.
  - **`Name`** (String, required): The name of the person or business at the ship to address.
  - **`Attn`** (String, optional): Optional attention line for the ship to address.
  - **`Addr1`** (String, required): Line 1 of the ship to address.
  - **`Addr2`** (String, optional): Line 2 of the ship to address.
  - **`City`** (String, required): City of the ship to address.
  - **`State`** (String, required): ISO 3166-2 State, province or region of the ship to address.
  - **`Zip`** (String, required): Zip or postal code of the ship to address.
  - **`Country`** (String, required): ISO 3166-2 country of the ship to address.
  - **`Phone`** (String, optional): 10 digit, with no punctuation, phone number of the person or business at the ship to address. United States or Canada addresses only.
- **`ShipFromAddress`** (Address, required): A US-based address that is shown on the package. Some shipping methods will return undeliverable shipments to this address.
  - **`Name`** (String, required): The name of the person or business at the ship from address.
  - **`Addr1`** (String, required): Line 1 of the ship from address.
  - **`Addr2`** (String, optional): Line 2 of the ship from address.
  - **`City`** (String, required): City of the ship from address.
  - **`State`** (String, required): ISO 3166-2 State, province or region of the ship from address.
  - **`Zip`** (String, required): Zip or postal code of the ship from address.
  - **`Country`** (String, required): ISO 3166-2 country of the ship from address. We currently only support "US" for the ship from country.
  - **`Phone`** (String, optional): 10 digit, with no punctuation, phone number of the person or business at the ship from address.
- **`OrderAttributes`** (required): Collection of order-level attributes that make up the order. These will be shipping methods and packaging options.
  - **`AttributeUID`** (Integer, required): The `AttributeUID` of the Order Attribute (found in product catalog).
- **`OrderItems`** (required): Collection of items in the order. These will be the various prints and products you want in the order.
  - **`ProductUID`** (Integer, required): The `ProductUID` of the product being ordered (found in the catalog).
  - **`Quantity`** (Integer, required): How many identical copies of this product are needed.
  - **`LineItemID`** (String - 0-20, optional): Reference each line item.
  - **`ItemAssets`**: A collection of the assets associated with this order item.
    - **`ProductNodeID`** (Integer, required): Product node for the asset being specified.
    - **`AssetPath`** (String, required): WHCC-accessible URI of the image asset for this node.
    - **`ImageHash`** (String, required): MD5 hash of the image asset specified in `AssetPath`.
    - **`PrintedFilename`** (String, required): Filename of image asset to be printed on the back of some print products.
    - **`AssetEnhancement`** (String, optional): Add an [Image Enhancement](https://www.whcc.com/developer/docs/order-submit-api/image-enhancements/index.html.md) to this `ItemAsset` to automatically correct and optimize the image for printing.
    - **`AutoRotate`** (Boolean, required): Rotate this `ItemAsset` to fit the orientation of the `ProductUID` and center crop if the aspect ratio are different.
    - **`ImageRotation`** (String, optional): If `AutoRotate` is false, the rotation required to fit the on-disk orientation of this `ItemAsset` into the orientation of this `ProductUID`, either `0` or `90`.
    - **`X`** (Integer, optional): Asset cropping X value.
    - **`Y`** (Integer, optional): Asset cropping Y value.
    - **`ZoomX`** (Integer, optional): Asset cropping ZoomX value.
    - **`ZoomY`** (Integer, optional): Asset cropping ZoomY value.
  - **`ItemAttributes`**: A collection of item-level attributes associated with this product. These will specify the details of the print or product, like paper type and mounting or finishing options.
    - **`AttributeUID`** (Integer, required): The `AttributeUID` of the Item Attribute (found in the catalog).