Search.../
  1. Home
  2. Getting Started
  3. Overview
Generate a test token to explore our APIs

Create Order

Creates a new order.
The following body params are required: totals.subtotal, totals.total, lineItems.quantity, lineItems.priceData, lineItems.name, channelInfo.type.
Only orders with the paymentStatus parameter set as PAID or NOT_PAID will show up in the site owner's Stores Orders tab in their dashboard.
The billingInfo.paymentProviderTransactionId and billingInfo.paymentMethod parameters can only be passed when paymentStatus is PAID.
The billingAddress parameter is required unless channelInfo.type = POS.
The shippingInfo.shipmentDetails.address parameter is required unless one of the following is true:

  1. the shippingInfo.pickupDetails is passed instead,
  2. channelInfo.type = POS,
  3. All order items are lineItems.lineItemType = digital.

When passing lineItems.variantId, lineItems.options is required. When passing lineItems.productId, lineItem.lineItemType is limited to PHYSICAL.
When not passing lineItems.productId, lineItem.lineItemType is limited to CUSTOM_AMOUNT_ITEM.

Authorization

This endpoint requires an authorization header - pass the access token from the OAuth installation flow.

Permissions

This endpoint requires the Manage Orders permission scope.

POST

https://www.wixapis.com/stores/v2/orders

Body Params

NAME
TYPE
DESCRIPTION
order
Required

object

Response Object

NAME
TYPE
DESCRIPTION
order

object

Status/Error Codes

The response will include an HTTP status code.

Was this helpful?

Create order example - full order

Request

curl

Copy Code
1curl 'https://www.wixapis.com/stores/v2/orders' \
2--data-binary '{
3 "order": {
4 "totals": {
5 "subtotal": "10",
6 "shipping": "3",
7 "tax": "3",
8 "discount": "1",
9 "total": "15"
10 },
11 "billingInfo": {
12 "paymentMethod": "PayPal",
13 "paymentProviderTransactionId": "tx_1806",
14 "address": {
15 "fullName": {
16 "firstName": "John",
17 "lastName": "Smith"
18 },
19 "country": "US",
20 "city": "New York",
21 "zipCode": "92544",
22 "phone": "+972 555234555",
23 "email": "Ivanushka@example.com"
24 }
25 },
26 "shippingInfo": {
27 "deliveryOption": "Express",
28 "estimatedDeliveryTime": "Today",
29 "shipmentDetails": {
30 "address": {
31 "fullName": {
32 "firstName": "John",
33 "lastName": "Smith"
34 },
35 "country": "US",
36 "city": "New York",
37 "zipCode": "92544",
38 "phone": "+972 555234555",
39 "email": "Ivanushka@example.com"
40 },
41 "tax": "1",
42 "priceData": {
43 "taxIncludedInPrice": false,
44 "price": "3"
45 }
46 }
47 },
48 "paymentStatus": "PAID",
49 "lineItems": [
50 {
51 "quantity": 2,
52 "discount": "1",
53 "tax": "1",
54 "name": "my product",
55 "productId": "a1f9d337-f831-4529-31e6-67db8fd4e1aa",
56 "lineItemType": "PHYSICAL",
57 "weight": "15",
58 "sku": "12345678",
59 "priceData": {
60 "taxIncludedInPrice": false,
61 "price": "5"
62 }
63 }
64 ],
65 "channelInfo": {
66 "type": "WEB"
67 }
68 }
69 }' \
70-H 'Content-Type: application/json' \
71-H 'Authorization: <AUTH>'

Response

json

1
2{"order": {
3 "id": "fedb19f5-bd4c-4bfc-b2d1-212538319611",
4 "number": 10096,
5 "dateCreated": "2020-03-18T16:47:59.222Z",
6 "currency": "USD",
7 "weightUnit": "LB",
8 "totals": {
9 "subtotal": "10",
10 "shipping": "3",
11 "tax": "3",
12 "discount": "1",
13 "total": "15",
14 "weight": "30",
15 "quantity": 2
16 },
17 "billingInfo": {
18 "paymentMethod": "PayPal",
19 "externalTransactionId": "tx_1806",
20 "paymentProviderTransactionId": "tx_1806",
21 "address": {
22 "fullName": {
23 "firstName": "John",
24 "lastName": "Smith"
25 },
26 "country": "US",
27 "city": "New York",
28 "zipCode": "92544",
29 "phone": "+972 555234555",
30 "email": "Ivanushka@example.com"
31 },
32 "paidDate": "2020-03-18T16:47:59.244Z"
33 },
34 "shippingInfo": {
35 "deliveryOption": "Express",
36 "estimatedDeliveryTime": "Today",
37 "shipmentDetails": {
38 "address": {
39 "fullName": {
40 "firstName": "John",
41 "lastName": "Smith"
42 },
43 "country": "US",
44 "city": "New York",
45 "zipCode": "92544",
46 "phone": "+972 555234555",
47 "email": "Ivanushka@example.com"
48 },
49 "discount": "0",
50 "tax": "1",
51 "priceData": {
52 "taxIncludedInPrice": false,
53 "price": "3"
54 }
55 }
56 },
57 "read": false,
58 "archived": false,
59 "paymentStatus": "PAID",
60 "fulfillmentStatus": "NOT_FULFILLED",
61 "lineItems": [ {
62 "index": 1,
63 "quantity": 2,
64 "name": "my product",
65 "productId": "a1f9d337-f831-4529-31e6-67db8fd4e1aa",
66 "lineItemType": "PHYSICAL",
67 "options": [],
68 "customTextFields": [],
69 "weight": "15",
70 "sku": "12345678",
71 "discount": "1",
72 "tax": "1",
73 "priceData": {
74 "taxIncludedInPrice": false,
75 "price": "5",
76 "totalPrice": "10"
77 }
78 }],
79 "activities": [
80 {
81 "type": "ORDER_PLACED",
82 "timestamp": "2020-03-18T16:47:59.222Z"
83 },
84 {
85 "type": "ORDER_PAID",
86 "timestamp": "2020-03-18T16:47:59.244Z"
87 }
88 ],
89 "fulfillments": [],
90 "discount": {"value": "1"},
91 "buyerLanguage": "en",
92 "channelInfo": {"type": "WEB"},
93 "enteredBy": {
94 "id": "e85274cf-047a-4989-baff-dac5e0c3971d",
95 "identityType": "USER"
96 },
97 "lastUpdated": "2020-03-18T16:47:59.244Z"
98}}
Create order example - minimum required fields