Creating an Order

After a user has finished the editor process, typically you want to show a cart. Creating an order will return the information needed to create that cart experience.

POST /orders

Content-type: application/json

curl

CURL Example Request
1
2
3
4
5
curl https://prospector.dragdrop.design/api/v1/orders \
	-H "Authorization: Bearer TOKEN_GOES_HERE" \
	-H "Accept: application/json" \
	-H "Content-Type: application/json" \
	-d '{"editorIds": ["AN_EDITOR_ID"], "submit": false}'
Example Request Payload
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
    "editorIds": ["Editor_id", "Another_editor_id"],
    "submit": false,
    "instructions": "Special instructions go here.",
    "reference": "A reference message or number",
    "shippingType": "dropship",
    "shippingPriority": "dropship_lowest_cost",
    "shippingAddress": {
        "name": "John Smith",
        "email": "john.smith@whcc.com",
        "addr1": "2840 Lone Oak Pkwy",
        "addr2": "",
        "city": "Eagan",
        "state": "MN",
        "country": "US",
        "zip": "55121"
    },

}
Request Elements

editorIds

Array[string - 255]

An array of editor id strings.

submit

boolean (Default: true)

Whether the order should be immediately submitted and processed.

instructions

string - 255

Special instructions our customer service team needs to know to complete the order.

reference

string - 255

A reference string or number for your usage.








Example Response
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
    {
        "id": "MPhxMhg3in23swKPN",
        "accountId": "an_account_id", // The account id the bearer token was created with.
        "items": [
            {
                "id": "inraB3jJQ5L8z98Ju",
                "type": "editor",
                "productId": "nq4XtJMZMW4d3bfjM",
                "label": "5x7 Flat Card Vertical",
                "quantity": 25,
                "selectionsSummary": [
                    {
                        "label": "paper_types",
                        "description": "standard semi-gloss paper types paper"
                    },
                    {
                        "label": "envelopes",
                        "description": "white envelopes"
                    }
                ],
                "productPreviews": {
                    "10000": {
                        "scale_256": "https://s3.amazonaws.com/image.renditions-prod/918758fc-6259-4b94-868d-62cef320da8e.png",
                        "scale_512": "https://s3.amazonaws.com/image.renditions-prod/02d206a9-a11f-4966-9c8c-33140c7568d8.png",
                        "scale_1024": "https://s3.amazonaws.com/image.renditions-prod/065c6427-63b1-4334-bb66-942607283a89.png",
                        "name": "Front"
                    },
                    "10001": {
                        "scale_256": "https://s3.amazonaws.com/image.renditions-prod/2bd913ea-513c-495b-a09b-b16fb4a316ce.png",
                        "scale_512": "https://s3.amazonaws.com/image.renditions-prod/a048caf4-9376-4ceb-b918-04e267df9c26.png",
                        "scale_1024": "https://s3.amazonaws.com/image.renditions-prod/d567044c-5e76-4446-badb-9d215f4ff518.png",
                        "name": "Back"
                    }
                },
                "unitPrice": {
                    "value": "0.77",
                    "code": "USD"
                },
                "totalPrice": {
                    "value": "19.25",
                    "code": "USD"
                },
                "createdOn": 1582216807449,
                "updatedOn": 1582216872357
            }
        ],
        "instructions": "",
        "options": {
            "shipping": [
                {
                    "id": "dropship_lowest_cost",
                    "type": "dropship",
                    "priority": "dropship_lowest_cost",
                    "label": "USA Drop Ship – Lowest Cost",
                    "price": {
                        "value": "7.50",
                        "code": "USD"
                    }
                },
                {
                    "id": "dropship_two_day",
                    "type": "dropship",
                    "priority": "dropship_two_day",
                    "label": "USA Drop Ship – Expedited Shipping",
                    "price": {
                        "value": "9.95",
                        "code": "USD"
                    }
                },
                {
                    "id": "dropship_one_day_standard",
                    "type": "dropship",
                    "priority": "dropship_one_day_standard",
                    "label": "USA Drop Ship – One-Day Shipping, Standard",
                    "price": {
                        "value": "13.76",
                        "code": "USD"
                    }
                },
                {
                    "id": "dropship_one_day_priority",
                    "type": "dropship",
                    "priority": "dropship_one_day_priority",
                    "label": "USA Drop Ship – One-Day Shipping, Priority",
                    "price": {
                        "value": "17.92",
                        "code": "USD"
                    }
                }
            ]
        },
        "reference": "",
        "shippingType": "dropship",
        "packagingType": null,
        "shippingPriority": "dropship_lowest_cost",
        "shippingAddress": {
            "name": null,
            "email": null,
            "country": "US",
            "addr1": null,
            "addr2": null,
            "city": null,
            "state": null,
            "zip": null
        },
        "status": "order_staged",
        "totalPrice": {
            "value": "26.75",
            "code": "USD",
            "subtotals": {
                "product": {
                    "value": "19.25",
                    "code": "USD"
                },
                "packaging": null,
                "shipping": {
                    "label": "USA Drop Ship – Lowest Cost",
                    "value": "7.50",
                    "code": "USD",
                    "items": [
                        {
                            "label": "5x7 Flat Card Vertical",
                            "value": "7.50",
                            "code": "USD"
                        }
                    ]
                },
                "discount": null,
                "salesTax": null
            }
        },
        "validation": {
            "isValidForSubmit": false
        }
    }

What's Next

Configure Webhooks to get updates on the progress of your order(s)

Back to Top 👆
Get in Touch

Interested in integrating with WHCC? Tell us more about what you’re looking for and we’ll be in touch.