# Report warehouse

::: info
Every response arrives in the shared envelope — `code`, `message`, `messages`, `status_code`, `time` — with the payload in `data`. The tables below describe what is inside `data`.
:::

## POST /reports/in-stock/get

Current in-stock summary across selected warehouses.

**Required permission:** none — closed to an app that declares permissions · [how permissions work](https://docs.bito.uz/en/api/permissions.md)

**Example request**

::: 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);
```

:::

**Request body**

| Field | Type | Required | Description |
|---|---|---|---|
| `date_from` | `string (date-time)` | No | Start of the date range. |
| `date_to` | `string (date-time)` | No | End of the date range. |
| `is_product` | `boolean` | No |  |
| `is_material` | `boolean` | No |  |
| `is_semi_product` | `boolean` | No |  |
| `organization_ids` | `string[]` | No | Organization ObjectIds. |
| `organization_id` | `string` | No | Organization ObjectId. |
| `category_id` | `string` | No |  |
| `warehouse_ids` | `string[]` | No |  |
| `product_ids` | `string[]` | No |  |
| `page` | `number` | Yes | Page number, starting from 1. |
| `limit` | `number` | Yes | Maximum number of rows to return. |
| `search` | `string` | No | 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"
}
```

**Response**

```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.

**Required permission:** none — closed to an app that declares permissions · [how permissions work](https://docs.bito.uz/en/api/permissions.md)

**Example request**

::: 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);
```

:::

**Request body**

| Field | Type | Required | Description |
|---|---|---|---|
| `limit` | `number` | Yes | Maximum number of rows to return. |
| `page` | `number` | Yes | Page number, starting from 1. |
| `organization_id` | `string` | No | Organization ObjectId. |

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

**Response**

| Field | Type | Description |
|---|---|---|
| `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.

**Required permission:** none — closed to an app that declares permissions · [how permissions work](https://docs.bito.uz/en/api/permissions.md)

**Example request**

::: 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);
```

:::

**Request body**

| Field | Type | Required | Description |
|---|---|---|---|
| `transfer_id` | `string` | Yes |  |
| `product_id` | `string` | No |  |
| `product_ids` | `string[]` | No |  |
| `page` | `number` | Yes | Page number, starting from 1. |
| `limit` | `number` | Yes | Maximum number of rows to return. |
| `search` | `string` | No | Free-text search. |
| `organization_id` | `string` | No | Organization ObjectId. |

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

**Response**

Same response shape as [POST /reports/items/warehouse](#post-reports-items-warehouse).

## POST /reports/transfer/get-paging

Paginated list of warehouse transfers.

**Required permission:** none — closed to an app that declares permissions · [how permissions work](https://docs.bito.uz/en/api/permissions.md)

**Example request**

::: 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);
```

:::

**Request body**

| Field | Type | Required | Description |
|---|---|---|---|
| `type` | `string` | No | One of: `w2w`, `w2p`, `p2w`, `p2p`, `o2o` |
| `source_organization_id` | `string` | No |  |
| `destination_organization_id` | `string` | No |  |
| `sender_warehouse_id` | `string` | No |  |
| `receiver_warehouse_id` | `string` | No |  |
| `states` | `string[]` | No |  |
| `reason_id` | `string` | No |  |
| `responsible_id` | `string` | No |  |
| `page` | `number` | Yes | Page number, starting from 1. |
| `limit` | `number` | Yes | Maximum number of rows to return. |
| `search` | `string` | No | Free-text search. |
| `date_from` | `string (date-time)` | No | Start of the date range. |
| `date_to` | `string (date-time)` | No | End of the date range. |
| `organization_id` | `string` | No | Organization ObjectId. |
| `sort_by` | `string` | No | Field name to sort by. |
| `asc` | `integer` | No | Sort direction: `1` ascending, `-1` descending.. One of: `-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
}
```

**Response**

Same response shape as [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.).

**Required permission:** none — closed to an app that declares permissions · [how permissions work](https://docs.bito.uz/en/api/permissions.md)

**Example request**

::: 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);
```

:::

**Request body**

| Field | Type | Required | Description |
|---|---|---|---|
| `warehouse_id` | `string` | No |  |
| `reason_id` | `string` | No |  |
| `product_id` | `string` | No |  |
| `product_ids` | `string[]` | No |  |
| `page` | `number` | Yes | Page number, starting from 1. |
| `limit` | `number` | Yes | Maximum number of rows to return. |
| `date_from` | `string (date-time)` | No | Start of the date range. |
| `date_to` | `string (date-time)` | No | End of the date range. |
| `organization_id` | `string` | No | 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"
}
```

**Response**

Same response shape as [POST /reports/items/warehouse](#post-reports-items-warehouse).

---

*This page is generated from the OpenAPI spec.*
