# Інші витрати: методи API Bimp

URL: https://bimpsoft.com/help/developers/api-reference/other-expenses/

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

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

## api-read

`POST /org2/otherExpenses/api-read`

A request to obtain detailed information for a particular other expenses document

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

| Поле | Тип | Обов'язкове | Опис |
|---|---|---|---|
| `uuid` | string (uuid) | так |  |

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

| Поле | Тип | Опис |
|---|---|---|
| `uuid` | string (uuid) |  |
| `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 |
| `author` | string (uuid) | A unique identifier for the Author, obtainable from the /user/api-readList request |
| `comment` | string | An optional text field for any additional notes or comments related to the document |
| `mutualSettlementType` | string (uuid) | Mutual settlement type |
| `documentSum` | number | Document sum |
| `organization` | string (uuid) | A unique identifier for the Organization, obtainable from the /organization/api-readList request |
| `atCostPrice` | boolean | Flag set when the user pressed the 'At cost price' button (sell price = cost price for all items) |
| `documentName` | string | Document name |
| `sum` | number | Total sum |
| `expenseItem` | string (uuid) | A unique identifier for the Expense Item, obtainable from the /expenseItems/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 identifier for a counterparty of type 'isCustomer'.You can retrieve this UUID using the /counterparty/api-readList request |
| `lineItemInTable` | boolean | Flag set when the user pressed the 'Item in the table section' button (item set per product line) |
| `paymentDetails` | object[] |  |
| `paymentDetails[].sum` | number | The sum for the expense item |
| `paymentDetails[].project` | string (uuid) | A unique identifier for the Project, obtainable from the /project/api-readList request |
| `paymentDetails[].lineOfBusiness` | string (uuid) | A unique identifier for the Line of Business, obtainable from the /lineOfBusiness/api-readList request |
| `paymentDetails[].expenseItem` | string (uuid) | A unique identifier for the Expense Item, obtainable from the /expenseItems/api-readList request |
| `paymentDetails[].invoiceForCustomerPayment` | string (uuid) | A unique identifier for the Invoice for customer payment, obtainable from the /invoiceForCustomerPayment/api-readList request |
| `paymentDetails[].comment` | string | An optional text field for any additional notes or comments related to the document |

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

## api-readList

`POST /org2/otherExpenses/api-readList`

A request to view a list of other expenses documents

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

| Поле | Тип | Обов'язкове | Опис |
|---|---|---|---|
| `pagination` | object | так | Pagination settings |
| `pagination.offset` | number | так | Pagination offset |
| `pagination.count` | number | так | Page size (row count) |
| `filters` | object |  | Filters for other expenses list |
| `filters.comment` | string |  | An optional text field for any additional notes or comments related to the document |
| `filters.expenseItems` | string (uuid)[] |  | A unique identifier for the Expense Item, obtainable from the /expenseItems/api-readList request |
| `filters.organization` | string (uuid)[] |  | A unique identifier for the Organization, obtainable from the /organization/api-readList request |
| `filters.responsible` | string (uuid)[] |  | A unique identifier for the Author, obtainable from the /user/api-readList request |
| `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 |

**Відповідь: поле `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 | Document sum |
| `[].responsible` | 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 |

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

## api-create

`POST /org2/otherExpenses/api-create`

A request to create an other expenses document

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

| Поле | Тип | Обов'язкове | Опис |
|---|---|---|---|
| `organization` | string (uuid) | так | A unique identifier for the Organization, obtainable from the /organization/api-readList request |
| `expenseItem` | string (uuid) | так | A unique identifier for the Expense Item, obtainable from the /expenseItems/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 |
| `paymentDetails` | object[] |  |  |
| `paymentDetails[].sum` | number | так | The sum for the expense item |
| `paymentDetails[].project` | string (uuid) | так | A unique identifier for the Project, obtainable from the /project/api-readList request |
| `paymentDetails[].lineOfBusiness` | string (uuid) | так | A unique identifier for the Line of Business, obtainable from the /lineOfBusiness/api-readList request |
| `paymentDetails[].expenseItem` | string (uuid) | так | A unique identifier for the Expense Item, obtainable from the /expenseItems/api-readList request |
| `paymentDetails[].invoiceForCustomerPayment` | string (uuid) |  | A unique identifier for the Invoice for customer payment, obtainable from the /invoiceForCustomerPayment/api-readList request |
| `paymentDetails[].comment` | string |  | An optional text field for any additional notes or comments related to the document |
| `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') |
| `author` | string (uuid) |  | A unique identifier for the Author, obtainable from the /user/api-readList request |
| `counterparty` | string (uuid) |  | A unique identifier for a counterparty of type 'isCustomer'.You can retrieve this UUID using the /counterparty/api-readList request |
| `comment` | string |  | An optional text field for any additional notes or comments related to the document |
| `atCostPrice` | boolean |  | Flag set when the user pressed the 'At cost price' button (sell price = cost price for all items) |
| `lineItemInTable` | boolean |  | Flag set when the user pressed the 'Item in the table section' button (item set per product line) |

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

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

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

## api-update

`POST /org2/otherExpenses/api-update`

A request to update or add information to an existing other expenses document

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

| Поле | Тип | Обов'язкове | Опис |
|---|---|---|---|
| `uuid` | string (uuid) | так |  |
| `organization` | string (uuid) | так | A unique identifier for the Organization, obtainable from the /organization/api-readList request |
| `expenseItem` | string (uuid) | так | A unique identifier for the Expense Item, obtainable from the /expenseItems/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 |
| `paymentDetails` | object[] |  |  |
| `paymentDetails[].sum` | number | так | The sum for the expense item |
| `paymentDetails[].project` | string (uuid) | так | A unique identifier for the Project, obtainable from the /project/api-readList request |
| `paymentDetails[].lineOfBusiness` | string (uuid) | так | A unique identifier for the Line of Business, obtainable from the /lineOfBusiness/api-readList request |
| `paymentDetails[].expenseItem` | string (uuid) | так | A unique identifier for the Expense Item, obtainable from the /expenseItems/api-readList request |
| `paymentDetails[].invoiceForCustomerPayment` | string (uuid) |  | A unique identifier for the Invoice for customer payment, obtainable from the /invoiceForCustomerPayment/api-readList request |
| `paymentDetails[].comment` | string |  | An optional text field for any additional notes or comments related to the document |
| `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') |
| `author` | string (uuid) |  | A unique identifier for the Author, obtainable from the /user/api-readList request |
| `counterparty` | string (uuid) |  | A unique identifier for a counterparty of type 'isCustomer'.You can retrieve this UUID using the /counterparty/api-readList request |
| `comment` | string |  | An optional text field for any additional notes or comments related to the document |
| `atCostPrice` | boolean |  | Flag set when the user pressed the 'At cost price' button (sell price = cost price for all items) |
| `lineItemInTable` | boolean |  | Flag set when the user pressed the 'Item in the table section' button (item set per product line) |

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

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

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

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