[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fperson-types\u002Fsearch":3,"docs-tabs-entities\u002Fperson-types\u002Fsearch":6},{"content":4,"lastmod":5},"## Search payer types\n\n`POST \u002Fv1\u002Fperson-types\u002Fsearch`\n\nSearches payer types using filter and sort conditions in the JSON request body.\n\n## Request body fields\n\n| Field | Type | Default | Description |\n|------|-----|-----------|---------|\n| `filter` | object | — | Filter by fields from [`GET \u002Fv1\u002Fperson-types\u002Ffields`](\u002Fdocs\u002Fentities\u002Fperson-types\u002Ffields).\u003Cbr>[Filtering syntax](\u002Fdocs\u002Ffiltering). Example: `{ \"id\": 21 }` |\n| `select` | string[] \\| string | — | A field list, for example `[\"id\", \"name\", \"active\"]`, or a comma-separated string. Only selected fields remain in `data`. Unknown names are reported in `meta.warnings` with the code `UNKNOWN_SELECT_FIELD` |\n| `sort` | string \\| object \\| string[] | — | Sort: `\"-id\"`, `{ \"id\": \"desc\" }`, or `[\"id\", \"-sort\"]` |\n| `order` | object | — | Sort using an object: `{ \"id\": \"desc\" }`. If `sort` is provided, it takes precedence |\n| `limit` | number | `50` | Number of records, from 1 to 5000. Values above 5000 are capped at 5000 |\n| `offset` | number | `0` | Number of records to skip |\n| `start` | number | `0` | Uses the same offset value as `offset`. If both are provided, `offset` takes precedence, including `0`; `offset: null` uses `start`. |\n| `withTotal` | boolean | — | Accepts `true` or `false`, but does not change counting or the presence of `meta.total` for payer types |\n\n**Pagination.** When `limit > 50`, Vibecode automatically reads multiple pages of 50 records. Increase `offset` to fetch the next set. Check `meta.hasMore` after each response.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fperson-types\u002Fsearch\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"filter\": {\"id\": 21}}'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fperson-types\u002Fsearch\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"filter\": {\"id\": 21}}'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fperson-types\u002Fsearch', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({ filter: { id: 21 } }),\n})\n\nconst { success, data, meta } = await res.json()\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fperson-types\u002Fsearch', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({ filter: { id: 21 } }),\n})\n\nconst { success, data, meta } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | Always `true` on success |\n| `data` | array | Array of payer types |\n| `data[].id` | number | Payer type ID, RO. List: [`GET \u002Fv1\u002Fperson-types`](\u002Fdocs\u002Fentities\u002Fperson-types\u002Flist) |\n| `data[].name` | string | Name |\n| `data[].code` | string \\| null | Unique code |\n| `data[].sort` | number | Sort order |\n| `data[].active` | boolean | Whether the type is active |\n| `data[].xmlId` | string \\| null | External ID |\n| `meta.total` | number | Total number of types matching the filter. Omitted on an empty page when `offset > 0` or `start > 0` |\n| `meta.hasMore` | boolean | Whether more records exist beyond the current set |\n| `meta.durationMs` | number | Request duration in milliseconds |\n| `meta.warnings` | array | Parameter warnings with `code`, `message`, and `field`. Only included when warnings exist |\n| `meta.pageErrorSample` | object | The code and message of an error that stopped automatic pagination early. Included when `data` contains fewer records than `limit` because of the error |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"active\": true,\n      \"code\": \"DOCS_PERSON_397F55D8FB1D\",\n      \"id\": 21,\n      \"name\": \"Updated documentation payer\",\n      \"sort\": 910,\n      \"xmlId\": \"DOCS_PERSON_397F55D8FB1D\"\n    }\n  ],\n  \"meta\": {\n    \"total\": 1,\n    \"hasMore\": false,\n    \"durationMs\": 49\n  }\n}\n```\n\n## Error response example\n\n400 — an object was provided instead of a field list:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"INVALID_SELECT_TYPE\",\n    \"message\": \"select must be a string (\\\"id,title\\\") or an array of strings ([\\\"id\\\",\\\"title\\\"]); got a object\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `UNKNOWN_FILTER_FIELD` | The filter uses a field absent from the schema. Field list: [`GET \u002Fv1\u002Fperson-types\u002Ffields`](\u002Fdocs\u002Fentities\u002Fperson-types\u002Ffields) |\n| 400 | `INVALID_FILTER_FIELD` | A filter field name starts with the unsupported prefix `@` or `!@` |\n| 400 | `INVALID_FILTER_OPERATOR` | An unknown operator, an empty condition object, or a logical condition with `$or` or `$and` |\n| 400 | `INVALID_DUPLICATE_FILTER_FIELD` | Two conditions resolve to the same filter condition. Provide only one |\n| 400 | `INVALID_SORT_FIELD` | Sorting uses a forbidden name: `__proto__`, `constructor`, or `prototype` |\n| 400 | `UNKNOWN_SORT_FIELD` | Sorting by an unknown field |\n| 400 | `INVALID_SORT_DIRECTION` | The sort direction is not one of `asc`, `desc`, `ASC`, `DESC`, `1`, `-1` |\n| 400 | `INVALID_FILTER_SHAPE` | The `filter` is a string, number, array, or another value instead of a condition object |\n| 400 | `INVALID_SORT_TYPE` | The sort value has an unsupported type |\n| 400 | `INVALID_LIMIT` | The `limit` is neither a number nor a numeric string |\n| 400 | `INVALID_SELECT_TYPE` | The `select` is neither a string nor an array of strings |\n| 400 | `INVALID_REQUEST` | The request body is not a JSON object |\n| 403 | `SCOPE_DENIED` | The API key lacks the `sale` scope |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |\n| 401 | `TOKEN_MISSING` | No Bitrix24 access tokens are configured |\n\nFor the full list of common API errors, see [Error codes](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [List payer types](\u002Fdocs\u002Fentities\u002Fperson-types\u002Flist)\n- [Get a payer type](\u002Fdocs\u002Fentities\u002Fperson-types\u002Fget)\n- [Aggregate payer types](\u002Fdocs\u002Fentities\u002Fperson-types\u002Faggregate)\n- [Payer type fields](\u002Fdocs\u002Fentities\u002Fperson-types\u002Ffields)\n- [Payer types](\u002Fdocs\u002Fentities\u002Fperson-types)\n- [Filtering syntax](\u002Fdocs\u002Ffiltering)\n- [Limits and optimization](\u002Fdocs\u002Foptimization)\n","2026-11-19",{},1795415279439]