Stores Orders API allows third party apps to create and manage orders for Wix store owners.
Use this API to:
- Query the orders in the store
- Get a specific order
- Get notifications (via webhook) about new orders
- Create and update orders
-
Shipping orders: Order and shipment of any selection of products from the store's catalog.
-
Pickup orders: Order of any selection of products from the store's catalog for user pickup.
-
Point of Sale (POS) orders: Sale consisting only of price and partial billing information, of products not included in the store's catalog.
Endpoints that allow querying follow these format guidelines.
Field | Operators | Sorting Allowed |
---|---|---|
dateCreated | $eq,$ne,$hasSome,$lt,$lte,$gt,$gte | Allowed |
lastUpdated | $eq,$ne,$hasSome,$lt,$lte,$gt,$gte | Allowed |
paymentStatus | $eq,$ne,$hasSome | |
archived | $eq,$ne | |
number | $eq,$ne,$hasSome,$lt,$lte,$gt,$gte | Allowed |
fulfillmentStatus | $eq,$ne,$hasSome | |
id | $eq,$ne,$hasSome | |
lineItems.productId | $eq,$ne,$hasSome,$hasAll | |
lineItems.name | $eq,$ne,$hasSome,$hasAll | |
billingInfo.address.fullName | $eq,$ne,$hasSome,$contains,$startsWith | |
buyerInfo.id | $eq,$ne,$hasSome | |
channelInfo.type | $eq,$ne,$hasSome | |
enteredBy.id | $eq,$ne,$hasSome | |
channelInfo.externalOrderId | $eq,$ne,$hasSome |
** Note that "HasSome" is same as the operator "IN" in SQL
Get all paid orders
Copy Code
curl 'https://www.wixapis.com/stores/v2/orders/query' --data-binary '{"query":{"filter":"{\"paymentStatus\": \"PAID\"}"}}' -H 'Content-Type: application/json' -H 'Authorization: XXX'
Get all orders, sorted by creation time
Copy Code
curl 'https://www.wixapis.com/stores/v2/orders/query' --data-binary '{"query":{"sort":"[{\"dateCreated\": \"asc\"}]"}}' -H 'Content-Type: application/json' -H 'Authorization: XXX'
Get orders updated within a specific timeframe
Copy Code
curl 'https://www.wixapis.com/stores/v2/orders/query' --data-binary '{"query": {"filter": "{\"$and\": [{\"lastUpdated\":{\"$lte\":1588110826000}}, {\"lastUpdated\":{\"$gte\":1585518845000}}]}", "sort": "[{\"number\":\"asc\"}]" }}' -H 'Content-Type: application/json' -H 'Authorization: XXX'
Get orders by IDs
Copy Code
curl 'https://www.wixapis.com/stores/v2/orders/query' --data-binary '{"query":{"filter":"{\"id\": {\"$hasSome\": [\"ORDER_ID_1\",\"ORDER_ID_2\"]}}"}}' -H 'Content-Type: application/json' -H 'Authorization: xxx'
Creates a new order.
Notes:
- 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
andbillingInfo.paymentMethod
parameters can only be passed when paymentStatus is PAID.- The
billingInfo
.address parameter is required unlesschannelInfo.type: "POS"
.- The
shippingInfo.shipmentDetails.address
parameter is required unless one of the following is true:
- The
shippingInfo.pickupDetails
is passed insteadchannelInfo.type: "POS"
- All order items are of type digital -
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"
.
Permission Scopes
For app development, you must have one of the following permission scopes:Updates the email address of a specified order's billing info. If shipping was selected as the delivery method, shipping info email will also be updated.
Permission Scopes
For app development, you must have one of the following permission scopes:Updates the shipping address of a specified order.
Permission Scopes
For app development, you must have one of the following permission scopes:Returns an order with the provided ID
Permission Scopes
For app development, you must have one of the following permission scopes:Returns a list of up to 100 orders, given the provided paging, sorting and filters. See Stores Pagination for more information. Hidden orders are not returned
Permission Scopes
For app development, you must have one of the following permission scopes:Creates a fulfillment (a subset of an order, with line items that are being shipped together) based on the body parameters passed with the request. If the site owner has requested it, calling this request will trigger an email to the customer (based on the Wix store settings)
Permission Scopes
For app development, you must have one of the following permission scopes:Updates an existing fulfillment
Permission Scopes
For app development, you must have one of the following permission scopes:Deletes an existing fulfillment
Permission Scopes
For app development, you must have one of the following permission scopes:Triggered when an order is created.
Event Body
Triggered when an order is paid.
Event Body
Triggered when an order is canceled.
Event Body
Triggered when an order is refunded.
Event Body
Triggered when a tracking number is added to a fulfillment.
Event Body
Triggered when a fulfillment is updated.
Event Body
Triggered when a fulfillment is deleted.