## List site system pages

`GET /v1/sites/:id/system-pages`

Returns the site pages assigned to system roles: cart, checkout, customer account and others.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|----------|
| `id` (path) | number | yes | Site ID. List: [`GET /v1/sites`](/docs/entities/sites/list) |
| `active` (query) | boolean | no | `true` — only published pages that are not in the trash. Bindings of the other pages are kept but do not appear in the response. Default `false`: all bindings are returned |
| `scope` (query) | string | no | Internal landing scope: `KNOWLEDGE` / `GROUP` / `MAINPAGE`. Specify it if the site belongs to the corresponding scope. Otherwise `404 ENTITY_NOT_FOUND` is returned. Omit it for an ordinary site |

The method accepts no other query parameters: for example, `limit` returns `400 INVALID_PARAMS`. There is no pagination: a site has at most eight bindings — one per role.

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/sites/223/system-pages" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/sites/223/system-pages" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"
```

### JavaScript — personal key

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/sites/223/system-pages', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data } = await res.json()
const cart = data.find((row) => row.type === 'cart')
console.log('Cart:', cart ? cart.pageId : 'not assigned')
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/sites/223/system-pages', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { success, data } = await res.json()
```

## Response fields

| Field | Type | Description |
|------|-----|----------|
| `success` | boolean | Always `true` on success |
| `data` | array | Site bindings. Empty array for a site without bindings |
| `data[].type` | string | Role: `mainpage`, `catalog`, `personal`, `cart`, `order`, `payment`, `compare`, `feedback`. What each one means — [System pages](/docs/entities/sites/system-pages) |
| `data[].pageId` | number | ID of the page assigned to the role. Get the page: [`GET /v1/pages/:id`](/docs/entities/pages/get) |
| `data[].title` | string | Page title |
| `data[].deleted` | boolean | The page is in the trash |
| `data[].active` | boolean | The page is published |

## Response example

```json
{
  "success": true,
  "data": [
    {
      "type": "cart",
      "pageId": 2371,
      "title": "Docs test cart",
      "deleted": false,
      "active": false
    },
    {
      "type": "personal",
      "pageId": 2373,
      "title": "Docs test personal",
      "deleted": false,
      "active": false
    }
  ]
}
```

## Error response example

404 — no site with this ID:

```json
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Entity not found or not visible"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 400 | `INVALID_PARAMS` | `id must be a positive safe integer` — `id` is not a positive integer |
| 400 | `INVALID_PARAMS` | `active must be true or false` — `active` is neither `true` nor `false` |
| 400 | `INVALID_PARAMS` | `Unsupported query parameter` — a query parameter the method does not accept was passed |
| 400 | `INVALID_SCOPE` | `scope` is not `KNOWLEDGE`, `GROUP` or `MAINPAGE` |
| 404 | `ENTITY_NOT_FOUND` | No site with this ID, the site is not visible to the user, or it belongs to another scope: the wrong `scope` was passed |
| 409 | `LANDING_MODULE_NOT_ENABLED` | The Sites module is unavailable on this Bitrix24 account. Ask a Bitrix24 account administrator to enable it — until then a retry returns the same refusal |
| 422 | `BITRIX_ERROR` | Bitrix24 returned the binding list in an unexpected form: `Bitrix24 returned invalid system pages` |
| 403 | `SCOPE_DENIED` | The API key does not have the `landing` scope |
| 401 | `TOKEN_MISSING` | The API key has no configured tokens |

Full list of common API errors — [Errors](/docs/errors).

## Known specifics

- **The trash does not remove a binding.** A page moved to the trash keeps its role and is returned with `deleted: true` and `active: false`. After the page is restored from the trash, the binding stays the same. A role is removed only explicitly — [`DELETE /v1/sites/:id/system-pages/:type`](/docs/entities/sites/system-pages-delete-delete).

## See also

- [System pages](/docs/entities/sites/system-pages)
- [Assign a system page](/docs/entities/sites/system-pages-set)
- [Get a system page URL](/docs/entities/sites/system-pages-url)
- [Remove a system page](/docs/entities/sites/system-pages-delete-delete)
- [Remove all site system pages](/docs/entities/sites/system-pages-delete)
- [List pages](/docs/entities/pages/list)
