# Отримання кредитів: методи API Bimp

URL: https://bimpsoft.com/help/developers/api-reference/loan-obtainment/

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

Loan obtainment documents

| Метод | Що робить |
|---|---|
| [`POST /org2/loanObtainment/api-read`](#api-read) | A request to obtain detailed information for a particular loan obtainment document |
| [`POST /org2/loanObtainment/api-readList`](#api-read-list) | A request to view a list of loan obtainment documents |
| [`POST /org2/loanObtainment/api-create`](#api-create) | A request to create a loan obtainment document |
| [`POST /org2/loanObtainment/api-update`](#api-update) | A request to update a loan obtainment document |

## api-read

`POST /org2/loanObtainment/api-read`

A request to obtain detailed information for a particular loan obtainment document

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

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

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

| Поле | Тип | Опис |
|---|---|---|
| `uuid` | string (uuid) | A unique uuid key for a loan obtainment document |
| `date` | string | The document's date in the format 'YYYY-MM-DDTHH:MM:SS' (e.g., '2025-05-16T09:17:49') |
| `number` | string | The document's number. Use this field if you need to specify a custom number |
| `name` | string | Document name |
| `comment` | string | An optional text field for any additional notes or comments related to the document |
| `organization` | string (uuid) | A unique identifier for the Organization, obtainable from the /organization/api-readList request |
| `author` | string (uuid) | A unique identifier for the Author, obtainable from the /user/api-readList request |
| `status` | string (uuid) | A unique uuid key for a document status |
| `counterparty` | string (uuid) | A unique uuid key for the creditor (counterparty) |
| `paymentEntity` | string (uuid) | The unique identifier for the payment entity type, obtainable from the /bankAccounts/api-readList request OR from /cashRegistry/api-readList request |
| `currency` | string (uuid) | A unique identifier for the Currency, obtainable from the /currency/api-readList request |
| `rate` | number | Currency exchange rate for the document |
| `documentSum` | number | Total amount of the document |
| `contract` | string (uuid) | The unique identifier for the counterparty's contract, specified in the buyer key. You can retrieve this UUID using the /contract/api-readList request |
| `project` | string (uuid) | A unique identifier for the Project, obtainable from the /project/api-readList request |
| `lineOfBusiness` | string (uuid) | A unique identifier for the Line of Business, obtainable from the /lineOfBusiness/api-readList request |
| `incomeItem` | string (uuid) | A unique uuid key for an income item |
| `mutualSettlementType` | string (uuid) | A unique uuid key for a mutual settlement type |
| `chartOfAccount` | string (uuid) | A unique identifier for the Chart of account, obtainable from the /chartOfAccount/api-readList request |
| `counterpartyBankAccount` | string (uuid) | A unique uuid key for the counterparty bank account |
| `cashPaymentType` | number | Cash payment type code |

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

## api-readList

`POST /org2/loanObtainment/api-readList`

A request to view a list of loan obtainment documents

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

| Поле | Тип | Обов'язкове | Опис |
|---|---|---|---|
| `pagination` | object | так |  |
| `pagination.offset` | number | так | Begin from {offset} elements |
| `pagination.count` | number | так | Limit of paginated elemets |
| `filters` | object |  | Filters for loan obtainment list |
| `filters.comment` | string |  | An optional text field for any additional notes or comments related to the document |
| `filters.organization` | string (uuid)[] |  | A unique identifier for the Organization, obtainable from the /organization/api-readList request |
| `filters.author` | string (uuid)[] |  | A unique identifier for the Author, obtainable from the /user/api-readList request |
| `filters.counterparty` | string (uuid)[] |  | A unique uuid key for the creditor (counterparty) |
| `filters.paymentEntity` | string (uuid)[] |  | The unique identifier for the payment entity type, obtainable from the /bankAccounts/api-readList request OR from /cashRegistry/api-readList request |
| `filters.period` | object[] |  | Date period filter [from, to] |

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

| Поле | Тип | Опис |
|---|---|---|
| `[].uuid` | string (uuid) |  |
| `[].name` | string | Document name |
| `[].number` | string | The document's number. Use this field if you need to specify a custom number |
| `[].date` | string | The document's date in the format 'YYYY-MM-DDTHH:MM:SS' (e.g., '2025-05-16T09:17:49') |
| `[].comment` | string | An optional text field for any additional notes or comments related to the document |
| `[].documentSum` | number | Total amount of the document |
| `[].author` | string (uuid) | A unique identifier for the Author, obtainable from the /user/api-readList request |
| `[].organization` | string (uuid) | A unique identifier for the Organization, obtainable from the /organization/api-readList request |
| `[].counterparty` | string (uuid) | A unique uuid key for the creditor (counterparty) |
| `[].currency` | string (uuid) | A unique identifier for the Currency, obtainable from the /currency/api-readList request |

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

## api-create

`POST /org2/loanObtainment/api-create`

A request to create a loan obtainment document

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

| Поле | Тип | Обов'язкове | Опис |
|---|---|---|---|
| `organization` | string (uuid) | так | A unique identifier for the Organization, obtainable from the /organization/api-readList request |
| `paymentEntity` | string (uuid) | так | The unique identifier for the payment entity type, obtainable from the /bankAccounts/api-readList request OR from /cashRegistry/api-readList request |
| `counterparty` | string (uuid) | так | A unique uuid key for the creditor (counterparty) |
| `documentSum` | number | так | Total amount of the document |
| `project` | string (uuid) | так | A unique identifier for the Project, obtainable from the /project/api-readList request |
| `lineOfBusiness` | string (uuid) | так | A unique identifier for the Line of Business, obtainable from the /lineOfBusiness/api-readList request |
| `chartOfAccount` | string (uuid) |  | A unique identifier for the Chart of account, obtainable from the /chartOfAccount/api-readList request |
| `date` | string |  | The document's date in the format 'YYYY-MM-DDTHH:MM:SS' (e.g., '2025-05-16T09:17:49') |
| `number` | string |  | The document's number. Use this field if you need to specify a custom number |
| `name` | string |  | Document name |
| `comment` | string |  | An optional text field for any additional notes or comments related to the document |
| `author` | string (uuid) |  | A unique identifier for the Author, obtainable from the /user/api-readList request |
| `status` | string (uuid) |  | A unique uuid key for a document status |
| `currency` | string (uuid) |  | A unique identifier for the Currency, obtainable from the /currency/api-readList request |
| `rate` | number |  | Currency exchange rate for the document |
| `contract` | string (uuid) |  | The unique identifier for the counterparty's contract, specified in the buyer key. You can retrieve this UUID using the /contract/api-readList request |
| `incomeItem` | string (uuid) |  | A unique uuid key for an income item |
| `mutualSettlementType` | string (uuid) |  | A unique uuid key for a mutual settlement type |
| `counterpartyBankAccount` | string (uuid) |  | A unique uuid key for the counterparty bank account |
| `cashPaymentType` | number |  | Cash payment type code |

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

| Поле | Тип | Опис |
|---|---|---|
| `uuid` | string (uuid) |  |

```bash
curl -X POST 'https://app.bimpsoft.com/org2/loanObtainment/api-create' \
  -H 'access-token: <токен компанії>' \
  -H 'Content-Type: application/json' \
  -d '{"organization":"00000000-0000-0000-0000-000000000000","paymentEntity":"00000000-0000-0000-0000-000000000000","counterparty":"00000000-0000-0000-0000-000000000000","documentSum":1,"project":"00000000-0000-0000-0000-000000000000","lineOfBusiness":"00000000-0000-0000-0000-000000000000"}'
```

## api-update

`POST /org2/loanObtainment/api-update`

A request to update a loan obtainment document

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

| Поле | Тип | Обов'язкове | Опис |
|---|---|---|---|
| `uuid` | string (uuid) | так | A unique uuid key for a loan obtainment document |
| `organization` | string (uuid) |  | A unique identifier for the Organization, obtainable from the /organization/api-readList request |
| `paymentEntity` | string (uuid) |  | The unique identifier for the payment entity type, obtainable from the /bankAccounts/api-readList request OR from /cashRegistry/api-readList request |
| `counterparty` | string (uuid) |  | A unique uuid key for the creditor (counterparty) |
| `documentSum` | number |  | Total amount of the document |
| `project` | string (uuid) |  | A unique identifier for the Project, obtainable from the /project/api-readList request |
| `lineOfBusiness` | string (uuid) |  | A unique identifier for the Line of Business, obtainable from the /lineOfBusiness/api-readList request |
| `chartOfAccount` | string (uuid) |  | A unique identifier for the Chart of account, obtainable from the /chartOfAccount/api-readList request |
| `date` | string |  | The document's date in the format 'YYYY-MM-DDTHH:MM:SS' (e.g., '2025-05-16T09:17:49') |
| `number` | string |  | The document's number. Use this field if you need to specify a custom number |
| `name` | string |  | Document name |
| `comment` | string |  | An optional text field for any additional notes or comments related to the document |
| `author` | string (uuid) |  | A unique identifier for the Author, obtainable from the /user/api-readList request |
| `status` | string (uuid) |  | A unique uuid key for a document status |
| `currency` | string (uuid) |  | A unique identifier for the Currency, obtainable from the /currency/api-readList request |
| `rate` | number |  | Currency exchange rate for the document |
| `contract` | string (uuid) |  | The unique identifier for the counterparty's contract, specified in the buyer key. You can retrieve this UUID using the /contract/api-readList request |
| `incomeItem` | string (uuid) |  | A unique uuid key for an income item |
| `mutualSettlementType` | string (uuid) |  | A unique uuid key for a mutual settlement type |
| `counterpartyBankAccount` | string (uuid) |  | A unique uuid key for the counterparty bank account |
| `cashPaymentType` | number |  | Cash payment type code |

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

| Поле | Тип | Опис |
|---|---|---|
| `uuid` | string (uuid) |  |

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

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