POST

Query Orders


Deprecated

This method has been replaced with Search Orders, and will be removed on September 4, 2024.

Deprecation Notice:

This endpoint has been replaced with eCommerce Search Orders and will be removed on September 4, 2024.

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.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Stores - all permissions
Read Stores - all read permissions
Manage Orders
Read Orders
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/stores/v2/orders/query

Body Params
queryQuery

Query

Response Object
ordersArray <Order>

Order data


metadataMetadata

Paging metadata


totalResultsinteger

Total results

Query Orders Example 1
Request
cURL
curl 'https://www.wixapis.com/stores/v2/orders/query' \ --data-binary '{ "query": { "filter": "{\"paymentStatus\": \"PAID\"}", "paging": { "limit": 1 }, "sort": "[{\"number\": \"desc\"}]" } }' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>'
Response
JSON
{ "orders": [ { "id": "265c7d98-a7c3-48c4-89cd-bbdc00921eab", "number": 10108, "dateCreated": "2021-05-25T13:51:01.718Z", "buyerInfo": { "id": "f61f30cd-7474-47b7-95a2-339c0fcacbd3", "type": "CONTACT", "identityType": "CONTACT", "firstName": "Jane", "lastName": "Doe", "phone": "+1234567890", "email": "janedoe@gmail.com", "contactId": "f61f30cd-7474-47b7-95a2-339c0fcacbd3" }, "currency": "USD", "weightUnit": "KG", "totals": { "subtotal": "216.25", "shipping": "2.0", "tax": "8.22", "discount": "10.81", "total": "215.66", "weight": "1.5", "quantity": 5 }, "billingInfo": { "paymentMethod": "offline", "paymentGatewayTransactionId": "5c08a09b-867b-49bf-afeb-db59548419e0", "address": { "fullName": { "firstName": "Jane", "lastName": "Doe" }, "country": "US", "subdivision": "US-NY", "city": "New York", "zipCode": "10011", "phone": "+1234567890", "email": "janedoe@gmail.com", "addressLine1": "235 West 23rd Street", "addressLine2": "3rd floor" }, "paidDate": "2021-05-25T13:55:55.130Z" }, "shippingInfo": { "deliveryOption": "U.S Shipping", "estimatedDeliveryTime": "3 - 5 business days", "shippingRegion": "Region 3", "code": "a0fde0a4-6f4e-3716-64be-c0acbde1696a", "shipmentDetails": { "address": { "fullName": { "firstName": "Jane", "lastName": "Doe" }, "country": "US", "subdivision": "US-NY", "city": "New York", "zipCode": "10011", "phone": "+1234567890", "email": "janedoe@gmail.com", "addressLine1": "235 West 23rd Street", "addressLine2": "3rd floor" }, "trackingInfo": { "trackingNumber": "12345", "shippingProvider": "UPS", "trackingLink": "https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=12345" }, "discount": "0.0", "tax": "0.0", "priceData": { "taxIncludedInPrice": false, "price": "2.0" } } }, "read": true, "archived": false, "paymentStatus": "PAID", "fulfillmentStatus": "FULFILLED", "lineItems": [ { "index": 1, "quantity": 2, "price": "35.0", "name": "Indonesian Blend", "translatedName": "Indonesian Blend", "productId": "5376f9ec-b92e-efa9-e4a1-f4f480aa0d3a", "totalPrice": "70.0", "lineItemType": "PHYSICAL", "options": [ { "option": "Weight", "selection": "250g" }, { "option": "Ground for", "selection": "Stovetop" } ], "customTextFields": [ { "title": "What would you like written on the custom label?", "value": "Hope you enjoy the coffee! :)" } ], "mediaItem": { "mediaType": "IMAGE", "url": "https://static.wixstatic.com/media/nsplsh_316b6449475f3235386255~mv2_d_2977_3951_s_4_2.jpg/v1/fit/w_2977,h_3951,q_90/file.jpg", "width": 2977, "height": 3951, "mediaId": "nsplsh_316b6449475f3235386255~mv2_d_2977_3951_s_4_2.jpg", "id": "nsplsh_316b6449475f3235386255~mv2_d_2977_3951_s_4_2.jpg" }, "variantId": "00000000-0000-0020-0005-ad9cdc10d3b8", "discount": "3.5", "tax": "2.66", "taxIncludedInPrice": false, "priceData": { "taxIncludedInPrice": false, "price": "35.0", "totalPrice": "70.0" }, "refundedQuantity": 0 }, { "index": 2, "quantity": 3, "price": "48.75", "name": "Brazilian Arabica", "translatedName": "Brazilian Arabica", "productId": "0614129c-8777-9f3b-4dfe-b80a54df10d5", "totalPrice": "146.25", "lineItemType": "PHYSICAL", "options": [ { "option": "Weight", "selection": "500g" }, { "option": "Ground for", "selection": "Filter" } ], "customTextFields": [ { "title": "What would you like written on the custom label?", "value": "This is great for the filter method." } ], "weight": "0.5", "mediaItem": { "mediaType": "IMAGE", "url": "https://static.wixstatic.com/media/nsplsh_306d666a306a4a74306459~mv2_d_4517_2992_s_4_2.jpg/v1/fit/w_4517,h_2992,q_90/file.jpg", "width": 4517, "height": 2992, "mediaId": "nsplsh_306d666a306a4a74306459~mv2_d_4517_2992_s_4_2.jpg", "id": "nsplsh_306d666a306a4a74306459~mv2_d_4517_2992_s_4_2.jpg" }, "variantId": "00000000-0000-0040-0005-a316f7c67df7", "fulfillerId": "85e29287-a5bf-4c25-b303-a2ddc9d975e2", "discount": "7.31", "tax": "5.56", "taxIncludedInPrice": false, "priceData": { "taxIncludedInPrice": false, "price": "48.75", "totalPrice": "146.25" }, "refundedQuantity": 0 } ], "activities": [ { "type": "ORDER_PLACED", "timestamp": "2021-05-25T13:51:01.718Z" }, { "type": "TRACKING_NUMBER_ADDED", "timestamp": "2021-05-25T13:55:26.458Z" }, { "type": "TRACKING_NUMBER_ADDED", "timestamp": "2021-05-25T13:55:47.605Z" }, { "type": "ORDER_PAID", "timestamp": "2021-05-25T13:55:55.130Z" } ], "fulfillments": [ { "id": "80f939c8-cdc4-44fe-a058-b54d506af170", "dateCreated": "2021-05-25T13:55:26.458Z", "lineItems": [ { "index": 1, "quantity": 2 } ], "trackingInfo": { "trackingNumber": "12345", "shippingProvider": "ups", "trackingLink": "https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=12345" } }, { "id": "eb9138ff-1490-4dbc-b053-743240b9ab8f", "dateCreated": "2021-05-25T13:55:47.605Z", "lineItems": [ { "index": 2, "quantity": 3 } ], "trackingInfo": { "trackingNumber": "12345", "shippingProvider": "ups", "trackingLink": "https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=12345" } } ], "discount": { "value": "10.81", "appliedCoupon": { "couponId": "4294c3d3-1604-41b8-9ba5-119bb17d2d7d", "name": "5 percent - summer sale", "code": "SUMMERSALE5" } }, "cartId": "d56e7d15-0f07-4723-9069-c90c5cdec230", "channelInfo": { "type": "WEB" }, "enteredBy": { "id": "f61f30cd-7474-47b7-95a2-339c0fcacbd3", "identityType": "CONTACT" }, "lastUpdated": "2021-05-25T13:55:55.130Z", "numericId": "10108", "refunds": [], "isInternalOrderCreate": false } ], "metadata": { "items": 1, "offset": 0 }, "totalResults": 77 }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?