لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/entities/sites/system-pages.md فهرس التوثيق — /llms.txt

مقالات التوثيق متاحة حاليًا باللغة الإنجليزية فقط.

System pages

Assigns site pages to system roles — cart, checkout, customer account and others — reads the assignments, returns a page URL by role, and removes roles one at a time or all at once. The pages themselves stay on the site when a role is removed.

Bitrix24 API: landing.syspage.get, landing.syspage.set, landing.syspage.getSpecialPage, landing.syspage.deleteForSite Scope: landing

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
Parameterid (path) Typenumber Requiredyes DescriptionSite ID. List: GET /v1/sites
Parameteractive (query) Typeboolean Requiredno Descriptiontrue — 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
Parameterscope (query) Typestring Requiredno DescriptionInternal 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

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

curl — OAuth application

Terminal
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
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata Typearray DescriptionSite bindings. Empty array for a site without bindings
Fielddata[].type Typestring DescriptionRole: mainpage, catalog, personal, cart, order, payment, compare, feedback. What each one means — System pages
Fielddata[].pageId Typenumber DescriptionID of the page assigned to the role. Get the page: GET /v1/pages/:id
Fielddata[].title Typestring DescriptionPage title
Fielddata[].deleted Typeboolean DescriptionThe page is in the trash
Fielddata[].active Typeboolean DescriptionThe 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
HTTP400 CodeINVALID_PARAMS Descriptionid must be a positive safe integer — id is not a positive integer
HTTP400 CodeINVALID_PARAMS Descriptionactive must be true or false — active is neither true nor false
HTTP400 CodeINVALID_PARAMS DescriptionUnsupported query parameter — a query parameter the method does not accept was passed
HTTP400 CodeINVALID_SCOPE Descriptionscope is not KNOWLEDGE, GROUP or MAINPAGE
HTTP404 CodeENTITY_NOT_FOUND DescriptionNo site with this ID, the site is not visible to the user, or it belongs to another scope: the wrong scope was passed
HTTP409 CodeLANDING_MODULE_NOT_ENABLED DescriptionThe Sites module is unavailable on this Bitrix24 account. Ask a Bitrix24 account administrator to enable it — until then a retry returns the same refusal
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 returned the binding list in an unexpected form: Bitrix24 returned invalid system pages
HTTP403 CodeSCOPE_DENIED DescriptionThe API key does not have the landing scope
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no configured tokens

Full list of common API errors — 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.

See also