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

# Export Editors for Ordering

When you've received a `complete` request, you are likely to want to show the user some sort of cart. You can use our `export` method to get the data need to make an [Order Create](https://www.whcc.com/developer/docs/editor-api/ordering/index.html.md) request.

> Be sure to provide the correct `accountId`[claim](https://www.whcc.com/developer/docs/editor-api/authentication/index.html.md) on your request token in order to export the editor(s) which matches the editor's [`userId`](https://www.whcc.com/developer/docs/editor-api/create-editor/index.html.md). Only editors from the same `accountId` can be exported at once.

## PUT `/oas/editors/export`

Content-type: application/json

## curl

### Simple Example Request

The only required value is a single `editorId` in the `editors` array. Any required fields for OrderImport will be intialized to `null` and will need to be provided by your integration code otherwise the order will be rejected.

```shell
curl https://prospector.dragdrop.design/api/v1/oas/editors/export \
	-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.r3udhowqndkwqneoiqwndjwndei12u390912hrbfhaslkdjbqwiei21nbrhewiuornqwjkfhbaiwodnqwjkbdawuosdhowqubdfjkwbdusandbiwquebio12nedbwbaodpqwnebou12rbwkjalndawuobdnwqndfqwbdfoiwqndpiqwhfiwqnkjdlnwqdnioqwhniorqw3nfjwbaodnwdnqwopd" \
	-H "Accept: application/json" \
	-H "Content-Type: application/json" \
	-d '{"editors": [{ "editorId": "sampleEditorId" }]}'
```

### Detailed Example Request Payload

This more detailed payload allows the override and passthrough of certain commonly used fields for an Order Submit order. Providing as much data at this time allows you to directly use the `order` property in the response as the payload for [Order Import](https://www.whcc.com/developer/docs/order-submit-api/order-import/index.html.md).

```json
{
	"editors": [
		{
			"editorId": "sampleEditorId1",
			"quantity": 2,
			"orderAttributes": [
				548,
				545
			]
		},
		{
			"editorId": "sampleEditorId2",
			"quantity": 4
		},
		{
			"editorId": "sampleEditorId3"
		}
	],
	"orderAttributes": [
		96,
		554
	],
	"entryId": "SampleEntryId",
	"reference": "SampleReference",
	"shipToAddress": {
		"name": "Chris Hanline",
		"addr1": "2840 Lone Oak Parkway",
		"city": "Eagan",
		"state": "MN",
		"zip": "55121",
		"country": "US"
	},
	"shipFromAddress": {
		"name": "Returns Department",
		"addr1": "3432 Denmark Ave",
		"addr2": "Suite 390",
		"city": "Eagan",
		"state": "MN",
		"zip": "55123",
		"country": "US"
	}
}
```

- **`editors`** (array): An array containing one or many editors that you would like to summarize in a shopping cart, and export for OAS.
  - **`editorId`** (string): the id of the editor.
  - **`quantity`** (integer): a quantity override for an editor.
  - **`orderAttributes`** (array of integers): order attribute override for this editor's order
- **`orderAttributes`** (array of integers): An array of Order Attribute UIDs to apply to all orders
- **`entryId`** (string): The entry id for the collection of orders.
- **`reference`** (string): The reference string for all orders.
- **`shipToAddress`** (object): The recipient shipping address for all orders.
- **`shipFromAddress`** (object): Optional return address for all orders.

Additional information on several of these elements can be found in the [Order Import detailed documentation.](https://www.whcc.com/developer/docs/order-submit-api/order-request-schema/index.html.md)

### Example Response

```json
{
	"items": [
		{
			"id": "sampleEditorId2",
			"pricing": {
				"basePrice": 137,
				"markedUpPrice": 274,
				"unitBasePrice": 34.25,
				"markupAmount": 100,
				"markupType": "PERCENT",
				"quantity": 4,
				"code": "USD"
			},
			"editor": {
				"id": "sampleEditorId2",
				"productPreviews": {
					"10000": {
						"scale_256": "https://s3.amazonaws.com/image.renditions/sample-05e1-4a0a-a78d-95873dbd23be.jpeg",
						"scale_512": "https://s3.amazonaws.com/image.renditions/sample-c7f5-40d4-a9cd-7258fa226ce4.jpeg",
						"scale_1024": "https://s3.amazonaws.com/image.renditions/sample-3417-472b-8c3f-73ee54dadc01.jpeg",
						"name": "Main"
					}
				},
				"selectionsSummary": [
					{
						"id": "size",
						"label": "size",
						"name": "size",
						"description": "10×10"
					},
					{
						"id": "surface",
						"label": "surface",
						"name": "surface",
						"description": "Lustre Photo Matte surface"
					},
					{
						"id": "backing",
						"label": "backing",
						"name": "backing",
						"description": "¾″ Gatorboard Block"
					},
					{
						"id": "depth",
						"label": "depth",
						"name": "depth",
						"description": "⅜″ depth"
					}
				]
			}
		},
		{
			"id": "sampleEditorId3",
			"pricing": {
				"basePrice": 34.25,
				"markedUpPrice": 68.5,
				"unitBasePrice": 34.25,
				"markupAmount": 100,
				"markupType": "PERCENT",
				"quantity": 1,
				"code": "USD"
			},
			"editor": {
				"id": "sampleEditorId3",
				"productPreviews": {
					"10000": {
						"scale_256": "https://s3.amazonaws.com/image.renditions/sample-8318-4954-a0b1-eb2f3be53824.jpeg",
						"scale_512": "https://s3.amazonaws.com/image.renditions/sample-1d6b-4c84-9c57-79f00cfa3537.jpeg",
						"scale_1024": "https://s3.amazonaws.com/image.renditions/sample-dfed-40b2-8ceb-fef383f1f4b3.jpeg",
						"name": "Main"
					}
				},
				"selectionsSummary": [
					{
						"id": "size",
						"label": "size",
						"name": "size",
						"description": "10×10"
					},
					{
						"id": "surface",
						"label": "surface",
						"name": "surface",
						"description": "Lustre Photo Matte surface"
					},
					{
						"id": "backing",
						"label": "backing",
						"name": "backing",
						"description": "¾″ Gatorboard Block"
					},
					{
						"id": "depth",
						"label": "depth",
						"name": "depth",
						"description": "⅜″ depth"
					}
				]
			}
		},
		{
			"id": "sampleEditorId1",
			"pricing": {
				"basePrice": 285,
				"markedUpPrice": 285,
				"unitBasePrice": 142.5,
				"quantity": 2,
				"code": "USD"
			},
			"editor": {
				"id": "sampleEditorId1",
				"productPreviews": {
					"front_cover": {
						"scale_256": "https://s3.amazonaws.com/image.renditions/sample-0516-4e68-9ee6-64939b73d5fe.png",
						"scale_512": "https://s3.amazonaws.com/image.renditions/sample-3616-4ba7-be9d-b94997665394.png",
						"scale_1024": "https://s3.amazonaws.com/image.renditions/sample-21e1-4067-812f-7815146c85ec.png",
						"name": "Front Cover"
					}
				},
				"selectionsSummary": [
					{
						"id": "size",
						"label": "size",
						"name": "size",
						"description": "10x10"
					},
					{
						"id": "spread_count",
						"label": "spread_count",
						"name": "spread count",
						"description": "5 spreads"
					},
					{
						"id": "cover_material",
						"label": "cover_material",
						"name": "cover material",
						"description": "black premium leather Non-Padded Cover"
					},
					{
						"id": "endleaf_style",
						"label": "endleaf_style",
						"name": "endleaf style",
						"description": "Textured Black Endleaves"
					},
					{
						"id": "insert_boards",
						"label": "insert_boards",
						"name": "insert boards",
						"description": "Thick White Inserts"
					},
					{
						"id": "ba_paper_type",
						"label": "ba_paper_type",
						"name": "paper type",
						"description": "photo lustre paper"
					}
				]
			}
		}
	],
	"order": {
		"EntryId": "SampleEntryId",
		"Orders": [
			{
				"SequenceNumber": 1,
				"DropShipFlag": 1,
				"FromAddressValue": 2,
				"Reference": "SampleReference",
				"ShipToAddress": {
					"Name": "Chris Hanline",
					"Addr1": "2840 Lone Oak Parkway",
					"City": "Eagan",
					"State": "MN",
					"Zip": "55121",
					"Country": "US"
				},
				"ShipFromAddress": {
					"Name": "Returns Department",
					"Addr1": "3432 Denmark Ave",
					"Addr2": "Suite 390",
					"City": "Eagan",
					"State": "MN",
					"Zip": "55123",
					"Country": "US"
				},
				"OrderAttributes": [
					{
						"AttributeUID": 96
					},
					{
						"AttributeUID": 554
					}
				],
				"OrderItems": [
					{
						"ItemBookAttribute": null,
						"ItemAssets": [
							{
								"AssetPath": "https://projects.dragdrop.design/s3/uploads/sampleProjectId/sample-e0fc-46d7-9ae6-25f8d7018227.JPG",
								"DP2NodeID": "10000",
								"ImageHash": "015b2a68da28bf056e789ba7cd92f31f",
								"PrintedFileName": "sampleEditorId2-10000",
								"OffsetX": 50,
								"OffsetY": 50,
								"ImageRotation": 90,
								"X": 50,
								"Y": 50,
								"ZoomX": 100,
								"ZoomY": 66.54135338345864
							}
						],
						"ItemAttributes": [
							{
								"AttributeUID": 152
							},
							{
								"AttributeUID": 155
							},
							{
								"AttributeUID": 159
							}
						],
						"ProductUID": 186,
						"Quantity": 4,
						"EditorId": "sampleEditorId2"
					},
					{
						"ItemBookAttribute": null,
						"ItemAssets": [
							{
								"AssetPath": "https://projects.dragdrop.design/s3/uploads/sampleProjectId/sample-e0fc-46d7-9ae6-25f8d7018227.JPG",
								"DP2NodeID": "10000",
								"ImageHash": "015b2a68da28bf056e789ba7cd92f31f",
								"PrintedFileName": "sampleEditorId3-10000",
								"OffsetX": 50,
								"OffsetY": 50,
								"ImageRotation": 0,
								"X": 50,
								"Y": 50,
								"ZoomX": 100,
								"ZoomY": 100
							}
						],
						"ItemAttributes": [
							{
								"AttributeUID": 152
							},
							{
								"AttributeUID": 155
							},
							{
								"AttributeUID": 159
							}
						],
						"ProductUID": 186,
						"Quantity": 1,
						"EditorId": "sampleEditorId3"
					}
				]
			},
			{
				"SequenceNumber": 2,
				"DropShipFlag": 1,
				"FromAddressValue": 2,
				"Reference": "SampleReference",
				"ShipToAddress": {
					"Name": "Chris Hanline",
					"Addr1": "2840 Lone Oak Parkway",
					"City": "Eagan",
					"State": "MN",
					"Zip": "55121",
					"Country": "US"
				},
				"ShipFromAddress": {
					"Name": "Returns Department",
					"Addr1": "3432 Denmark Ave",
					"Addr2": "Suite 390",
					"City": "Eagan",
					"State": "MN",
					"Zip": "55123",
					"Country": "US"
				},
				"OrderAttributes": [
					{
						"AttributeUID": 548
					},
					{
						"AttributeUID": 545
					}
				],
				"OrderItems": [
					{
						"LayoutRotation": 0,
						"ItemBookAttribute": {
							"NumberOfPages": 5,
							"BookAttributeUID": 66
						},
						"ItemAssets": [
							{
								"AssetPath": "https://s3.amazonaws.com/sessions.dragdrop.design/editors/sampleEditorId1/previews/10000_V9C1M.jpg",
								"DP2NodeID": 10000,
								"ImageHash": "f75e28bd8672d6974ee8bd840e8375cc",
								"PrintedFileName": "sampleEditorId1-10000",
								"OffsetX": 50,
								"OffsetY": 50,
								"ImageRotation": 0,
								"X": 50,
								"Y": 50,
								"ZoomX": 100,
								"ZoomY": 100,
								"PageNumber": 1
							},
							{
								"AssetPath": "https://s3.amazonaws.com/sessions.dragdrop.design/editors/sampleEditorId1/previews/10000_QKZZV.jpg",
								"DP2NodeID": 10000,
								"ImageHash": "ffd3b58a94ed7a1fafe937bad742b771",
								"PrintedFileName": "sampleEditorId1-10000",
								"OffsetX": 50,
								"OffsetY": 50,
								"ImageRotation": 0,
								"X": 50,
								"Y": 50,
								"ZoomX": 100,
								"ZoomY": 100,
								"PageNumber": 2
							},
							{
								"AssetPath": "https://s3.amazonaws.com/sessions.dragdrop.design/editors/sampleEditorId1/previews/10000_2UCQV.jpg",
								"DP2NodeID": 10000,
								"ImageHash": "973d678bfbc4b5d5607790c6f53e9e71",
								"PrintedFileName": "sampleEditorId1-10000",
								"OffsetX": 50,
								"OffsetY": 50,
								"ImageRotation": 0,
								"X": 50,
								"Y": 50,
								"ZoomX": 100,
								"ZoomY": 100,
								"PageNumber": 3
							},
							{
								"AssetPath": "https://s3.amazonaws.com/sessions.dragdrop.design/editors/sampleEditorId1/previews/10000_B7ZXO.jpg",
								"DP2NodeID": 10000,
								"ImageHash": "65082721924a3eae11a2cb634433fd00",
								"PrintedFileName": "sampleEditorId1-10000",
								"OffsetX": 50,
								"OffsetY": 50,
								"ImageRotation": 0,
								"X": 50,
								"Y": 50,
								"ZoomX": 100,
								"ZoomY": 100,
								"PageNumber": 4
							},
							{
								"AssetPath": "https://s3.amazonaws.com/sessions.dragdrop.design/editors/sampleEditorId1/previews/10000_GCC8E.jpg",
								"DP2NodeID": 10000,
								"ImageHash": "61a314a8b0ed12f5a14460cc4f89abc0",
								"PrintedFileName": "sampleEditorId1-10000",
								"OffsetX": 50,
								"OffsetY": 50,
								"ImageRotation": 0,
								"X": 50,
								"Y": 50,
								"ZoomX": 100,
								"ZoomY": 100,
								"PageNumber": 5
							}
						],
						"ItemAttributes": [
							{
								"AttributeUID": 1011
							},
							{
								"AttributeUID": 2118
							},
							{
								"AttributeUID": 1035
							},
							{
								"AttributeUID": 1029
							},
							{
								"AttributeUID": 2119
							},
							{
								"AttributeUID": 539
							},
							{
								"AttributeUID": 2126
							},
							{
								"AttributeUID": 2719
							}
						],
						"ProductUID": 426,
						"Quantity": 1,
						"EditorId": "sampleEditorId1"
					}
				]
			},
			{
				"SequenceNumber": 3,
				"DropShipFlag": 1,
				"FromAddressValue": 2,
				"Reference": "SampleReference",
				"ShipToAddress": {
					"Name": "Chris Hanline",
					"Addr1": "2840 Lone Oak Parkway",
					"City": "Eagan",
					"State": "MN",
					"Zip": "55121",
					"Country": "US"
				},
				"ShipFromAddress": {
					"Name": "Returns Department",
					"Addr1": "3432 Denmark Ave",
					"Addr2": "Suite 390",
					"City": "Eagan",
					"State": "MN",
					"Zip": "55123",
					"Country": "US"
				},
				"OrderAttributes": [
					{
						"AttributeUID": 548
					},
					{
						"AttributeUID": 545
					}
				],
				"OrderItems": [
					{
						"LayoutRotation": 0,
						"ItemBookAttribute": {
							"NumberOfPages": 5,
							"BookAttributeUID": 66
						},
						"ItemAssets": [
							{
								"AssetPath": "https://s3.amazonaws.com/sessions.dragdrop.design/editors/sampleEditorId1/previews/10000_V9C1M.jpg",
								"DP2NodeID": 10000,
								"ImageHash": "f75e28bd8672d6974ee8bd840e8375cc",
								"PrintedFileName": "sampleEditorId1-10000",
								"OffsetX": 50,
								"OffsetY": 50,
								"ImageRotation": 0,
								"X": 50,
								"Y": 50,
								"ZoomX": 100,
								"ZoomY": 100,
								"PageNumber": 1
							},
							{
								"AssetPath": "https://s3.amazonaws.com/sessions.dragdrop.design/editors/sampleEditorId1/previews/10000_QKZZV.jpg",
								"DP2NodeID": 10000,
								"ImageHash": "ffd3b58a94ed7a1fafe937bad742b771",
								"PrintedFileName": "sampleEditorId1-10000",
								"OffsetX": 50,
								"OffsetY": 50,
								"ImageRotation": 0,
								"X": 50,
								"Y": 50,
								"ZoomX": 100,
								"ZoomY": 100,
								"PageNumber": 2
							},
							{
								"AssetPath": "https://s3.amazonaws.com/sessions.dragdrop.design/editors/sampleEditorId1/previews/10000_2UCQV.jpg",
								"DP2NodeID": 10000,
								"ImageHash": "973d678bfbc4b5d5607790c6f53e9e71",
								"PrintedFileName": "sampleEditorId1-10000",
								"OffsetX": 50,
								"OffsetY": 50,
								"ImageRotation": 0,
								"X": 50,
								"Y": 50,
								"ZoomX": 100,
								"ZoomY": 100,
								"PageNumber": 3
							},
							{
								"AssetPath": "https://s3.amazonaws.com/sessions.dragdrop.design/editors/sampleEditorId1/previews/10000_B7ZXO.jpg",
								"DP2NodeID": 10000,
								"ImageHash": "65082721924a3eae11a2cb634433fd00",
								"PrintedFileName": "sampleEditorId1-10000",
								"OffsetX": 50,
								"OffsetY": 50,
								"ImageRotation": 0,
								"X": 50,
								"Y": 50,
								"ZoomX": 100,
								"ZoomY": 100,
								"PageNumber": 4
							},
							{
								"AssetPath": "https://s3.amazonaws.com/sessions.dragdrop.design/editors/sampleEditorId1/previews/10000_GCC8E.jpg",
								"DP2NodeID": 10000,
								"ImageHash": "61a314a8b0ed12f5a14460cc4f89abc0",
								"PrintedFileName": "sampleEditorId1-10000",
								"OffsetX": 50,
								"OffsetY": 50,
								"ImageRotation": 0,
								"X": 50,
								"Y": 50,
								"ZoomX": 100,
								"ZoomY": 100,
								"PageNumber": 5
							}
						],
						"ItemAttributes": [
							{
								"AttributeUID": 1011
							},
							{
								"AttributeUID": 2118
							},
							{
								"AttributeUID": 1035
							},
							{
								"AttributeUID": 1029
							},
							{
								"AttributeUID": 2119
							},
							{
								"AttributeUID": 539
							},
							{
								"AttributeUID": 2126
							},
							{
								"AttributeUID": 2719
							}
						],
						"ProductUID": 426,
						"Quantity": 1,
						"EditorId": "sampleEditorId1"
					}
				]
			}
		]
	},
	"pricing": {
		"code": "USD",
		"totalOrderMarkedUpPrice": 627.5,
		"totalOrderBasePrice": 456.25
	}
}
```

- **`items`** (array): An array containing an entry for each editor passed into the endpoint.
  - **`id`** (string - 30): the id of the editor.
  - **`pricing`** (object): an object containing details about the price associated with this specific line item.
    - **`basePrice`** (float - 10): the base price of an editor not included any markup.
    - **`markedUpPrice`** (float - 10): the price of an editor include markup.
    - **`quantity`** (int - 4): the number of items being ordered.
    - **`unitBasePrice`** (float - 10): the base price of a single unit of the order. `UnitBasePrice * Quantity = BasePrice`
    - **`code`** (string - 3): the currency prices are being represented in, always returned in `USD`.
  - **`editor`** (object): Information about the editor, including previews, and a summary of selections made.
    - **`id`** (string - 30): the id of the editor.
    - **`productPreviews`** (object): an object containing previews of the final product constructed in the editor. These will potentially be PNGs (cards or albums) or JPEGS (simple editor products) based on if the product potentially contains transparency or not. We will often provide a variety of sizes appropriate for both normal and retina resolutions at various sizes.
    - **`selectionsSummary`** (object): an object containing a set of labels and descriptions that can be used to summarize the line items, or specific traits in a cart or order summary.
- **`order`** (object): An object which can be copied, verbatim, and submitted via our Order Submit API.
- **`pricing`** (object): An object containing details about the price associated with an overall response. This pricing does NOT include shipping or tax costs.
  - **`totalOrderBasePrice`** (float - 10): the base price of a response not included any markup.
  - **`totalOrderMarkedUpPrice`** (float - 10): the price of a response include markup.
  - **`code`** (string - 3): the currency prices are being represented in, always returned in `USD`.

## Legacy Payload

We have deprecated the original payload format for the `export` endpoint. If you are using this original payload format, we recommend updating your integration based on the format described above.

### Example Request

```shell
curl https://prospector.dragdrop.design/api/v1/oas/editors/export \
	-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.r3udhowqndkwqneoiqwndjwndei12u390912hrbfhaslkdjbqwiei21nbrhewiuornqwjkfhbaiwodnqwjkbdawuosdhowqubdfjkwbdusandbiwquebio12nedbwbaodpqwnebou12rbwkjalndawuobdnwqndfqwbdfoiwqndpiqwhfiwqnkjdlnwqdnioqwhniorqw3nfjwbaodnwdnqwopd" \
	-H "Accept: application/json" \
	-H "Content-Type: application/json" \
	-d '{"editorIds": ["vstpieXAAr66mFkrR"]}'
```