Para agentes de IA: markdown desta página — /docs-content-en/entities/crm-enums/address-types.md índice da documentação — /llms.txt

Os artigos da documentação estão disponíveis atualmente em inglês.

CRM address types

GET /v1/crm-enums/address-types

Reference list of address types on the Bitrix24 account: actual, legal, delivery address and others. Use it to pick a type before writing an address.

Examples

curl — personal key

Terminal
curl "https://vibecode.bitrix24.com/v1/crm-enums/address-types" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

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

const { data } = await res.json()
for (const type of data) console.log(type.id, type.name)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/crm-enums/address-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 DescriptionThe Bitrix24 account's address types
Fielddata[].id Typenumber DescriptionType ID. Pass it as typeId to the address methods
Fielddata[].name Typestring DescriptionType name in the Bitrix24 account language
Fielddata[].symbolCode Typestring | null DescriptionSymbolic type code. On the test Bitrix24 account it is null for every type
Fielddata[].symbolCodeShort Typestring | null DescriptionShort symbolic code. On the test Bitrix24 account it is null for every type

Response example

JSON
{
  "success": true,
  "data": [
    { "id": 11, "name": "Delivery address", "symbolCode": null, "symbolCodeShort": null },
    { "id": 1, "name": "Actual address", "symbolCode": null, "symbolCodeShort": null },
    { "id": 6, "name": "Legal address", "symbolCode": null, "symbolCodeShort": null },
    { "id": 4, "name": "Registration address", "symbolCode": null, "symbolCodeShort": null },
    { "id": 8, "name": "Mailing address", "symbolCode": null, "symbolCodeShort": null },
    { "id": 9, "name": "Beneficiary address", "symbolCode": null, "symbolCodeShort": null }
  ]
}

Error response example

401 — the X-Api-Key header is missing:

JSON
{
  "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

  • The Bitrix24 account defines the set and order of types. The list is not sorted by id. Match types by id, not by name or position in the array.
  • Query parameters are ignored. The method takes no parameters; any passed in the URL do not affect the response.

See also