Dành cho AI agent: markdown của trang này — /docs-content-en/entities/crm-enums.md chỉ mục tài liệu — /llms.txt
Hiện tại, các bài viết trong tài liệu chỉ có bằng tiếng Anh.
CRM reference lists
CRM entity types and address types available in the Bitrix24 account. Use them to convert a numeric entity type into a letter code and to find the allowed address types.
Bitrix24 API: crm.enum.ownertype, crm.enum.addresstype
Scope: crm
CRM entity types
GET /v1/crm-enums/owner-types
Reference list of the CRM entity types on the Bitrix24 account, smart processes included. Use it to map a numeric entity type to its letter code and back.
Examples
curl — personal key
curl "https://vibecode.bitrix24.com/v1/crm-enums/owner-types" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl "https://vibecode.bitrix24.com/v1/crm-enums/owner-types" \
-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/crm-enums/owner-types', {
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
const { data } = await res.json()
const byShortCode = Object.fromEntries(data.map((type) => [type.symbolCodeShort, type.id]))
console.log(byShortCode.D) // 2
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/crm-enums/owner-types', {
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const { data } = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | Descriptiontrue on a successful request |
Fielddata |
Typearray | DescriptionCRM entity types |
Fielddata[].id |
Typenumber | DescriptionType ID. Matches entityTypeId in CRM routes, for example in /v1/items/:entityTypeId |
Fielddata[].name |
Typestring | DescriptionType name in the Bitrix24 account language |
Fielddata[].symbolCode |
Typestring | null | DescriptionSymbolic code, for example DEAL, SMART_INVOICE, DYNAMIC_1038 |
Fielddata[].symbolCodeShort |
Typestring | null | DescriptionShort code. Matches the ownerType of product rows, for example D for a deal |
Response example
{
"success": true,
"data": [
{ "id": 1, "name": "Lead", "symbolCode": "LEAD", "symbolCodeShort": "L" },
{ "id": 2, "name": "Deal", "symbolCode": "DEAL", "symbolCodeShort": "D" },
{ "id": 31, "name": "Invoice", "symbolCode": "SMART_INVOICE", "symbolCodeShort": "SI" },
{ "id": 1038, "name": "No fields", "symbolCode": "DYNAMIC_1038", "symbolCodeShort": "T40e" }
]
}
The example shows 4 of the 17 types returned by the test Bitrix24 account.
Error response example
401 — the X-Api-Key header is missing:
{
"success": false,
"error": {
"code": "MISSING_API_KEY",
"message": "API key required. Pass via X-Api-Key header."
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP403 | CodeBITRIX_ACCESS_DENIED |
DescriptionThe key's user has no permission to read the reference list in Bitrix24 |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionBitrix24 rejected the request. The reason is in message |
| HTTP429 | CodeRATE_LIMITED |
DescriptionBitrix24 request rate exceeded, retry in 1-2 seconds |
| HTTP502 | CodeBITRIX_RESPONSE_INVALID |
DescriptionBitrix24 returned the reference list in an unexpected shape |
| HTTP502 | CodeBITRIX_UNAVAILABLE |
DescriptionBitrix24 is unavailable: it returned a server error or the connection dropped |
| HTTP401 | CodeMISSING_API_KEY |
DescriptionThe X-Api-Key header is missing |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe API key has no Bitrix24 tokens configured |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe API key lacks the crm scope |
Full list of common API errors — Errors.
Known specifics
- Smart processes are included in the list. Their
symbolCodeisDYNAMIC_plusid, andsymbolCodeShortis the letterTplusidin hexadecimal: for type1038it isT40e. Each Bitrix24 account has its own set of smart processes. - Query parameters are ignored. The method takes no parameters, and any passed in the URL do not affect the response.