# Повернення коштів від постачальника: методи API Bimp

URL: https://bimpsoft.com/help/developers/api-reference/refund-from-supplier/

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

| Метод | Що робить |
|---|---|
| [`POST /org2/refundFromSupplier/api-read`](#api-read) | A request to obtain detailed information for a refund from supplier document |
| [`POST /org2/refundFromSupplier/api-create`](#api-create) | A request to create a refund from supplier document |
| [`POST /org2/refundFromSupplier/api-update`](#api-update) | A request to update a refund from supplier document |
| [`POST /org2/refundFromSupplier/api-cancel`](#api-cancel) | Archive a refund from supplier document |

## api-read

`POST /org2/refundFromSupplier/api-read`

A request to obtain detailed information for a refund from supplier document

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

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

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

| Поле | Тип | Опис |
|---|---|---|
| `uuid` | string (uuid) | A unique uuid key for a refund from supplier document |
| `date` | string | The document's date in the format 'YYYY-MM-DDTHH:MM:SS' (e.g., '2025-05-16T09:17:49') |
| `number` | string |  |
| `name` | string |  |
| `comment` | string | An optional text field for any additional notes or comments related to the document |
| `counterparty` | string (uuid) | A unique uuid key for a supplier |
| `organization` | string (uuid) | A unique identifier for the Organization, obtainable from the /organization/api-readList request |
| `status` | string (uuid) | A unique uuid key for a document status |
| `author` | string (uuid) | A unique uuid key for a document author |
| `currency` | string (uuid) | A unique uuid key for a currency |
| `paymentEntity` | string (uuid) | The unique identifier for the payment entity type, obtainable from the /bankAccounts/api-readList request OR from /cashRegistry/api-readList request |
| `expenseItem` | string (uuid) | A unique identifier for the Expense Item, obtainable from the /expenseItems/api-readList request |
| `project` | string (uuid) \| null |  |
| `documentSum` | number | Total amount of the refund document |
| `paymentDetails` | object[] | Payment breakdown by supplier order |
| `paymentDetails[].invoiceForSupplierPayment` | string (uuid) | A unique identifier for the Invoice for customer payment, obtainable from the /invoiceForSupplierPayment/api-readList request |
| `paymentDetails[].refundSum` | number | Refund amount for this supplier order |
| `paymentDetails[].documentType` | number | Linked document type id (defaults to invoice for supplier payment) |
| `paymentDetails[].hasPayment` | boolean | Whether the linked document has a payment |

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

## api-create

`POST /org2/refundFromSupplier/api-create`

A request to create a refund from supplier document

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

| Поле | Тип | Обов'язкове | Опис |
|---|---|---|---|
| `counterparty` | string (uuid) | так | A unique uuid key for a supplier |
| `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 |
| `author` | string (uuid) | так | A unique uuid key for a document author |
| `expenseItem` | string (uuid) | так | A unique identifier for the Expense Item, obtainable from the /expenseItems/api-readList request |
| `paymentDetails` | object[] | так | Payment breakdown by supplier order |
| `paymentDetails[].invoiceForSupplierPayment` | string (uuid) | так | A unique identifier for the Invoice for customer payment, obtainable from the /invoiceForSupplierPayment/api-readList request |
| `paymentDetails[].refundSum` | number | так | Refund amount for this supplier order |
| `paymentDetails[].documentType` | number |  | Linked document type id (defaults to invoice for supplier payment) |
| `paymentDetails[].hasPayment` | boolean |  | Whether the linked document has a payment |
| `date` | string |  | The document's date in the format 'YYYY-MM-DDTHH:MM:SS' (e.g., '2025-05-16T09:17:49') |
| `name` | string |  |  |
| `status` | string (uuid) |  | A unique uuid key for a document status |
| `project` | string (uuid) \| null |  |  |
| `comment` | string |  | An optional text field for any additional notes or comments related to the document |
| `documentSum` | number |  | Total amount of the refund document |

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

| Поле | Тип | Опис |
|---|---|---|
| `uuid` | string (uuid) | A unique uuid key for a refund from supplier document |
| `date` | string | The document's date in the format 'YYYY-MM-DDTHH:MM:SS' (e.g., '2025-05-16T09:17:49') |
| `number` | string |  |
| `name` | string |  |
| `comment` | string | An optional text field for any additional notes or comments related to the document |
| `counterparty` | string (uuid) | A unique uuid key for a supplier |
| `organization` | string (uuid) | A unique identifier for the Organization, obtainable from the /organization/api-readList request |
| `status` | string (uuid) | A unique uuid key for a document status |
| `author` | string (uuid) | A unique uuid key for a document author |
| `currency` | string (uuid) | A unique uuid key for a currency |
| `paymentEntity` | string (uuid) | The unique identifier for the payment entity type, obtainable from the /bankAccounts/api-readList request OR from /cashRegistry/api-readList request |
| `expenseItem` | string (uuid) | A unique identifier for the Expense Item, obtainable from the /expenseItems/api-readList request |
| `project` | string (uuid) \| null |  |
| `documentSum` | number | Total amount of the refund document |
| `paymentDetails` | object[] | Payment breakdown by supplier order |
| `paymentDetails[].invoiceForSupplierPayment` | string (uuid) | A unique identifier for the Invoice for customer payment, obtainable from the /invoiceForSupplierPayment/api-readList request |
| `paymentDetails[].refundSum` | number | Refund amount for this supplier order |
| `paymentDetails[].documentType` | number | Linked document type id (defaults to invoice for supplier payment) |
| `paymentDetails[].hasPayment` | boolean | Whether the linked document has a payment |

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

## api-update

`POST /org2/refundFromSupplier/api-update`

A request to update a refund from supplier document

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

| Поле | Тип | Обов'язкове | Опис |
|---|---|---|---|
| `uuid` | string (uuid) | так | A unique uuid key for a refund from supplier document |
| `date` | string |  | The document's date in the format 'YYYY-MM-DDTHH:MM:SS' (e.g., '2025-05-16T09:17:49') |
| `name` | string |  |  |
| `status` | string (uuid) |  | A unique uuid key for a document status |
| `expenseItem` | string (uuid) |  | A unique identifier for the Expense Item, obtainable from the /expenseItems/api-readList request |
| `counterparty` | string (uuid) |  | A unique uuid key for a supplier |
| `project` | string (uuid) \| null |  |  |
| `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 |
| `author` | string (uuid) |  | A unique uuid key for a document author |
| `comment` | string |  | An optional text field for any additional notes or comments related to the document |
| `documentSum` | number |  | Total amount of the refund document |
| `paymentDetails` | object[] |  | Payment breakdown by supplier order |
| `paymentDetails[].invoiceForSupplierPayment` | string (uuid) | так | A unique identifier for the Invoice for customer payment, obtainable from the /invoiceForSupplierPayment/api-readList request |
| `paymentDetails[].refundSum` | number | так | Refund amount for this supplier order |
| `paymentDetails[].documentType` | number |  | Linked document type id (defaults to invoice for supplier payment) |
| `paymentDetails[].hasPayment` | boolean |  | Whether the linked document has a payment |

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

| Поле | Тип | Опис |
|---|---|---|
| `uuid` | string (uuid) | A unique uuid key for a refund from supplier document |
| `date` | string | The document's date in the format 'YYYY-MM-DDTHH:MM:SS' (e.g., '2025-05-16T09:17:49') |
| `number` | string |  |
| `name` | string |  |
| `comment` | string | An optional text field for any additional notes or comments related to the document |
| `counterparty` | string (uuid) | A unique uuid key for a supplier |
| `organization` | string (uuid) | A unique identifier for the Organization, obtainable from the /organization/api-readList request |
| `status` | string (uuid) | A unique uuid key for a document status |
| `author` | string (uuid) | A unique uuid key for a document author |
| `currency` | string (uuid) | A unique uuid key for a currency |
| `paymentEntity` | string (uuid) | The unique identifier for the payment entity type, obtainable from the /bankAccounts/api-readList request OR from /cashRegistry/api-readList request |
| `expenseItem` | string (uuid) | A unique identifier for the Expense Item, obtainable from the /expenseItems/api-readList request |
| `project` | string (uuid) \| null |  |
| `documentSum` | number | Total amount of the refund document |
| `paymentDetails` | object[] | Payment breakdown by supplier order |
| `paymentDetails[].invoiceForSupplierPayment` | string (uuid) | A unique identifier for the Invoice for customer payment, obtainable from the /invoiceForSupplierPayment/api-readList request |
| `paymentDetails[].refundSum` | number | Refund amount for this supplier order |
| `paymentDetails[].documentType` | number | Linked document type id (defaults to invoice for supplier payment) |
| `paymentDetails[].hasPayment` | boolean | Whether the linked document has a payment |

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

## api-cancel

`POST /org2/refundFromSupplier/api-cancel`

Archive a refund from supplier document

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

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

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

| Поле | Тип | Опис |
|---|---|---|
| `success` | boolean (true) |  |

```bash
curl -X POST 'https://app.bimpsoft.com/org2/refundFromSupplier/api-cancel' \
  -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; ця сторінка згенерована з неї автоматично.
