# Банківські рахунки: методи API Bimp

URL: https://bimpsoft.com/help/developers/api-reference/bank-accounts/

Методи API Bimp для ресурсу «Банківські рахунки» (`/org2/bankAccounts/…`): 3 методи. Базова адреса: `https://app.bimpsoft.com`. Усі запити, крім входу, передають токен компанії в заголовку `access-token` — див. [Початок роботи з API](/help/developers/api-getting-started/).

| Метод | Що робить |
|---|---|
| [`POST /org2/bankAccounts/api-readTypes`](#api-read-types) | A request to obtain detailed information about bank account types |
| [`POST /org2/bankAccounts/api-read`](#api-read) | A request to obtain detailed information for a particular bank account |
| [`POST /org2/bankAccounts/api-readList`](#api-read-list) | A request to view a list of bank accounts |

## api-readTypes

`POST /org2/bankAccounts/api-readTypes`

A request to obtain detailed information about bank account types

**Відповідь: поле `data`**

| Поле | Тип | Опис |
|---|---|---|
| `[].name` | string |  |
| `[].uuid` | string (uuid) |  |
| `[].code` | string |  |

```bash
curl -X POST 'https://app.bimpsoft.com/org2/bankAccounts/api-readTypes' \
  -H 'access-token: <токен компанії>'
```

## api-read

`POST /org2/bankAccounts/api-read`

A request to obtain detailed information for a particular bank account

**Тіло запиту (JSON)**

| Поле | Тип | Обов'язкове | Опис |
|---|---|---|---|
| `uuid` | string (uuid) | так | A unique uuid key for the bank account |

**Відповідь: поле `data`**

| Поле | Тип | Опис |
|---|---|---|
| `uuid` | string (uuid) | A unique uuid key for the bank account |
| `name` | string |  |
| `comment` | string |  |
| `bank` | string |  |
| `iban` | string |  |
| `card` | string |  |
| `main` | boolean |  |
| `currency` | string (uuid) |  |
| `organization` | string (uuid) |  |
| `accounting` | string (uuid) |  |

```bash
curl -X POST 'https://app.bimpsoft.com/org2/bankAccounts/api-read' \
  -H 'access-token: <токен компанії>' \
  -H 'Content-Type: application/json' \
  -d '{"uuid":"00000000-0000-0000-0000-000000000000"}'
```

## api-readList

`POST /org2/bankAccounts/api-readList`

A request to view a list of bank accounts

**Тіло запиту (JSON)**

| Поле | Тип | Обов'язкове | Опис |
|---|---|---|---|
| `pagination` | object | так |  |
| `pagination.offset` | number | так | Begin from {offset} elements |
| `pagination.count` | number | так | Limit of paginated elemets |

**Відповідь: поле `data`**

| Поле | Тип | Опис |
|---|---|---|
| `[].uuid` | string (uuid) | A unique uuid key for the bank account |
| `[].name` | string |  |
| `[].comment` | string |  |
| `[].bank` | string |  |
| `[].iban` | string |  |
| `[].card` | string |  |
| `[].main` | boolean |  |
| `[].currency` | string (uuid) |  |
| `[].organization` | string (uuid) |  |
| `[].accounting` | string (uuid) |  |

```bash
curl -X POST 'https://app.bimpsoft.com/org2/bankAccounts/api-readList' \
  -H 'access-token: <токен компанії>' \
  -H 'Content-Type: application/json' \
  -d '{"pagination":{"offset":0,"count":10}}'
```

Інтерактивна документація з можливістю надіслати тестовий запит: [https://app.bimpsoft.com/docs](https://app.bimpsoft.com/docs). Специфікація OpenAPI оновлюється разом із Bimp; ця сторінка згенерована з неї автоматично.
