For AI agents: markdown of this page — /docs-content-en/humanresources/nodes/get.md documentation index — /llms.txt
Get node
GET /v1/humanresources/nodes/:id
Returns a single org structure node by identifier together with its member roster. The response includes a members array with the node's employees, their positions and roles.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
Parameterid (path) |
Typenumber | Requiredyes | DescriptionNode identifier. List of identifiers: GET /v1/humanresources/nodes?type=DEPARTMENT |
Examples
curl — personal key
curl "https://vibecode.bitrix24.com/v1/humanresources/nodes/23" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl "https://vibecode.bitrix24.com/v1/humanresources/nodes/23" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN"
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/humanresources/nodes/23', {
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
const { success, data } = await res.json()
console.log(data.name, '—', data.members.length, 'members')
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/humanresources/nodes/23', {
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.id |
Typenumber | DescriptionNode identifier |
Fielddata.name |
Typestring | DescriptionNode name |
Fielddata.type |
Typestring | DescriptionNode type: DEPARTMENT or TEAM |
Fielddata.structureId |
Typenumber | DescriptionIdentifier of the structure the node belongs to |
Fielddata.parentId |
Typenumber | DescriptionParent node identifier. For the root node it equals 0 |
Fielddata.description |
Typestring | null | DescriptionNode description. null if no description is set |
Fielddata.accessCode |
Typestring | DescriptionNode access code, for example D185 or SN23. The prefix is not determined by the node type, and the numeric part may differ from id — take the value from the response |
Fielddata.userCount |
Typenumber | DescriptionNumber of employees in the node |
Fielddata.colorName |
Typestring | null | DescriptionNode color name. null if no color is set |
Fielddata.xmlId |
Typestring | null | DescriptionExternal identifier of the node. null if not set |
Fielddata.createdAt |
Typestring | null | DescriptionCreation date (ISO 8601). null for nodes created without a timestamp |
Fielddata.updatedAt |
Typestring | null | DescriptionLast update date (ISO 8601). null if there were no changes |
Fielddata.members |
Typearray | DescriptionNode member roster |
Fielddata.members[].userId |
Typenumber | DescriptionEmployee identifier. Card: GET /v1/humanresources/employees |
Fielddata.members[].name |
Typestring | DescriptionEmployee name |
Fielddata.members[].workPosition |
Typestring | DescriptionEmployee position. Empty string if no position is set |
Fielddata.members[].role |
Typestring | DescriptionEmployee role in the node. For a department: MEMBER_HEAD (head), MEMBER_DEPUTY_HEAD (deputy), MEMBER_EMPLOYEE (employee). For a team, roles with the MEMBER_TEAM_ prefix |
Fielddata.members[].avatar |
Typestring | DescriptionEmployee profile image URL |
Fielddata.members[].url |
Typestring | DescriptionRelative path to the employee's card in the Bitrix24 account |
Response example
{
"success": true,
"data": {
"id": 23,
"name": "Sales department",
"type": "DEPARTMENT",
"structureId": 1,
"parentId": 17,
"description": "Direct sales",
"accessCode": "SN23",
"userCount": 2,
"colorName": null,
"xmlId": null,
"createdAt": null,
"updatedAt": null,
"members": [
{
"userId": 1,
"name": "John Brown",
"workPosition": "",
"role": "MEMBER_HEAD",
"avatar": "https://cdn.bitrix24.com/.../avatar.jpg",
"url": "/company/personal/user/1/"
},
{
"userId": 29,
"name": "Maria Wilson",
"workPosition": "Manager",
"role": "MEMBER_EMPLOYEE",
"avatar": "https://cdn.bitrix24.com/.../avatar.jpg",
"url": "/company/personal/user/29/"
}
]
}
}
Error response example
404 — node not found:
{
"success": false,
"error": {
"code": "ENTITY_NOT_FOUND",
"message": "Record with ID = `0` not found"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionNo node with the given id exists. The same code is returned for a non-numeric id |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe key lacks the humanresources scope |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe API key has no Bitrix24 tokens configured |
The full list of common API errors — Errors.