For AI agents: markdown of this page — /docs-content-en/entities/product-sections/get.md documentation index — /llms.txt

Get section

GET /v1/product-sections/:id

Returns a single product catalog section by identifier.

Parameters

Parameter Type Required Description
id (path) number yes Section identifier

Examples

curl — personal key

Terminal
curl "https://vibecode.bitrix24.com/v1/product-sections/31" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl "https://vibecode.bitrix24.com/v1/product-sections/31" \
  -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/product-sections/31', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data } = await res.json()
console.log('Section:', data.name)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/product-sections/31', {
  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.id number Section identifier
data.name string Section name
data.catalogId number ID of the catalog the section belongs to
data.sectionId number Parent section ID. null for a top-level section
data.xmlId string External identifier
data.code string Section symbolic code

Response example

JSON
{
  "success": true,
  "data": {
    "id": 31,
    "name": "Clothing",
    "catalogId": 25,
    "sectionId": null,
    "xmlId": "666",
    "code": "clothes"
  }
}

Error response example

404 — section not found:

JSON
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Product section is not found."
  }
}

Errors

HTTP Code Description
404 ENTITY_NOT_FOUND A section with this id does not exist
403 SCOPE_DENIED Key is missing the crm scope
401 MISSING_API_KEY The X-Api-Key header was not provided

Full list of common API errors — Errors.

See also