
## Bank detail fields

`GET /v1/bank-details/fields`

Returns the schema of all fields of the bank detail entity: types, read-only flag, and required flag.

## Response format

Each field in `data.fields` contains:

| Key | Type | Description |
|------|-----|---------|
| `type` | string | Value type: `number`, `string`, `boolean`, `datetime` |
| `readonly` | boolean | `true` — field is not accepted on create and update |
| `required` | boolean | `true` — field is required on create (present only when `true`) |
| `label` | string | Original field name in Bitrix24 (only for fields in `UPPER_SNAKE_CASE` format) |

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/bank-details/fields" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth app

```bash
curl "https://vibecode.bitrix24.com/v1/bank-details/fields" \
  -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/bank-details/fields', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data } = await res.json()
console.log('All fields:', Object.keys(data.fields))
```

### JavaScript — OAuth app

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/bank-details/fields', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

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

## Fields from the Vibecode schema

### Service

| Field | Bitrix24 | Type | RO | Description |
|------|-----------|-----|:--:|---------|
| `id` | `ID` | number | yes | Bank detail ID |
| `entityTypeId` | `ENTITY_TYPE_ID` | number | no | Owner entity type. Always `8` (requisite). Write-only — not returned in the `get` response |
| `entityId` | `ENTITY_ID` | number | no | ID of the owner requisite |
| `countryId` | `COUNTRY_ID` | number | no | Country ID. `0` — country not set |
| `name` | `NAME` | string | no | Bank detail name |
| `code` | `CODE` | string | no | Symbolic code for external integrations |
| `xmlId` | `XML_ID` | string | no | External identifier for synchronization |
| `originatorId` | `ORIGINATOR_ID` | string | no | Source system ID |
| `active` | `ACTIVE` | boolean | no | Whether the record is active |
| `sort` | `SORT` | number | no | Sort order |
| `comments` | `COMMENTS` | string | no | Comment on the record |
| `createdAt` | `DATE_CREATE` | datetime | yes | Creation date (ISO 8601) |
| `updatedAt` | `DATE_MODIFY` | datetime | yes | Last modification date (ISO 8601) |
| `createdBy` | `CREATED_BY_ID` | number | yes | Creator ID |
| `modifyBy` | `MODIFY_BY_ID` | number | yes | Last editor ID |

### Bank details

| Field | Bitrix24 | Type | RO | Description |
|------|-----------|-----|:--:|---------|
| `rqBankName` | `RQ_BANK_NAME` | string | no | Bank name |
| `rqBankAddr` | `RQ_BANK_ADDR` | string | no | Bank address |
| `rqBankRouteNum` | `RQ_BANK_ROUTE_NUM` | string | no | Bank routing number |
| `rqBankCode` | `RQ_BANK_CODE` | string | no | Bank code |
| `rqBik` | `RQ_BIK` | string | no | BIC |
| `rqMfo` | `RQ_MFO` | string | no | MFO (Ukraine) |
| `rqAccName` | `RQ_ACC_NAME` | string | no | Account name |
| `rqAccNum` | `RQ_ACC_NUM` | string | no | Current account |
| `rqAccType` | `RQ_ACC_TYPE` | string | no | Account type |
| `rqCorAccNum` | `RQ_COR_ACC_NUM` | string | no | Correspondent account |
| `rqAccCurrency` | `RQ_ACC_CURRENCY` | string | no | Account currency |
| `rqIik` | `RQ_IIK` | string | no | IIK (Kazakhstan) |
| `rqAgencyName` | `RQ_AGENCY_NAME` | string | no | Agency name |

### International details

| Field | Bitrix24 | Type | RO | Description |
|------|-----------|-----|:--:|---------|
| `rqIban` | `RQ_IBAN` | string | no | IBAN |
| `rqSwift` | `RQ_SWIFT` | string | no | SWIFT code |

### France details

| Field | Bitrix24 | Type | RO | Description |
|------|-----------|-----|:--:|---------|
| `rqBic` | `RQ_Bic` | string | no | BIC (French form; differs from `rqBik`) |
| `rqCodeb` | `RQ_CODEB` | string | no | Bank code (France) |
| `rqCodeg` | `RQ_CODEG` | string | no | Branch code (France) |
| `rqRib` | `RQ_RIB` | string | no | RIB (France) |

## Bitrix24 fields outside the schema (in UPPER_SNAKE_CASE)

These Bitrix24 fields are not part of the core Vibecode schema and are accessible directly under their original name:

| Field | Type | RO | Description |
|------|-----|:--:|---------|
| `RQ_BIC` | string | no | BIC in the original Bitrix24 format (differs from `rqBic`) |

## Response example

```json
{
  "success": true,
  "data": {
    "fields": {
      "id": { "type": "number", "readonly": true },
      "entityTypeId": { "type": "number", "readonly": false },
      "entityId": { "type": "number", "readonly": false, "required": true },
      "countryId": { "type": "number", "readonly": false },
      "name": { "type": "string", "readonly": false, "required": true },
      "code": { "type": "string", "readonly": false },
      "xmlId": { "type": "string", "readonly": false },
      "originatorId": { "type": "string", "readonly": false },
      "active": { "type": "boolean", "readonly": false },
      "sort": { "type": "number", "readonly": false },
      "comments": { "type": "string", "readonly": false },
      "createdAt": { "type": "datetime", "readonly": true },
      "updatedAt": { "type": "datetime", "readonly": true },
      "createdBy": { "type": "number", "readonly": true },
      "modifyBy": { "type": "number", "readonly": true },
      "rqBankName": { "type": "string", "readonly": false },
      "rqBankAddr": { "type": "string", "readonly": false },
      "rqBankRouteNum": { "type": "string", "readonly": false },
      "rqBankCode": { "type": "string", "readonly": false },
      "rqAccNum": { "type": "string", "readonly": false },
      "rqCorAccNum": { "type": "string", "readonly": false },
      "rqIik": { "type": "string", "readonly": false },
      "rqMfo": { "type": "string", "readonly": false },
      "rqAccName": { "type": "string", "readonly": false },
      "rqAccCurrency": { "type": "string", "readonly": false },
      "rqBik": { "type": "string", "readonly": false },
      "rqSwift": { "type": "string", "readonly": false },
      "rqIban": { "type": "string", "readonly": false },
      "rqAgencyName": { "type": "string", "readonly": false },
      "rqAccType": { "type": "string", "readonly": false },
      "rqBic": { "type": "string", "readonly": false },
      "rqCodeb": { "type": "string", "readonly": false },
      "rqCodeg": { "type": "string", "readonly": false },
      "rqRib": { "type": "string", "readonly": false },
      "RQ_BIC": { "type": "string", "readonly": false, "label": "RQ_BIC" }
    },
    "batch": ["create", "update", "delete"]
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 403 | `SCOPE_DENIED` | API key lacks the `crm` scope. Required: `This endpoint requires 'crm' scope` |
| 401 | `TOKEN_MISSING` | API key has no configured tokens |

Full list of common API errors — [Errors](/docs/errors).

## See also

- [Get bank detail](/docs/entities/bank-details/get)
- [List bank details](/docs/entities/bank-details/list)
- [Create bank detail](/docs/entities/bank-details/create)
- [Requisites](/docs/entities/requisites)
