> 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

# ListDynamicItemPages

# Package: richContent

# Namespace: RicosSiteContext

# Method link: https://dev.wix.com/docs/api-reference/assets/rich-content/site-context-v1/list-dynamic-item-pages.md

## Permission Scopes:
Read Site Context for Rich Content: SCOPE.DC-RICOS.READ-SITE-CONTEXT

## Introduction

Lists the item pages of a dynamic page, with cursor paging.

Specify the `path` of a dynamic page that [List Dynamic Pages](https://dev.wix.com/docs/api-reference/assets/rich-content/site-context-v1/list-dynamic-pages.md) returns as `prefix`, and its `id` as `pageId`.

Item pages are read from the published version of the site. If the `published` field of the response is `false`, item pages aren't available yet.

If `prefix` or `pageId` doesn't match a dynamic page of the site, no item pages are returned.

---

## REST API

### Schema

```
 Method: listDynamicItemPages
 Description: Lists the item pages of a dynamic page, with cursor paging.  Specify the `path` of a dynamic page that [List Dynamic Pages](https://dev.wix.com/docs/api-reference/assets/rich-content/site-context-v1/list-dynamic-pages.md) returns as `prefix`, and its `id` as `pageId`.  Item pages are read from the published version of the site. If the `published` field of the response is `false`, item pages aren't available yet.  If `prefix` or `pageId` doesn't match a dynamic page of the site, no item pages are returned.
 URL: https://www.wixapis.com/ricos/v1/site-context/dynamic-item-pages/list
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  prefix
 Method parameters: 
   param name: pageId | type: pageId | description: `id` of the dynamic page, as [List Dynamic Pages](https://dev.wix.com/docs/api-reference/assets/rich-content/site-context-v1/list-dynamic-pages.md) returns it. It's not the `id` of an item page. Specify `pageId` to list only the item pages of that dynamic page. If you omit it, the item pages of all dynamic pages with this `prefix` are returned.  | validation: maxLength 300
   param name: paging | type: CursorPaging | description: Cursor-based pagination parameters for listing requests.  
        - name: limit | type: integer | description: Number of items to load per page.  | validation: minimum 0, maximum 100, format int32
        - name: cursor | type: string | description: Cursor token for pagination. Use the cursor from the previous response to get the next page of results.  | validation: maxLength 16000
   param name: prefix | type: prefix | description: `path` of the dynamic page, as [List Dynamic Pages](https://dev.wix.com/docs/api-reference/assets/rich-content/site-context-v1/list-dynamic-pages.md) returns it. For example, `/items`. | required: true | validation: maxLength 256
 Return type: ListDynamicItemPagesResponse
  - name: items | type: array<SitePage> | description: Item pages of the dynamic page.  
     - name: id | type: string | description: Page GUID of a static page or a dynamic page. For an item page, this is an opaque key that identifies the item page. It isn't a page GUID or a collection item GUID, so don't specify it as `pageId` in [List Dynamic Item Pages](https://dev.wix.com/docs/api-reference/assets/rich-content/site-context-v1/list-dynamic-item-pages.md), and don't parse it.  | validation: maxLength 300
     - name: title | type: string | description: Page title. For an item page, the name of the item. Empty if the item has no name.  | validation: maxLength 1000
     - name: path | type: string | description: Path of the page within the site. Store `path`, not `url`, as the link target, because it doesn't depend on the site's domain.  Always starts with `/`. For example: + Static page: includes the paths of the parent pages. For example, `/about/team`. + Dynamic page: the path shared by its item pages. For example, `/items`. + Item page: the dynamic page's path followed by the item's path. For example, `/items/first-item`.  | validation: maxLength 2000
     - name: url | type: string | description: Full URL of the page: the site's base URL followed by `path`. Use it to display or preview the link, but don't store it.  | validation: maxLength 4000
     - name: hasItemPages | type: boolean | description: Whether the dynamic page is the template of the item pages, as opposed to the page that lists the items. Returned only for dynamic pages. `false` is also returned for a dynamic page that has no item pages. If the site isn't published, item pages aren't available yet.  
  - name: published | type: boolean | description: Whether the site is published. If `false`, item pages aren't available yet, and page URLs can't be reached by visitors yet.  
  - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata. To retrieve the next page of results, specify `cursors.next` in `paging.cursor`.  
     - name: count | type: integer | description: Number of items returned in the current response.  | validation: format int32
     - name: cursors | type: Cursors | description: Navigation cursors for moving between result pages.  
        - name: next | type: string | description: Cursor for retrieving the next page of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor for retrieving the previous page of results.  | validation: maxLength 16000
     - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page.  

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: SITE_CONTEXT_INVALID_CURSOR | Description: The paging cursor is invalid or expired. Start again without a cursor.


```

### Examples

### List dynamic item pages
Retrieves the item pages of a dynamic page

```curl
curl -X POST \
'https://www.wixapis.com/ricos/v1/site-context/dynamic-item-pages/list' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "prefix": "/items",
  "paging": {
    "limit": 50
  }
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.richContent.ricosSiteContext.listDynamicItemPages(prefix, options)
 Description: Lists the item pages of a dynamic page, with cursor paging.  Specify the `path` of a dynamic page that [List Dynamic Pages](https://dev.wix.com/docs/api-reference/assets/rich-content/site-context-v1/list-dynamic-pages.md) returns as `prefix`, and its `id` as `pageId`.  Item pages are read from the published version of the site. If the `published` field of the response is `false`, item pages aren't available yet.  If `prefix` or `pageId` doesn't match a dynamic page of the site, no item pages are returned.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  prefix
 Method parameters: 
   param name: prefix | type: string | description: `path` of the dynamic page, as [List Dynamic Pages](https://dev.wix.com/docs/api-reference/assets/rich-content/site-context-v1/list-dynamic-pages.md) returns it. For example, `/items`. | required: true | validation: maxLength 256
   param name: options | type: ListDynamicItemPagesOptions  none  
        - name: pageId | type: string | description: `id` of the dynamic page, as [List Dynamic Pages](https://dev.wix.com/docs/api-reference/assets/rich-content/site-context-v1/list-dynamic-pages.md) returns it. It's not the `id` of an item page. Specify `pageId` to list only the item pages of that dynamic page. If you omit it, the item pages of all dynamic pages with this `prefix` are returned.  | validation: maxLength 300
        - name: paging | type: CursorPaging | description: Cursor paging options.  Default: `paging.limit` is `50`.  
           - name: limit | type: integer | description: Number of items to load per page.  | validation: minimum 0, maximum 100, format int32
           - name: cursor | type: string | description: Cursor token for pagination. Use the cursor from the previous response to get the next page of results.  | validation: maxLength 16000
 Return type: PROMISE<ListDynamicItemPagesResponse>
  - name: items | type: array<SitePage> | description: Item pages of the dynamic page.  
     - name: _id | type: string | description: Page GUID of a static page or a dynamic page. For an item page, this is an opaque key that identifies the item page. It isn't a page GUID or a collection item GUID, so don't specify it as `pageId` in [List Dynamic Item Pages](https://dev.wix.com/docs/api-reference/assets/rich-content/site-context-v1/list-dynamic-item-pages.md), and don't parse it.  | validation: maxLength 300
     - name: title | type: string | description: Page title. For an item page, the name of the item. Empty if the item has no name.  | validation: maxLength 1000
     - name: path | type: string | description: Path of the page within the site. Store `path`, not `url`, as the link target, because it doesn't depend on the site's domain.  Always starts with `/`. For example: + Static page: includes the paths of the parent pages. For example, `/about/team`. + Dynamic page: the path shared by its item pages. For example, `/items`. + Item page: the dynamic page's path followed by the item's path. For example, `/items/first-item`.  | validation: maxLength 2000
     - name: url | type: string | description: Full URL of the page: the site's base URL followed by `path`. Use it to display or preview the link, but don't store it.  | validation: maxLength 4000
     - name: hasItemPages | type: boolean | description: Whether the dynamic page is the template of the item pages, as opposed to the page that lists the items. Returned only for dynamic pages. `false` is also returned for a dynamic page that has no item pages. If the site isn't published, item pages aren't available yet.  
  - name: published | type: boolean | description: Whether the site is published. If `false`, item pages aren't available yet, and page URLs can't be reached by visitors yet.  
  - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata. To retrieve the next page of results, specify `cursors.next` in `paging.cursor`.  
     - name: count | type: integer | description: Number of items returned in the current response.  | validation: format int32
     - name: cursors | type: Cursors | description: Navigation cursors for moving between result pages.  
        - name: next | type: string | description: Cursor for retrieving the next page of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor for retrieving the previous page of results.  | validation: maxLength 16000
     - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page.  

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: SITE_CONTEXT_INVALID_CURSOR | Description: The paging cursor is invalid or expired. Start again without a cursor.


```

### Examples

### List dynamic item pages
Retrieves the item pages of a dynamic page.

```javascript
import { ricosSiteContext } from "@wix/rich-content";

async function listDynamicItemPages() {
  const response = await ricosSiteContext.listDynamicItemPages("/items", {
    pageId: "es8i1",
    paging: {
      limit: 50,
    },
  });
}

/* Promise resolves to:
 * {
 *   "items": [
 *     {
 *       "_id": "items/{title}_602471ba-1d5e-4177-acd3-d63655d8fdb9",
 *       "title": "First item",
 *       "path": "/items/first-item",
 *       "url": "https://username.wixsite.com/mysite/items/first-item"
 *     }
 *   ],
 *   "published": true,
 *   "pagingMetadata": {
 *     "count": 1,
 *     "hasNext": false
 *   }
 * }
 */

```

### listDynamicItemPages (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 { ricosSiteContext } from '@wix/rich-content';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function listDynamicItemPages(prefix,options) {
  const response = await myWixClient.ricosSiteContext.listDynamicItemPages(prefix,options);
};
```

---