> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# QueryBackInStockNotificationRequests

# Package: backInStock

# Namespace: BackInStockNotificationRequestService

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/other-services/back-in-stock/back-in-stock-notifications/query-back-in-stock-notification-requests?apiView=SDK.md

## Permission Scopes:
Manage Stores - all permissions: SCOPE.DC-STORES-MEGA.MANAGE-STORES

## Introduction

Retrieves a list of notification requests, given the provided paging, filtering, and sorting.

To learn about working with _Query_ endpoints, see
[API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language.md),
[Sorting and Paging](https://dev.wix.com/docs/rest/articles/get-started/sorting-and-paging.md),
and [Field Projection](https://dev.wix.com/docs/rest/articles/get-started/field-projection.md).

---

## REST API

### Schema

```
 Method: queryBackInStockNotificationRequests
 Description: Retrieves a list of notification requests, given the provided paging, filtering, and sorting.  To learn about working with _Query_ endpoints, see [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language.md), [Sorting and Paging](https://dev.wix.com/docs/rest/articles/get-started/sorting-and-paging.md), and [Field Projection](https://dev.wix.com/docs/rest/articles/get-started/field-projection.md).
 URL: https://www.wixapis.com/back-in-stock-service/v1/back-in-stock-notification-requests/query
 Method: POST
 Method parameters:
   param name: query | type: PlatformQuery    
     - name: cursorPaging | type: CursorPaging | description: Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`.  
        - name: limit | type: integer | description: Maximum number of items to return in the results.  | validation: minimum 0, maximum 100, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  | validation: maxLength 16000
        - name: filter | type: object | description: Filter object.  
        - name: sort | type: array<Sorting> | description: Sorting options. For example, `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]`.  
           - name: fieldName | type: string | description: Name of the field to sort by.  | validation: maxLength 512
           - name: order | type: SortOrder | description: Sort order.  
                 - enum: ASC, DESC
           - name: origin | type: AddressLocation | description: Origin point for geo-distance sorting on a GEO field results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).  
              - name: latitude | type: number | description: Address latitude.  | validation: format double
              - name: longitude | type: number | description: Address longitude.  | validation: format double
 Query fields:
   - field: id | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: contactId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: status | operators: $eq, $ne, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: autoNotified | operators: $eq, $ne, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: createdDate | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: itemUrl | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
 Return type: QueryBackInStockNotificationRequestsResponse
  - name: requests | type: array<BackInStockNotificationRequest> | description: Retrieved back in stock requests.  
     - name: id | type: string | description: Notification request GUID.  | read-only: true | validation: format GUID
     - name: catalogReference | type: CatalogReference | description: Catalog and item reference that the notification request is for.  Includes GUIDs for the catalog and item it came from, as well as additional, optional information.  Back in stock notifications only work for [Wix Stores](https://support.wix.com/en/article/wix-stores-about-wix-stores). The `appId` for Wix Stores is `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`.  
        - name: catalogItemId | type: string | description: GUID of the item within the catalog it belongs to.  | validation: minLength 1, maxLength 36
        - name: appId | type: string | description: GUID of the app providing the catalog.  You can get your app's GUID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).  For items from Wix catalogs, the following values always apply: + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`  | validation: minLength 1
        - name: options | type: object | description: Additional item details in `key:value` pairs.  Use this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items.  For Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration.md) or [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration.md), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction.md).  
     - name: email | type: string | description: Email address to send notification to about item being back in stock.  | validation: format EMAIL
     - name: contactId | type: string | description: Contact GUID for the contact with this `email`.  If a contact does not already exist with the email address submitted when creating this notification request, then a new contact is created. For more information about contacts, see the Contacts API.  | read-only: true | validation: format GUID
     - name: status | type: Status | description: Status of the notification.  `status` is set to `RECEIVED` when the notification request is created. The `status` changes once a notification email is sent for this request object: + When a notification email is sent through the site, either automatically or with the Report Items Back In Stock method, then the `status` is briefly set to `PROCESSING` and then set to `NOTIFICATION_SENT` if the email is successful, and `FAILED` if it fails. + When a notification email is sent offline, use the Mark As Notification Sent method to set `status` to `NOTIFICATION_SENT`.  | read-only: true 
         - enum: UNSPECIFIED, RECEIVED, PROCESSING, NOTIFICATION_SENT, FAILED
     - name: autoNotified | type: boolean | description: Whether a notification was sent automatically.  `autoNotified` is empty when the notification request is created and is not returned until the field has a value. `autoNotified` receives a value when a notification email is sent for this request object.  `autoNotified` sets to `TRUE` if the notification is sent through the site, either automatically or with the Report Items Back In Stock method. If the notification email is sent offline but the `status` is updated with the Mark As Notification Sent method, then `autoNotified` sets to `FALSE`.  | read-only: true 
     - name: createdDate | type: string | description: Date and time the notification request was created.  | read-only: true | validation: format date-time
     - name: itemUrl | type: string | description: Item URL for this notification request.  | validation: format WEB_URL
  - name: metadata | type: PlatformPagingMetadata | description: Details on the paged set of results returned.  
     - name: count | type: integer | description: The number of items returned in this response.  | validation: format int32
     - name: offset | type: integer | description: The offset which was requested. Returned if offset paging was used.  | validation: format int32
     - name: total | type: integer | description: The total number of items that match the query. Returned if offset paging was used.  | validation: format int32
     - name: cursors | type: Cursors | description: Cursors to navigate through result pages. Returned if cursor paging was used.  
        - name: next | type: string | description: Cursor string pointing to the next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000


```

### Examples

### Query back in stock notification requests by status
```curl
curl -X POST \
  'https://www.wixapis.com/back-in-stock-service/v1/back-in-stock-notification-requests/query' \
  -H 'Content-type: application/json' \
  -H 'Authorization: <AUTH>' \
  -d '{
    "query": {
      "filter": {
        "status": "RECEIVED"
      },
      "sort": [
        {
          "fieldName": "createdDate",
          "order": "ASC"
        }
      ],
      "paging": {
        "limit": 2
      }
    }
  }'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.ecom.backInStockNotifications.queryBackInStockNotificationRequests(query)
 Description: Retrieves a list of notification requests, given the provided paging, filtering, and sorting.  To learn about working with _Query_ endpoints, see [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language.md), [Sorting and Paging](https://dev.wix.com/docs/rest/articles/get-started/sorting-and-paging.md), and [Field Projection](https://dev.wix.com/docs/rest/articles/get-started/field-projection.md).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  query
 Method parameters: 
   param name: query | type: BackInStockNotificationRequestQuery   | required: true 
     - name: cursorPaging | type: CursorPaging | description: Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`.  
        - name: limit | type: integer | description: Maximum number of items to return in the results.  | validation: minimum 0, maximum 100, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  | validation: maxLength 16000
        - name: filter | type: object | description: Filter object.  
        - name: sort | type: array<Sorting> | description: Sorting options. For example, `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]`.  
           - name: fieldName | type: string | description: Name of the field to sort by.  | validation: maxLength 512
           - name: order | type: SortOrder | description: Sort order.  
                 - enum: ASC, DESC
           - name: origin | type: AddressLocation | description: Origin point for geo-distance sorting on a GEO field results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).  
              - name: latitude | type: number | description: Address latitude.  
              - name: longitude | type: number | description: Address longitude.  
 Query fields:
   - field: _id | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: contactId | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: status | operators: $eq, $ne, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: autoNotified | operators: $eq, $ne, $in, $exists | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: _createdDate | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: itemUrl | operators: $eq, $ne, $in, $exists, $gt, $gte, $lt, $lte, $startsWith | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
 Return type: PROMISE<QueryBackInStockNotificationRequestsResponse>
  - name: requests | type: array<BackInStockNotificationRequest> | description: Retrieved back in stock requests.  
     - name: _id | type: string | description: Notification request GUID.  | read-only: true | validation: format GUID
     - name: catalogReference | type: CatalogReference | description: Catalog and item reference that the notification request is for.  Includes GUIDs for the catalog and item it came from, as well as additional, optional information.  Back in stock notifications only work for [Wix Stores](https://support.wix.com/en/article/wix-stores-about-wix-stores). The `appId` for Wix Stores is `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`.  
        - name: catalogItemId | type: string | description: GUID of the item within the catalog it belongs to.  | validation: minLength 1, maxLength 36
        - name: appId | type: string | description: GUID of the app providing the catalog.  You can get your app's GUID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).  For items from Wix catalogs, the following values always apply: + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`  | validation: minLength 1
        - name: options | type: object | description: Additional item details in `key:value` pairs.  Use this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items.  For Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration.md) or [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration.md), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction.md).  
     - name: email | type: string | description: Email address to send notification to about item being back in stock.  | validation: format EMAIL
     - name: contactId | type: string | description: Contact GUID for the contact with this `email`.  If a contact does not already exist with the email address submitted when creating this notification request, then a new contact is created. For more information about contacts, see the Contacts API.  | read-only: true | validation: format GUID
     - name: status | type: Status | description: Status of the notification.  `status` is set to `RECEIVED` when the notification request is created. The `status` changes once a notification email is sent for this request object: + When a notification email is sent through the site, either automatically or with the Report Items Back In Stock method, then the `status` is briefly set to `PROCESSING` and then set to `NOTIFICATION_SENT` if the email is successful, and `FAILED` if it fails. + When a notification email is sent offline, use the Mark As Notification Sent method to set `status` to `NOTIFICATION_SENT`.  | read-only: true 
         - enum: UNSPECIFIED, RECEIVED, PROCESSING, NOTIFICATION_SENT, FAILED
     - name: autoNotified | type: boolean | description: Whether a notification was sent automatically.  `autoNotified` is empty when the notification request is created and is not returned until the field has a value. `autoNotified` receives a value when a notification email is sent for this request object.  `autoNotified` sets to `TRUE` if the notification is sent through the site, either automatically or with the Report Items Back In Stock method. If the notification email is sent offline but the `status` is updated with the Mark As Notification Sent method, then `autoNotified` sets to `FALSE`.  | read-only: true 
     - name: _createdDate | type: Date | description: Date and time the notification request was created.  | read-only: true 
     - name: itemUrl | type: string | description: Item URL for this notification request.  | validation: format WEB_URL
  - name: metadata | type: PlatformPagingMetadata | description: Details on the paged set of results returned.  
     - name: count | type: integer | description: The number of items returned in this response.  | validation: format int32
     - name: offset | type: integer | description: The offset which was requested. Returned if offset paging was used.  | validation: format int32
     - name: total | type: integer | description: The total number of items that match the query. Returned if offset paging was used.  | validation: format int32
     - name: cursors | type: Cursors | description: Cursors to navigate through result pages. Returned if cursor paging was used.  
        - name: next | type: string | description: Cursor string pointing to the next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000


```

### Examples

### queryBackInStockNotificationRequests
```javascript
import { backInStockNotifications } from '@wix/ecom';

async function queryBackInStockNotificationRequests(query) {
  const response = await backInStockNotifications.queryBackInStockNotificationRequests(query);
};
```

### queryBackInStockNotificationRequests (with elevated permissions)
```javascript
import { backInStockNotifications } from '@wix/ecom';
import { auth } from '@wix/essentials';

async function myQueryBackInStockNotificationRequestsMethod(query) {
  const elevatedQueryBackInStockNotificationRequests = auth.elevate(backInStockNotifications.queryBackInStockNotificationRequests);
  const response = await elevatedQueryBackInStockNotificationRequests(query);
}
```

### queryBackInStockNotificationRequests (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { backInStockNotifications } from '@wix/ecom';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { backInStockNotifications },
  // Include the auth strategy and host as relevant
});


async function queryBackInStockNotificationRequests(query) {
  const response = await myWixClient.backInStockNotifications.queryBackInStockNotificationRequests(query);
};
```

---