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

Get a payer type

GET /v1/person-types/:id

Retrieves details of a payer type selected for an order or its properties.

Parameters

Parameter Type Required Description
Parameterid (path) Typenumber Requiredyes DescriptionPayer type ID. List: GET /v1/person-types
Parameterselect (query) Typestring Requiredno DescriptionComma-separated fields, for example ?select=id,name,active. Field list: GET /v1/person-types/fields. Only selected fields remain in data

Examples

curl — personal key

Terminal
curl "https://vibecode.bitrix24.com/v1/person-types/21" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

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

const { success, data } = await res.json()

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/person-types/21', {
  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 Typeobject DescriptionPayer type
Fielddata.id Typenumber DescriptionPayer type ID, RO. List: GET /v1/person-types
Fielddata.name Typestring DescriptionName
Fielddata.code Typestring | null DescriptionUnique code
Fielddata.sort Typenumber DescriptionSort order
Fielddata.active Typeboolean DescriptionWhether the type is active
Fielddata.xmlId Typestring | null DescriptionExternal ID
Fieldmeta.warnings Typearray DescriptionWarnings about unknown names in select, with code, message, and field. Only included when warnings exist

Response example

JSON
{
  "success": true,
  "data": {
    "active": false,
    "code": "DOCS_PERSON_397F55D8FB1D",
    "id": 21,
    "name": "Documentation payer type",
    "sort": 900,
    "xmlId": "DOCS_PERSON_397F55D8FB1D"
  }
}

Error response example

404 — the payer type was not found:

JSON
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "person type is not exists"
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS DescriptionThe id is not a non-negative integer
HTTP404 CodeENTITY_NOT_FOUND DescriptionNo type exists with this id. Message: person type is not exists
HTTP404 CodeENTITY_NOT_FOUND DescriptionThe request completed, but the response contains no object. Message: personType <id> not found
HTTP403 CodeSCOPE_DENIED DescriptionThe API key lacks the sale scope
HTTP401 CodeMISSING_API_KEY DescriptionThe X-Api-Key header is missing
HTTP401 CodeTOKEN_MISSING DescriptionNo Bitrix24 access tokens are configured

For the full list of common API errors, see Error codes.

See also