> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt ## Resource: Wix Stores Collections ## Article: Wix Stores Collections ## Article Link: https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/wix-app-collections/wix-stores-collections.md ## Article Content: # Wix Stores Collections This article explains the fixed permissions and field structure for the following Wix Stores collections: - [AbandonedCarts](#abandonedcarts) - [Collections](#collections) - [InventoryItems](#inventoryitems) - [Orders](#orders) - [Products](#products) - [Variants](#variants) > **Note:** These collections are system collections, so you can't change their permissions in the CMS.
**Tip:** Before continuing, make sure you've read [Working with Wix App Collections](https://dev.wix.com/docs/develop-websites/articles/databases/wix-data/collections/working-with-wix-app-collections-and-code.md).
## AbandonedCarts This section explains the permissions and fields available in the AbandonedCarts collection. To use the AbandonedCarts collection in code, refer to it as `Stores/AbandonedCarts`. ::::tabs :::REST_TAB ``` curl -X POST \ 'https://www.wixapis.com/wix-data/v2/items/query' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -d '{ "dataCollectionId": "Stores/AbandonedCarts", "query": {} }' ``` ::: :::SDK_TAB ```js import { items } from "@wix/data"; items.query("Stores/AbandonedCarts") .find() .then((results) => { // handle the results }); ``` ::: ::::
**Important:** You can query up to 100 items from the AbandonedCarts collection. Trying to query more than 100 items by raising the query [limit](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language.md#paging) will result in an error.
### Permissions The AbandonedCarts collection has the following [permissions](https://support.wix.com/en/article/cms-collection-permissions-overview): - `read`: `ADMIN` - `create`: None - `update`: None - `remove`: None ### Fields > **Note:** This app collection contains read-only fields that cannot be managed from the collection. You can update the fields from the relevant app in your site’s [dashboard](https://support.wix.com/en/article/accessing-your-sites-dashboard). This section describes each field in this collection and its properties. Each field heading shows the field name followed by the field ID in parentheses, in the format "fieldName (`fieldId`)". The fields are listed in the same order as the collection's default order in the CMS. #### ID (`_id`) **Description:** The ID of the abandoned cart. This is a system field and is hidden by default. **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** Yes **Sortable:** Yes **Filter Support:** `eq`, `ne`, `hasSome`, `contains`, `startsWith` **Read-only:** Yes #### Buyer Info (`buyerInfo`) **Description:** Buyer information as a JSON object. **Type:** Object **Can connect to data:** No **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes > **Note:** In the example below, the `buyerInfo` object includes an `identityType` field. Its value is one of the following: > > - `MEMBER`: Buyer is a logged-in site member. > - `CONTACT`: A contact has been created for the buyer. ```json { "id": "4kf9ka09-4e9f-a02d-972f-9a5844d9d9a2", "identityType": "CONTACT", "firstName": "John", "lastName":"Doe", "phone": "5555555555", "email": "john.doe@somedomain.com" } ``` ::::tabs :::REST_TAB ``` curl -X POST \ 'https://www.wixapis.com/wix-data/v2/items/query' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -d '{ "dataCollectionId": "Stores/AbandonedCarts", "query": { "filter": { "buyerInfo.id": "5ceea2d0-a537-41dc-a51e-51fc8645afd9" } } }' ``` ::: :::SDK_TAB ```js // filter a dataset by Buyer Info ID import wixData from 'wix-data'; $w("#myDataset").setFilter(wixData.filter() .eq("buyerInfo.id", ["5ceea2d0-a537-41dc-a51e-51fc8645afd9"])) ``` ::: :::: #### Date Abandoned (`abandonTime`) **Description:** Time the cart was abandoned. **Type:** Date **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** Yes **Filter Support:** Yes **Read-only:** Yes #### Status (`status`) **Description:** Status of the abandoned cart. **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** Yes **Sortable:** Yes **Filter Support:** `eq`, `ne` **Read-only:** Yes > **Note:** The `status` field has one of the following values: > > - `ABANDONED` > - `RECOVERED` #### Activities (`activities`) **Description:** List of activities for this order in an array of JSON objects. **Type:** JSON **Can connect to data:** No **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes > **Note:** In the example below, each activity object includes a `type` field. Its value is one of the following: > > - `UNRECOGNIZED_TYPE` > - `SCHEDULED` > - `EMAIL_SENT` > - `EMAIL_NOT_SENT` > - `NOTIFICATION_SENT` > - `TASK_CREATED` > - `CUSTOM_ACTIVITY` ```json [ { "type": "SCHEDULED", "timestamp": "2019-01-28T15:43:28.986Z" }, { "type": "EMAIL_SENT", "timestamp": "2019-01-28T15:53:24.347Z" } ] ``` #### Total (`total`) **Description:** The order total. **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes ## Collections This section explains the permissions and fields available in the Collections collection. To use the Collections collection in code, refer to it as `Stores/Collections`. ::::tabs :::REST_TAB ``` curl -X POST \ 'https://www.wixapis.com/wix-data/v2/items/query' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -d '{ "dataCollectionId": "Stores/Collections", "query": {} }' ``` ::: :::SDK_TAB ```js import { items } from "@wix/data"; items.query("Stores/Collections") .find() .then((results) => { // handle the results }); ``` ::: ::::
**Important:** You can query up to 100 items from the Collections collection. Trying to query more than 100 items by raising the query [limit](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language.md#paging) will result in an error.
### Permissions The Collections collection has the following [permissions](https://support.wix.com/en/article/cms-collection-permissions-overview): - `read`: `ANYONE` - `create`: None - `update`: None - `remove`: None ### Fields > **Note:** This app collection contains read-only fields that cannot be managed from the collection. You can update the fields from the relevant app in your site’s [dashboard](https://support.wix.com/en/article/accessing-your-sites-dashboard). This section describes each field in this collection and its properties. Each field heading shows the field name followed by the field ID in parentheses, in the format "fieldName (`fieldId`)". #### ID (`_id`) **Description:** The collection ID that was created by the server. This is a system field and is hidden by default. This information also appears in the Products collection in a hidden field called "collections.id". You can copy the ID from here and then use it to query the Products collection by the collection ID. **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** Yes **Sortable:** Yes **Filter Support:** Yes **Read-only:** Yes #### Name (`name`) **Description:** The name of the collection. **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** Yes **Sortable:** Yes **Filter Support:** Yes **Read-only:** Yes #### Main Media (`mainMedia`) **Description:** Displays the main media item (image or video) for this collection as it appears in the Store Manager. **Type:** Image **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes ## InventoryItems This section explains the permissions and fields available in the InventoryItems collection. To use the InventoryItems collection in code, refer to it as `Stores/InventoryItems`. ::::tabs :::REST_TAB ``` curl -X POST \ 'https://www.wixapis.com/wix-data/v2/items/query' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -d '{ "dataCollectionId": "Stores/InventoryItems", "query": {} }' ``` ::: :::SDK_TAB ```js import { items } from "@wix/data"; items.query("Stores/InventoryItems") .find() .then((results) => { // handle the results }); ``` ::: ::::
**Important:** You can query up to 100 items from the InventoryItems collection. Trying to query more than 100 items by raising the query [limit](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language.md#paging) will result in an error.
### Permissions The InventoryItems collection has the following [permissions](https://support.wix.com/en/article/cms-collection-permissions-overview): - `read`: `ANYONE` - `create`: None - `update`: None - `remove`: None ### Fields > **Note:** This app collection contains read-only fields that cannot be managed from the collection. You can update the fields from the relevant app in your site’s [dashboard](https://support.wix.com/en/article/accessing-your-sites-dashboard). This section describes each field in this collection and its properties. Each field heading shows the field name followed by the field ID in parentheses, in the format "fieldName (`fieldId`)". #### ID (`_id`) **Description:** The inventory item ID (GUID) that was created by the server. This is a system field and is hidden by default. **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** `eq`, `ne`, `hasSome` **Read-only:** Yes #### Updated Date (`_updatedDate`) **Description:** Date and time the inventory item was last changed. **Type:** Date and Time **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** Yes **Filter Support:** `eq`, `ne`, `lt`, `lte`, `gt`, `gte`, `hasSome` **Read-only:** Yes #### External ID (`externalId`) **Description:** An external ID for the inventory ID in some other system. **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** `eq`, `ne`, `hasSome` **Read-only:** Yes #### Product ID (`productId`) **Description:** Unique identifier of the shopping cart. **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** **Sortable:** No **Filter Support:** `eq` **Read-only:** Yes #### Track Quantity (`trackQuantity`) **Description:** Indicates whether inventory is tracked for this item. **Type:** Boolean **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes #### Variants (`variants`) **Description:** Displays the defined inventory item's variants and its inventory tracking information as a complex JSON object. **Type:** Text **Can connect to data:** No **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes Format of the JSON object: ```json { "variantId" : "abc-123-456", "inStock" : true, "quantity" : 30 }, { "variantId" : "def-456-789", "inStock" : false }, { "variantId" : "ghi-789-000", "inStock" : true, "quantity" : 1 } ``` ## Orders This section explains the permissions and fields available in the Orders collection. To use the Orders collection in code, refer to it as `Stores/Orders`. ::::tabs :::REST_TAB ``` curl -X POST \ 'https://www.wixapis.com/wix-data/v2/items/query' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -d '{ "dataCollectionId": "Stores/Orders", "query": {} }' ``` ::: :::SDK_TAB ```js import { items } from "@wix/data"; items.query("Stores/Orders") .find() .then((results) => { // handle the results }); ``` ::: ::::
**Important:** You can query up to 100 items from the Orders collection. Trying to query more than 100 items by raising the query [limit](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language.md#paging) will result in an error.
### Permissions The Orders collection has the following [permissions](https://support.wix.com/en/article/cms-collection-permissions-overview): - `read`: `ADMIN` - `create`: None - `update`: None - `remove`: None ### Fields > **Note:** This app collection contains read-only fields that cannot be managed from the collection. You can update the fields from the relevant app in your site’s [dashboard](https://support.wix.com/en/article/accessing-your-sites-dashboard). This section describes each field in this collection and its properties. Each field heading shows the field name followed by the field ID in parentheses, in the format "fieldName (`fieldId`)". #### Number (`number`) **Description:** Running order number. **Type:** Number **Can connect to data:** Yes **Can use in dynamic page URL:** Yes **Sortable:** Yes **Filter Support:** `eq`, `ne`, `hasSome`, `le`, `lt`, `gt`, `ge` **Read-only:** Yes #### ID (`_id`) **Description:** The ID of the order. This is a system field and is hidden by default. **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** Yes **Filter Support:** `eq`, `ne`, `hasSome` **Read-only:** Yes #### Updated Date (`_updatedDate`) **Description:** The date and time the order was last updated. This is a system field and is hidden by default. **Type:** Date **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** Yes **Filter Support:** `eq`, `ne`, `hasSome`, `lt`, `le`, `gt`, `ge` **Read-only:** Yes #### Billing Info (`billingInfo`) **Description:** Billing information as a JSON object. **Type:** JSON **Can connect to data:** No **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes ```json { "address": { "formatted": "235 W 23rd St, NYC, New York 10011, USA", "city": "NYC", "country": "USA", "addressLine": "235 W 23rd St", "addressLine2": "Apt 3", "postalCode": "10011", "subdivision": "NY" } "firstName": "John", "lastName": "Doe", "email": "john.doe@somedomain.com", "phone": "5555555555", "company" : "Company Name", "vatId": { "number": "452.765.395-39", "type": "CPF" }, "paidDate": "2000-05-24T21:00:00.000Z", "paymentMethod": "VISA", "paymentGatewayTransactionId": "29A06193U6234935D", "paymentProviderTransactionId": "7c03ca74-eaf5-4541-8678-9b857634fdcb" } ``` #### Buyer Info (`buyerInfo`) **Description:** Buyer information as a JSON object. **Type:** JSON **Can connect to data:** No **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes > **Note:** In the example below, the `buyerInfo` object includes an `identityType` field. Its value is one of the following: > > - `MEMBER`: A logged-in site member. > - `CONTACT`: A Wix contact. ```json { "id": "4kf9ka09-4e9f-a02d-972f-9a5844d9d9a2", "identityType": "CONTACT", "firstName": "John", "lastName":"Doe", "phone": "5555555555", "email": "john.doe@somedomain.com" } ``` #### Buyer Note (`buyerNote`) **Description:** A note added by the buyer on the cart page when creating the order. **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes #### Date Created (`_dateCreated`) **Description:** Date and time the order was created. **Type:** Date **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** Yes **Filter Support:** `eq`, `ne`, `hasSome`, `lt`, `le`, `gt`, `ge` **Read-only:** Yes #### Currency (`currency`) **Description:** Currency of the order. **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes #### Fulfillment Status (`fulfillmentStatus`) **Description:** The status of the order's fulfillment. **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes > **Note:** The `fulfillmentStatus` field has one of the following values: > > - `FULFILLED`: Order was fulfilled successfully. > - `NOT_FULFILLED`: Order is not yet fulfilled. > - `CANCELLED`: Order was cancelled. > - `PARTIALLY_FULFILLED`: Order was partially fulfilled. #### Archived (`archived`) **Description:** Whether the order is archived. **Type:** Boolean **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** `eq`, `ne` **Read-only:** Yes #### Line Items (`lineItems`) **Description:** Lists all the line items for this order in an array of JSON objects. **Type:** JSON **Can connect to data:** No **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes > **Note:** The `lineItemType` field has one of the following values: > > - `PHYSICAL` > - `DIGITAL` > - `CUSTOM_AMOUNT_ITEM`: Item with a custom price. ```json [ { "index": 1, "quantity": 1, "discount": 0, "tax": 5, "taxGroupId": "4", "name": "Black T-Shirt", "translatedName": "Nombre traducido", "productId": "28e0d578-64ac-7c12-b675-d1944d1c4155", "sku": "364215376135191", "weight": 5.2, "lineItemType": "PHYSICAL", "notes": "Some notes here", "variantId": "0042-0005-a316f7c67df7", "fulfillerId": "0000-0420-0005-a3dcfd7e6930", "priceData": { "price": 35, "totalPrice": 40, "taxIncludedInPrice": true }, "options": [ { "option": "Color", "selection": "Red" }, { "option": "Size", "selection": "Small" } ], "customTextFields": [ { "title": "Notes for delivery", "value": "Please leave at front door" } ], "mediaItem": { "altText": "A description of the image", "id": "nsplsh_5386255~mv2_d_2977_3951_s_4_2.jpg", "externalImageUrl": "http://static.wixstatic...al_c,q_90/file.jpg", "src": "wix:image://v1/.../jpg#originWidth=1000&originHeight=1000", "type": "IMAGE" } }, ... ] ``` #### Activities (`activities`) **Description:** List of activities for this order in an array of JSON objects. **Type:** JSON **Can connect to data:** No **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes > **Note:** In the example below, each activity object includes a `type` field. Its value is one of the following: > > - `MERCHANT_COMMENT`: A merchant comment. > - `ORDER_PLACED`: Order placed. > - `ORDER_PAID`: Order marked as paid, either by the store owner (for offline orders) or when an online transaction is confirmed. > - `ORDER_FULFILLED`: Order shipping status set as fulfilled. > - `ORDER_NOT_FULFILLED`: Order shipping status set as not fulfilled. > - `DOWNLOAD_LINK_SENT`: Download link was sent (relevant for orders with digital line items). > - `PICKUP_READY_EMAIL_SENT`: Email notification for pickup was sent. > - `TRACKING_NUMBER_ADDED`: Shipping tracking number was set. > - `TRACKING_NUMBER_EDITED`: Shipping tracking number was edited. > - `TRACKING_LINK_WAS_SET`: Shipping tracking link was set. > - `SHIPPING_CONFIRMATION_EMAIL_SENT`: Email confirmation of the order shipment was sent. > - `INVOICE_WAS_SET`: Invoice was added to the order. > - `INVOICE_WAS_REMOVED`: Invoice was removed from the order. > - `INVOICE_WAS_SENT`: Invoice was sent to the customer via email. ```json [ { "type": "ORDER_PLACED", "timestamp": "2019-01-28T15:43:28.986Z" }, { "type": "MERCHANT_COMMENT", "author": "jane.doe@somedomain.com", "message": "Enjoy your purchase!", "timestamp": "2019-01-28T15:53:24.347Z" } ] ``` #### Payment Status (`paymentStatus`) **Description:** Status of the order's payment. **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** Yes **Filter Support:** `eq`, `ne`, `hasSome` **Read-only:** Yes > **Note:** The `paymentStatus` field has one of the following values: > > - `PAID` > - `NOT_PAID` > - `PARTIALLY_REFUNDED` > - `FULLY_REFUNDED` > > The `NOT_PAID` status is only for manual payment orders. Other non-paid orders, such as declined payments, do not appear in the Orders collection. #### Shipping Info (`shippingInfo`) **Description:** The order's shipping information as a JSON object. **Type:** JSON **Can connect to data:** No **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes > **Note:** In the `shippingInfo` object, either the `shipmentDetails` field or the `pickupDetails` field is present, but not both. The JSON example below shows both for illustration. ```json { "deliveryOption": "PPP", "estimatedDeliveryTime": "1 day", "shippingRegion": "Domestic", "shipmentDetails": { "address": { "formatted": "235 W 23rd St, NYC, New York 10011, USA", "city": "NYC", "country": "USA", "addressLine": "235 W 23rd St", "addressLine2": "Apt 3", "postalCode": "10011", "subdivision": "NY" }, "firstName": "John", "lastName": "Doe", "email": "john.doe@somedomain.com", "phoneNumber": "55555555555", "company" : "Some Company", "vatId": { "number": "294.593.590-21", "type": "CPF" }, }, "pickupDetails": { "buyerDetails": { "firstName": "John", "lastName": "Doe", "email": "john.doe@somedomain.com", "phoneNumber": "55555555555" }, "pickupInstructions": "Some instructions", "pickupAddress": { "formatted": "235 W 23rd St, NYC, New York 10011, USA" "city": "New York", "country": "USA", "addressLine": "235 W 23rd St", "postalCode": "10011", "subdivision": "NY" } } } ``` #### Totals (`totals`) **Description:** The order's total information as a JSON object. **Type:** JSON **Can connect to data:** No **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes ```json { "discount": 0.0, "quantity": 1, "shipping": 0.0, "subtotal": 1.0, "tax": 0.0, "total": 1.0, "weight": 0.0 } ``` #### Weight Unit (`weightUnit`) **Description:** The unit in which the order's weight is measured ("KG" or "LB"). **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes #### Custom Field (`customField`) **Description:** Information about a custom field added to the checkout process as a JSON object. **Type:** JSON **Can connect to data:** No **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes ```json { "title": "Notes for delivery", "translatedTitle": "Notas de entrega", "value": "Please call when outside" } ``` #### Fulfillments (`fulfillments`) **Description:** Lists of fulfillments for this order in an array of JSON objects. **Type:** JSON **Can connect to data:** No **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes ```json [ { "id": "8", "dateCreated": "2020-04-20T21:00:00.000Z", "lineItems": [ { "index": 1, "quantity": 1 } ], "trackingInfo": { "trackingNumber": "449044304137821", "shippingProvider": "FEDEX", "trackingLink": "https://www.fedex.com/...trackingnumber=449044304137821", } } ] ``` #### Buyer Language (`buyerLanguage`) **Description:** The site's displayed language. **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes #### Cart ID (`cartId`) **Description:** The shopping cart's unique ID. **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes #### Channel Info (`channelInfo`) **Description:** Information about the sales channel that submitted the order, as a JSON object. **Type:** JSON **Can connect to data:** No **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes ```json { "externalOrderId": "03-04896-40604", "externalOrderUrl": "http://www.eBay.com/sh/ord/details?orderid=03-04896-40604", "type": "EBAY" } ``` #### Entered By (`enteredBy`) **Description:** Information about the identity of the order's operator as a JSON object. **Type:** JSON **Can connect to data:** No **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes > **Note:** In the example below, the `enteredBy` object includes an `identityType` field. Its value is one of the following: > > - `USER`: Wix user who performed a POS transaction on behalf of the buyer. > - `MEMBER`: Logged-in site member. > - `CONTACT`: A Wix contact. ```json { "id": "f6c2c0f9-4e9f-a58d-a02d-9af2497294d9", "identityType": "MEMBER" } ``` #### Refunds (`refunds`) **Description:** Information about order refunds in an array of JSON objects. **Type:** JSON **Can connect to data:** No **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes > **Note:** In the example below, each refund object includes an `externalRefund` field: > > - `true`: The refund was processed by the payment provider and reported to the Wix Orders system. > - `false`: The refund was reported to the Wix Orders system but was not processed by the payment provider. ```json [ { "id": "caa2918c-6d38-08df-b484-09b702099e2b", "dateCreated": "2021-01-13T08:20:31.638Z", "amount": "26.4", "reason": "returned", "externalRefund": true, "paymentProviderTransactionId": "19615318-2134-4160-b886-cdde9c7ae88e" }, { "id": "7079923b-1c65-1c7a-37c9-3733de32ea1d", "dateCreated": "2021-01-13T08:26:09.419Z", "amount": "60.0", "externalRefund": false } ] ``` #### Subscription Information (`subscriptionInfo`) **Description:** Information about an order's subscription as a JSON object. **Type:** JSON **Can connect to data:** No **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes > **Note:** In the example below, the `subscriptionSettings` object inside `subscriptionInfo` includes a `frequency` field. Its value is one of the following: > > - `DAY`: Daily. > - `WEEK`: Weekly. > - `MONTH`: Monthly. > - `YEAR`: Yearly. ```json { "subscriptionInfo": { "id": "9275fb37-5377-434e-a484-6b6933896bc3", "cycleNumber": 3, "subscriptionSettings": { "frequency": "WEEK", "autoRenewal": true, "billingCycles": 1 }, "subscriptionOptionInfo": { "id": "0a7c4732-09c8-430c-b94e-f189cc0ce25a", "title": "Weekly", "description": "Weekly subscription" } } } ``` ## Products This section explains the permissions and fields available in the Products collection. To use the Products collection in code, refer to it as `Stores/Products`. ::::tabs :::REST_TAB ``` // Query all products curl -X POST \ 'https://www.wixapis.com/wix-data/v2/items/query' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -d '{ "dataCollectionId": "Stores/Products", "query": {} }' // Query all products, including variants curl -X POST \ 'https://www.wixapis.com/wix-data/v2/items/query' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -d '{ "dataCollectionId": "Stores/Products", "query": { "appOptions": { "includeVariants": true } } }' ``` ::: :::SDK_TAB ```js import { items } from "@wix/data"; // Query all products items .query("Stores/Products") .find() .then((results) => { // handle the results }); // Query all products, including variants items .query("Stores/Products") .find({ appOptions: { // Include product variants in the query. Defaults to `false`. includeVariants: true, }, }) .then((results) => { // handle the results }); ``` ::: ::::
**Important:** - You can query up to 100 items from the Products collection. Trying to query more than 100 items by raising the query [limit](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language.md#paging) will result in an error. - You can use up to 5 filters in one query. This limit can be extended by using the 'and' operator to combine queries.
By default, querying hidden products requires the appropriate permissions. To include hidden products in your query, set the `includeHiddenProducts` option to `true`. ::::tabs :::REST_TAB ``` curl -X POST \ 'https://www.wixapis.com/wix-data/v2/items/query' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -d '{ "dataCollectionId": "Stores/Products", "query": { "appOptions": { "includeVariants": true, "includeHiddenProducts": true } } }' ``` ::: :::SDK_TAB ```js import { items } from "@wix/data"; // Query all products, including variants and hidden products items.query("Stores/Products") .find({ appOptions: { // Include product variants in the query. Defaults to `false`. includeVariants: true, // Include hidden products in the query. Defaults to `false`. includeHiddenProducts: true } }) .then((results) => { // handle the results }); ``` ::: :::: ### Permissions The Products collection has the following [permissions](https://support.wix.com/en/article/cms-collection-permissions-overview): - `read`: `ANYONE` - `create`: None - `update`: None - `remove`: None ### Fields > **Note:** This app collection contains read-only fields that cannot be managed from the collection. You can update the fields from the relevant app in your site’s [dashboard](https://support.wix.com/en/article/accessing-your-sites-dashboard). This section describes each field in this collection and its properties. Each field heading shows the field name followed by the field ID in parentheses, in the format "fieldName (`fieldId`)". #### ID (`_id`) **Description:** The product ID (GUID) that was created by the server. This is a system field and is hidden by default. **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** Yes **Filter Support:** `eq`, `ne`, `hasSome`, `contains`, `startsWith` **Read-only:** Yes #### Name (`name`) **Description:** The name of the product. **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** Yes **Filter Support:** `eq`, `ne`, `hasSome`, `contains`, `startsWith` **Read-only:** Yes #### Updated Date (`_updatedDate`) **Description:** Date and time the product was last changed. **Type:** Date **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** Yes **Filter Support:** `eq`, `ne`, `lt`, `lte`, `gt`, `gte` **Read-only:** Yes #### Description (`description`) **Description:** The product description in rich text. **Type:** Rich text **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** `eq`, `ne`, `hasSome`, `contains`, `startsWith` **Read-only:** Yes #### Main Media (`mainMedia`) **Description:** Displays the main media item (image or video) for this product as it appears in the Store Manager. **Type:** Image **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes #### Media Items (`mediaItems`) **Description:** Lists all the media items available for this product in an array of JSON objects. **Type:** Media Gallery **Can connect to data:** No **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes ```json [ { type: "Image", src: "wix:image://v1/68d3a9_1de7529c444b4c9eb38401f8efe0cad2.jpg/flowers.jpg/#originWidth=1970&originHeight=1120", title: "title", description: "whatever first line\nthe second line.", link: "https://www.whatever.com", }, { type: "Video", src: "wix:video://v1/11062b_03c50f8fe4a34cc297a984e483a282ef/simpsons.mov#posterUri=96fbec_52cd5b00f7fd48e0a83bc1fb1dfb06ea.jpg &posterWidth=1920&posterHeight=1080", title: "title", description: "whatever first line\nthe second line.", link: "https://www.whatever.com", thumbnail: "wix:image://v1/68d3a9_1de7529c444b4c9eb38401f8efe0cad2.jpg/flowers.jpg/#originWidth=1970&originHeight=1120", }, ]; ``` #### SKU (`sku`) **Description:** The product's stock-keeping unit number. **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** Yes **Filter Support:** Yes **Read-only:** Yes #### Ribbon (`ribbon`) **Description:** The product's ribbon. Used to highlight relevant information about a product. For example, `"New Arrival"` or `"5 items left"`. > **Note:** The `ribbon` field replaces the deprecated `ribbons` field. **Type:** Text **Can connect to data:** No **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** No #### Currency (`currency`) **Description:** The product's currency. Because stores only have one currency, this value is the same for all products. **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes #### Price (`price`) **Description:** The product's price. **Type:** Number **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** Yes **Filter Support:** `eq`, `ne`, `hasSome`, `lt`, `lte`, `gt`, `gte` **Read-only:** Yes #### Discounted Price (`discountedPrice`) **Description:** The discounted price, if any. If no discount is configured, the full price is displayed. **Type:** Number **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes #### Formatted Price (`formattedPrice`) **Description:** The price formatted with the currency (e.g., $20). **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes #### Formatted Discounted Price (`formattedDiscountedPrice`) **Description:** The discounted price formatted with the currency (e.g., $15). **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes #### Price Per Unit (`pricePerUnit`) **Description:** The product's base price per unit, automatically calculated based on provided pricePerUnitData (e.g., 0.3). **Type:** Number **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** Yes **Filter Support:** No **Read-only:** Yes #### Formatted Price Per Unit (`formattedPricePerUnit`) **Description:** The product's base price per unit, formatted with the currency (e.g., $0.30) **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes #### Price Per Unit Data (`pricePerUnitData`) **Description:** Price per unit quantities and measurement units. **Type:** JSON **Can connect to data:** No **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** No ```json { "totalQuantity": 1, "totalMeasurementUnit": "KG", "baseQuantity": 100, "baseMeasurementUnit": "G" } ``` #### Track Inventory (`trackInventory`) **Description:** Indicates whether inventory is tracked for this product. **Type:** Boolean **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes #### In Stock (`inStock`) **Description:** Indicates whether the product is in stock. **Type:** Boolean **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes #### Quantity In Stock (`quantityInStock`) **Description:** The number of items currently in stock. Only relevant for products whose "TrackInventory" field is "True". **Type:** Number **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes #### Additional Info Sections (`additionalInfoSections`) **Description:** Displays the Additional Info sections you have in your store in an array of JSON objects. **Type:** JSON **Can connect to data:** No **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes ```json [ { "title": "PRODUCT INFO", "description": "I'm a product detail." }, ... ] ``` #### Product Options (`productOptions`) **Description:** Displays the defined product options and choices as a complex JSON object. Also supports easy querying and filtering. **Type:** JSON **Can connect to data:** No **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes You can query the Products collection and filter datasets connected to the collection based on the product options you have defined in your store. The product options are stored in a complex JSON object, with the choices for each option stored as an array of objects (see below). Rather than searching through each choice, you can use special syntax that only requires the product option name and the values of choices available for that option. You can filter this field using these functions: eq, ne, hasSome, hasAll. For example, if you have a product option called "Size," you can use `productOptions.size.value` in your code (note that the case of the name doesn't matter). If you have a product option called "Color," you use `productOptions.color.value`. You can also use any custom options you may have defined. The name you use is the name of the option in your store. ::::tabs :::REST_TAB ``` curl -X POST \ 'https://www.wixapis.com/wix-data/v2/items/query' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -d '{ "dataCollectionId": "Stores/Products", "query": { "filter": { "productOptions.color.value": { "$hasSome": ["#0000ff"] } } } }' ``` ::: :::SDK_TAB ```js // filter a dataset by color import wixData from 'wix-data'; $w("#myDataset").setFilter(wixData.filter() .hasSome('productOptions.color.value', ['#0000ff', ...]) ) // query the "Stores/Products" collection by color import { items } from "@wix/data"; items.query("Stores/Products") .hasSome('productOptions.color.value', ['#0000ff', ...]) .find() .then(console.log) ``` ::: :::: Format of the JSON object: ```json { "Option1": { "optionType": "color", "name": "Option1", "choices": [ { "value": "#0000ff", "mainMedia": "missing-media.png", "mediaItems": [], "inStock": true, "visible": true } ] ... }, "Option2": { "optionType": "drop_down", "name": "Size", "choices": [ { "value": "Large", "mainMedia": "wix:image://v1/anImage.jpg/file.jpg#originWidth=1000&originHeight=1000", "mediaItems": [ { "id": "anImage.jpg", "src": "wix:image://v1/anImage.jpg/file.jpg#originWidth=1000&originHeight=1000", "description": "", "title": "title", "type": "Image" }, ... ] "inStock": true, "visible": true }, ... ] } } ``` #### Product Page Url (`productPageUrl`) **Description:** Displays the URL for the product's page on your site. **Type:** URL **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes #### Manage Variants (`manageVariants`) **Description:** Indicates whether product variants are managed for this store. **Type:** Boolean **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes #### Custom Text Fields (`customTextFields`) **Description:** Displays any custom fields you may have set up in an array of JSON objects. **Type:** JSON **Can connect to data:** No **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes ```json [ { "title": "custom text", "maxLength": 500, "mandatory": true } ... ] ``` #### Product Type (`productType`) **Description:**The type of product (physical or digital). **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** Yes **Filter Support:** `eq`, `ne`, `hasSome`, `contains`, `startsWith` **Read-only:** Yes #### Slug (`slug`) **Description:** The product's slug, which is its URL-friendly name that is unique across the store. **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** Yes **Sortable:** Yes **Filter Support:** `eq`, `ne`, `hasSome`, `contains`, `startsWith` **Read-only:** Yes #### Weight (`weight`) **Description:** The product's weight. **Type:** Number **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes #### Collections (`collections`) **Description:** The collections the product belongs to. **Type:** Reference (Multiple Items) **Can connect to data:** No **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** `hasSome` **Read-only:** Yes #### Inventory Item (`inventoryItemId`) **Description:** The item's ID in the Stores/InventoryItems collection that corresponds to the product. **Type:** Text **Can connect to data:** No **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes #### Discount (`discount`) **Description:** Discount deducted from the product's original price. **Type:** JSON **Can connect to data:** No **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** No > **Note:** In the example below, the `discount` object includes a `type` field. Its value is one of the following: > > - `NONE`: Pass this value to remove a discount. > - `AMOUNT`: Discount amount. In the example below, the discount is 5 ($ / € / £ / ¥ / etc.), depending on the product's [currency](#currency-currency-1). > - `PERCENT`: Discount is a percentage. ```json { "type": "AMOUNT", "value": 5 } ``` #### Seo Data (`seoData`) **Description:** Lists any custom SEO data for the product as an array of SEO tag JSON objects. [Learn more.](https://support.wix.com/en/search?term=seo) **Type:** JSON **Can connect to data:** No **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** No ```json { "tags": [ { "type": "title", "children": "Indonesian Blend", "custom": false, "disabled": false }, { "type": "meta", "props": { "name": "description", "content": "Half Java Arabica, half Bali Robusta - big flavor with a biggish kick." }, "children": "", "custom": false, "disabled": false }, { "type": "meta", "props": { "name": "robots", "content": "index" }, "children": "", "custom": false, "disabled": false } ... ] } ``` #### Brand (`brand`) **Description:** Product brand. **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** Yes **Read-only:** Yes ## Variants This section explains the permissions and fields available in the Variants collection. To use the Variants collection in code, refer to it as `Stores/Variants`. ::::tabs :::REST_TAB ``` curl -X POST \ 'https://www.wixapis.com/wix-data/v2/items/query' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -d '{ "dataCollectionId": "Stores/Variants", "query": {} }' ``` ::: :::SDK_TAB ```js import { items } from "@wix/data"; items.query("Stores/Variants") .find() .then((results) => { // handle the results }); ``` ::: ::::
**Important:** You can query up to 100 items from the Variants collection. Trying to query more than 100 items by raising the query [limit](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language.md#paging) will result in an error.
### Permissions The Variants collection has the following [permissions](https://support.wix.com/en/article/cms-collection-permissions-overview): - `read`: `ANYONE` - `create`: None - `update`: None - `remove`: None ### Fields > **Note:** This app collection contains read-only fields that cannot be managed from the collection. You can update the fields from the relevant app in your site’s [dashboard](https://support.wix.com/en/article/accessing-your-sites-dashboard). This section describes each field in this collection and its properties. Each field heading shows the field name followed by the field ID in parentheses, in the format "fieldName (`fieldId`)". #### ID (`_id`) **Description:** The store variant ID (GUID) created by the server. It is a system field comprised of the product ID and the product variant ID, separated by a hyphen. **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** Yes **Sortable:** Yes **Filter Support:** `eq`, `ne`, `hasSome` **Read-only:** Yes #### Variant ID (`variantId`) **Description:** The variant ID (GUID) that was created by the server. **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** Yes **Filter Support:** `eq`, `ne`, `hasSome` **Read-only:** Yes #### Full Variant Name (`fullVariantName`) **Description:** The full name of the variant. **Type:** Text  **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes #### Product ID (`productId`) **Description:** The product ID (GUID) that was created by the server. **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** `eq`, `ne`, `hasSome` **Read-only:** Yes #### Variant Name (`variantName`) **Description:** The name of the variant. **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** `eq`, `ne`, `hasSome` **Read-only:** Yes #### Product Name (`productName`) **Description:** The name of the product. **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** `eq`, `ne`, `hasSome` **Read-only:** Yes #### Managed Variant (`managedVariant`) **Description:** Indicates whether the variant is being managed for the product - enables unique SKU, price, and weight per variant. Also affects inventory data. **Type:** Boolean **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** `eq` **Read-only:** Yes #### SKU (`sku`) **Description:** Variant stock-keeping unit number. **Type:** Text **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** `eq`, `ne`, `hasSome` **Read-only:** Yes #### Stock (`stock`) **Description:** Stock data for this variable in a JSON object. **Type:** JSON **Can connect to data:** No **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes ```json "stock": { "trackQuantity": true, "quantity": 50, "inStock": true } ``` #### Choices (`choices`) **Description:** Displays the defined product options and choices as a JSON object. **Type:** JSON **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes ```json { "Size": "Medium", "Color": "Black" } ``` #### Media (`media`) **Description:** Displays the main media item (image or video) for this product as it appears in the Store Manager. **Type:** Image **Can connect to data:** Yes **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** No **Read-only:** Yes #### Collections (`collections`) **Description:** The collections the variant belongs to. **Type:** Reference (Multiple Items) **Can connect to data:** No **Can use in dynamic page URL:** No **Sortable:** No **Filter Support:** Yes **Read-only:** Yes