For AI agents: markdown of this page — /docs-content-en/entities/requisite-presets/countries.md documentation index — /llms.txt
Requisite preset countries
GET /v1/requisite-presets/countries
Returns the countries for which a requisite preset can be created in the Bitrix24 account. The country id is passed as the preset's countryId and is used to choose a preset for looking up requisites by number.
Examples
curl — personal key
curl "https://vibecode.bitrix24.com/v1/requisite-presets/countries" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl "https://vibecode.bitrix24.com/v1/requisite-presets/countries" \
-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/requisite-presets/countries', {
headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
const { data } = await res.json()
const usa = data.find((country) => country.code === 'US')
console.log(usa.id)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/requisite-presets/countries', {
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 success |
Fielddata |
Typearray | DescriptionCountries |
Fielddata[].id |
Typenumber | DescriptionCountry ID in Bitrix24. This is the value of the preset's countryId field, not the numeric ISO country code |
Fielddata[].code |
Typestring | DescriptionTwo-letter country code, for example US, DE, FR |
Fielddata[].title |
Typestring | DescriptionCountry name in the Bitrix24 account language |
Response example
Three of the twelve countries are shown:
{
"success": true,
"data": [
{ "id": 46, "code": "DE", "title": "Germany" },
{ "id": 122, "code": "US", "title": "USA" },
{ "id": 132, "code": "FR", "title": "France" }
]
}
Error response example
401 — the key is not passed:
{
"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 |
DescriptionBitrix24 denied CRM access to the key's user |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionBitrix24 rejected the request. The error text is in error.message |
| HTTP502 | CodeBITRIX_RESPONSE_INVALID |
DescriptionBitrix24 returned the directory in an unexpected format |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe key lacks the crm scope |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe key has no connection to Bitrix24 |
| HTTP401 | CodeMISSING_API_KEY |
DescriptionThe X-Api-Key header is not passed |
Full list of common API errors — Errors.
Known specifics
A read-only key is accepted. This directory request changes nothing in the Bitrix24 account.
The requisite search type depends on the country. The built-in Company and Person presets of an international Bitrix24 account have countryId 122, and lookup by number runs for them without a search type. Search by tax ID and bank code is available for countryId 1, search in the register of self-regulatory organizations (SRO) for countryId 14. Details — Look up requisites by number.