# Report warehouse

::: info
Каждый ответ приходит в общем конверте — `code`, `message`, `messages`, `status_code`, `time` — а полезная нагрузка лежит в `data`. Таблицы ниже описывают содержимое `data`.
:::

## POST /reports/in-stock/get

Current in-stock summary across selected warehouses.

**Нужное разрешение:** нет — закрыто для приложения, объявившего разрешения · [как работают разрешения](https://docs.bito.uz/ru/api/permissions.md)

**Пример запроса**

::: code-group

```bash [curl]
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/reports/in-stock/get' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "page": 0,
  "limit": 0
}'
```

```js [JavaScript]
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/in-stock/get', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "page": 0,
    "limit": 0
  }),
})
const { code, data } = await res.json()
```

```python [Python]
import os
import requests

res = requests.request(
    "POST",
    "https://api.bito.uz/integration-api/integration/api/v2/reports/in-stock/get",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "page": 0,
        "limit": 0,
    },
)
print(res.json())
```

```php [PHP]
<?php
$body = <<<'JSON'
{
  "page": 0,
  "limit": 0
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/in-stock/get');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY'), 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => $body,
    CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
```

:::

**Тело запроса**

| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
| `date_from` | `string (date-time)` | Нет | Start of the date range. |
| `date_to` | `string (date-time)` | Нет | End of the date range. |
| `is_product` | `boolean` | Нет |  |
| `is_material` | `boolean` | Нет |  |
| `is_semi_product` | `boolean` | Нет |  |
| `organization_ids` | `string[]` | Нет | Organization ObjectIds. |
| `organization_id` | `string` | Нет | Organization ObjectId. |
| `category_id` | `string` | Нет |  |
| `warehouse_ids` | `string[]` | Нет |  |
| `product_ids` | `string[]` | Нет |  |
| `page` | `number` | Да | Page number, starting from 1. |
| `limit` | `number` | Да | Maximum number of rows to return. |
| `search` | `string` | Нет | Free-text search. |

```json
{
  "date_from": "2025-05-01T12:00:00Z",
  "date_to": "2025-05-01T12:00:00Z",
  "is_product": false,
  "is_material": false,
  "is_semi_product": false,
  "organization_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "warehouse_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "product_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "page": 0,
  "limit": 0,
  "search": "string"
}
```

**Ответ**

```json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {},
  "time": "2025-05-01T12:00:00Z"
}
```

## POST /reports/items/warehouse

Per-item stock levels by warehouse.

**Нужное разрешение:** нет — закрыто для приложения, объявившего разрешения · [как работают разрешения](https://docs.bito.uz/ru/api/permissions.md)

**Пример запроса**

::: code-group

```bash [curl]
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/reports/items/warehouse' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "limit": 0,
  "page": 0
}'
```

```js [JavaScript]
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/items/warehouse', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "limit": 0,
    "page": 0
  }),
})
const { code, data } = await res.json()
```

```python [Python]
import os
import requests

res = requests.request(
    "POST",
    "https://api.bito.uz/integration-api/integration/api/v2/reports/items/warehouse",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "limit": 0,
        "page": 0,
    },
)
print(res.json())
```

```php [PHP]
<?php
$body = <<<'JSON'
{
  "limit": 0,
  "page": 0
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/items/warehouse');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY'), 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => $body,
    CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
```

:::

**Тело запроса**

| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
| `limit` | `number` | Да | Maximum number of rows to return. |
| `page` | `number` | Да | Page number, starting from 1. |
| `organization_id` | `string` | Нет | Organization ObjectId. |

```json
{
  "limit": 0,
  "page": 0,
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff"
}
```

**Ответ**

| Поле | Тип | Описание |
|---|---|---|
| `list` | `object[]` |  |
| `total` | `number` |  |

```json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "list": [
      {}
    ],
    "total": 0
  },
  "time": "2025-05-01T12:00:00Z"
}
```

## POST /reports/transfer/get-items

Items moved via warehouse transfers in the reporting window.

**Нужное разрешение:** нет — закрыто для приложения, объявившего разрешения · [как работают разрешения](https://docs.bito.uz/ru/api/permissions.md)

**Пример запроса**

::: code-group

```bash [curl]
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/reports/transfer/get-items' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "transfer_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "page": 0,
  "limit": 0
}'
```

```js [JavaScript]
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/transfer/get-items', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "transfer_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "page": 0,
    "limit": 0
  }),
})
const { code, data } = await res.json()
```

```python [Python]
import os
import requests

res = requests.request(
    "POST",
    "https://api.bito.uz/integration-api/integration/api/v2/reports/transfer/get-items",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "transfer_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "page": 0,
        "limit": 0,
    },
)
print(res.json())
```

```php [PHP]
<?php
$body = <<<'JSON'
{
  "transfer_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "page": 0,
  "limit": 0
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/transfer/get-items');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY'), 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => $body,
    CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
```

:::

**Тело запроса**

| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
| `transfer_id` | `string` | Да |  |
| `product_id` | `string` | Нет |  |
| `product_ids` | `string[]` | Нет |  |
| `page` | `number` | Да | Page number, starting from 1. |
| `limit` | `number` | Да | Maximum number of rows to return. |
| `search` | `string` | Нет | Free-text search. |
| `organization_id` | `string` | Нет | Organization ObjectId. |

```json
{
  "transfer_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "page": 0,
  "limit": 0,
  "search": "string",
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff"
}
```

**Ответ**

Структура ответа совпадает с [POST /reports/items/warehouse](#post-reports-items-warehouse).

## POST /reports/transfer/get-paging

Paginated list of warehouse transfers.

**Нужное разрешение:** нет — закрыто для приложения, объявившего разрешения · [как работают разрешения](https://docs.bito.uz/ru/api/permissions.md)

**Пример запроса**

::: code-group

```bash [curl]
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/reports/transfer/get-paging' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "page": 0,
  "limit": 0
}'
```

```js [JavaScript]
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/transfer/get-paging', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "page": 0,
    "limit": 0
  }),
})
const { code, data } = await res.json()
```

```python [Python]
import os
import requests

res = requests.request(
    "POST",
    "https://api.bito.uz/integration-api/integration/api/v2/reports/transfer/get-paging",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "page": 0,
        "limit": 0,
    },
)
print(res.json())
```

```php [PHP]
<?php
$body = <<<'JSON'
{
  "page": 0,
  "limit": 0
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/transfer/get-paging');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY'), 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => $body,
    CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
```

:::

**Тело запроса**

| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
| `type` | `string` | Нет | Допустимые значения: `w2w`, `w2p`, `p2w`, `p2p`, `o2o` |
| `source_organization_id` | `string` | Нет |  |
| `destination_organization_id` | `string` | Нет |  |
| `sender_warehouse_id` | `string` | Нет |  |
| `receiver_warehouse_id` | `string` | Нет |  |
| `states` | `string[]` | Нет |  |
| `reason_id` | `string` | Нет |  |
| `responsible_id` | `string` | Нет |  |
| `page` | `number` | Да | Page number, starting from 1. |
| `limit` | `number` | Да | Maximum number of rows to return. |
| `search` | `string` | Нет | Free-text search. |
| `date_from` | `string (date-time)` | Нет | Start of the date range. |
| `date_to` | `string (date-time)` | Нет | End of the date range. |
| `organization_id` | `string` | Нет | Organization ObjectId. |
| `sort_by` | `string` | Нет | Field name to sort by. |
| `asc` | `integer` | Нет | Sort direction: `1` ascending, `-1` descending.. Допустимые значения: `-1`, `1` |

```json
{
  "type": "w2w",
  "source_organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "destination_organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "sender_warehouse_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "receiver_warehouse_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "states": [
    "new"
  ],
  "reason_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "responsible_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "page": 0,
  "limit": 0,
  "search": "string",
  "date_from": "2025-05-01T12:00:00Z",
  "date_to": "2025-05-01T12:00:00Z",
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "sort_by": "string",
  "asc": -1
}
```

**Ответ**

Структура ответа совпадает с [POST /reports/items/warehouse](#post-reports-items-warehouse).

## POST /reports/write-off/by-reason/get-paging

Write-offs grouped by reason (damaged, expired, lost, etc.).

**Нужное разрешение:** нет — закрыто для приложения, объявившего разрешения · [как работают разрешения](https://docs.bito.uz/ru/api/permissions.md)

**Пример запроса**

::: code-group

```bash [curl]
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/reports/write-off/by-reason/get-paging' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "page": 0,
  "limit": 0
}'
```

```js [JavaScript]
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/write-off/by-reason/get-paging', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "page": 0,
    "limit": 0
  }),
})
const { code, data } = await res.json()
```

```python [Python]
import os
import requests

res = requests.request(
    "POST",
    "https://api.bito.uz/integration-api/integration/api/v2/reports/write-off/by-reason/get-paging",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "page": 0,
        "limit": 0,
    },
)
print(res.json())
```

```php [PHP]
<?php
$body = <<<'JSON'
{
  "page": 0,
  "limit": 0
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/write-off/by-reason/get-paging');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY'), 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => $body,
    CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
```

:::

**Тело запроса**

| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
| `warehouse_id` | `string` | Нет |  |
| `reason_id` | `string` | Нет |  |
| `product_id` | `string` | Нет |  |
| `product_ids` | `string[]` | Нет |  |
| `page` | `number` | Да | Page number, starting from 1. |
| `limit` | `number` | Да | Maximum number of rows to return. |
| `date_from` | `string (date-time)` | Нет | Start of the date range. |
| `date_to` | `string (date-time)` | Нет | End of the date range. |
| `organization_id` | `string` | Нет | Organization ObjectId. |

```json
{
  "warehouse_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "reason_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "page": 0,
  "limit": 0,
  "date_from": "2025-05-01T12:00:00Z",
  "date_to": "2025-05-01T12:00:00Z",
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff"
}
```

**Ответ**

Структура ответа совпадает с [POST /reports/items/warehouse](#post-reports-items-warehouse).

---

*Эта страница сгенерирована из спецификации OpenAPI.*
