# Партії: методи API Bimp

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

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

| Метод | Що робить |
|---|---|
| [`POST /org2/party/api-readList`](#api-read-list) | A request to view a list of parties for the specified nomenclature GUID |
| [`POST /org2/party/api-read`](#api-read) | A request to obtain detailed information for a party |
| [`POST /org2/party/api-update`](#api-update) | A request to update a party |

## api-readList

`POST /org2/party/api-readList`

A request to view a list of parties for the specified nomenclature GUID

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

| Поле | Тип | Обов'язкове | Опис |
|---|---|---|---|
| `uuid` | string (uuid) | так | Nomenclature GUID for which parties should be returned |

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

| Поле | Тип | Опис |
|---|---|---|
| `[].uuid` | string (uuid) |  |
| `[].name` | string |  |
| `[].archived` | boolean |  |
| `[].stockBalance` | number |  |
| `[].receiptDate` | string |  |
| `[].imei` | string |  |
| `[].comment` | string |  |
| `[].serialNumber` | string |  |
| `[].supplierName` | string |  |
| `[].quantity` | number |  |
| `[].expirationDate` | string \| null |  |
| `[].costPrice` | number |  |
| `[].accountingCurrency` | object \| null |  |
| `[].price` | number |  |
| `[].costPriceInCurrency` | number |  |
| `[].currency` | object \| null |  |
| `[].warehouse` | object \| null |  |
| `[].nomenclature` | object \| null |  |
| `[].unitOfMeasurement` | object \| null |  |
| `[].serialNumbers` | object \| null |  |
| `[].reserve` | number |  |
| `[].characteristic` | object \| null |  |

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

## api-read

`POST /org2/party/api-read`

A request to obtain detailed information for a party

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

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

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

| Поле | Тип | Опис |
|---|---|---|
| `uuid` | string (uuid) |  |
| `name` | string |  |
| `archived` | boolean |  |
| `stockBalance` | number |  |
| `receiptDate` | string |  |
| `imei` | string |  |
| `comment` | string |  |
| `serialNumber` | string |  |
| `supplierName` | string |  |
| `quantity` | number |  |
| `expirationDate` | string \| null |  |
| `costPrice` | number |  |
| `accountingCurrency` | object \| null |  |
| `price` | number |  |
| `costPriceInCurrency` | number |  |
| `currency` | object \| null |  |
| `warehouse` | object \| null |  |
| `nomenclature` | object \| null |  |
| `unitOfMeasurement` | object \| null |  |
| `serialNumbers` | object \| null |  |
| `reserve` | number |  |
| `characteristic` | object \| null |  |
| `counterparty` | object \| null |  |
| `shelfLife` | number |  |
| `receiptDocument` | object \| null |  |
| `barcode` | string |  |

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

## api-update

`POST /org2/party/api-update`

A request to update a party

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

| Поле | Тип | Обов'язкове | Опис |
|---|---|---|---|
| `uuid` | string (uuid) | так | A unique uuid key of the party |
| `name` | string |  |  |
| `archived` | boolean |  |  |
| `stockBalance` | number |  |  |
| `receiptDate` | string |  |  |
| `imei` | string |  |  |
| `comment` | string |  |  |
| `serialNumber` | string |  |  |
| `supplierName` | string |  |  |
| `quantity` | number |  |  |
| `expirationDate` | string \| null |  |  |
| `costPrice` | number |  |  |
| `accountingCurrency` | object \| null |  |  |
| `price` | number |  |  |
| `costPriceInCurrency` | number |  |  |
| `currency` | object \| null |  |  |
| `warehouse` | object \| null |  |  |
| `nomenclature` | object \| null |  |  |
| `unitOfMeasurement` | object \| null |  |  |
| `serialNumbers` | object \| null |  |  |
| `reserve` | number |  |  |
| `characteristic` | object \| null |  |  |
| `counterparty` | object \| null |  |  |
| `shelfLife` | number |  |  |
| `receiptDocument` | object \| null |  |  |
| `barcode` | string |  |  |

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

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

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