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

**Legacy** This page is reference for integrations already built on the Order Submit API. It remains supported. New integrations use the [WHCC API](https://www.whcc.com/developer/docs/quick-start/index.html.md).

# 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": 548
				},
				{
					"AttributeUID": 553
				}
			],
			"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. A value longer than 32 characters is **silently truncated** on intake — 32 is the width fulfillment stores, so only the first 32 characters reach the paperwork, the label and WHCC support's order search. Send 32 or fewer. Every WHCC API documents the same 32-character cap. For an identifier that does not fit, see [Metadata & Reference](https://www.whcc.com/developer/docs/api/metadata/index.html.md).
- **`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.
- **`FromAddressValue`** (Integer, optional): Selects the from address for the shipment.

		1 = Address on your WHCC account

		2 = Address provided in `ShipFromAddress`**(Default)**

		3 = WHCC's address
		Use `1` when you cannot provide a US return address. `ShipFromAddress` is required only when this value is `2`.
- **`ShipFromAddress`** (Address, required): A US-based address that is shown on the package. Some shipping methods will return undeliverable shipments to this address. This field is required when `FromAddressValue` is `2`, which is the default. Set `FromAddressValue` to `1` to use the address on your WHCC account instead.
  - **`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/legacy/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`** (Float, optional): Horizontal position of the center of your image within the product node, as a percentage. Counted against an origin of `100`, so `50` is centered and *lower* values move your image's center toward the right, which means the print shows more of the left side of your image.
    - **`Y`** (Float, optional): Vertical position of the center of your image within the product node, as a percentage. Counted against an origin of `100`, so `50` is centered and *lower* values move your image's center toward the bottom, which means the print shows more of the top of your image.
    - **`ZoomX`** (Float, optional): Width of the cropped area, as a percentage of the source image width. `100` uses the full width; smaller values crop tighter. Note that your image's center (`X` and `Y`) is calculated *after* zoom is applied, not before.
    - **`ZoomY`** (Float, optional): Height of the cropped area, as a percentage of the source image height. `100` uses the full height; smaller values crop tighter.
  - **`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).