Skip to content
View as Markdown

Report production ​

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/production/by-product ​

Manufacturing output aggregated by product.

Required permission: none — closed to an app that declares permissions · how permissions work

Example request

bash
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/reports/production/by-product' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "type": "used",
  "organization_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "organization_id": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "responsible_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "date_from": "2025-05-01T12:00:00Z",
  "date_to": "2025-05-01T12:00:00Z",
  "product_type": "is_semi_product",
  "sort_by": "string",
  "asc": -1
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/production/by-product', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "type": "used",
    "organization_ids": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "organization_id": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "responsible_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "product_ids": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "date_from": "2025-05-01T12:00:00Z",
    "date_to": "2025-05-01T12:00:00Z",
    "product_type": "is_semi_product",
    "sort_by": "string",
    "asc": -1
  }),
})
const { code, data } = await res.json()
python
import os
import requests

res = requests.request(
    "POST",
    "https://api.bito.uz/integration-api/integration/api/v2/reports/production/by-product",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "type": "used",
        "organization_ids": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "organization_id": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "responsible_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "product_ids": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "date_from": "2025-05-01T12:00:00Z",
        "date_to": "2025-05-01T12:00:00Z",
        "product_type": "is_semi_product",
        "sort_by": "string",
        "asc": -1,
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "type": "used",
  "organization_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "organization_id": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "responsible_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "date_from": "2025-05-01T12:00:00Z",
  "date_to": "2025-05-01T12:00:00Z",
  "product_type": "is_semi_product",
  "sort_by": "string",
  "asc": -1
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/production/by-product');
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

FieldTypeRequiredDescription
typestringNoOne of: used, produced
organization_idsstring[]NoOrganization ObjectIds.
organization_idstring[]NoOrganization ObjectId.
responsible_idstringNo
category_idstringNo
product_idstringNo
product_idsstring[]No
date_fromstring (date-time)NoStart of the date range.
date_tostring (date-time)NoEnd of the date range.
product_typestringNoOne of: is_semi_product, is_product, is_material, is_service
sort_bystringNoField name to sort by.
ascintegerNoSort direction: 1 ascending, -1 descending.. One of: -1, 1
json
{
  "type": "used",
  "organization_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "organization_id": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "responsible_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "date_from": "2025-05-01T12:00:00Z",
  "date_to": "2025-05-01T12:00:00Z",
  "product_type": "is_semi_product",
  "sort_by": "string",
  "asc": -1
}

Response

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

POST /reports/production/by-responsible ​

Manufacturing output aggregated by responsible user.

Required permission: none — closed to an app that declares permissions · how permissions work

Example request

bash
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/reports/production/by-responsible' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "type": "used",
  "organization_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "organization_id": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "responsible_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "warehouse_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "date_from": "2025-05-01T12:00:00Z",
  "date_to": "2025-05-01T12:00:00Z"
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/production/by-responsible', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "type": "used",
    "organization_ids": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "organization_id": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "responsible_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "warehouse_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "date_from": "2025-05-01T12:00:00Z",
    "date_to": "2025-05-01T12:00:00Z"
  }),
})
const { code, data } = await res.json()
python
import os
import requests

res = requests.request(
    "POST",
    "https://api.bito.uz/integration-api/integration/api/v2/reports/production/by-responsible",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "type": "used",
        "organization_ids": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "organization_id": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "responsible_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "warehouse_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "date_from": "2025-05-01T12:00:00Z",
        "date_to": "2025-05-01T12:00:00Z",
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "type": "used",
  "organization_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "organization_id": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "responsible_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "warehouse_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "date_from": "2025-05-01T12:00:00Z",
  "date_to": "2025-05-01T12:00:00Z"
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/production/by-responsible');
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

FieldTypeRequiredDescription
typestringNoOne of: used, produced
organization_idsstring[]NoOrganization ObjectIds.
organization_idstring[]NoOrganization ObjectId.
responsible_idstringNo
warehouse_idstringNo
product_idstringNo
date_fromstring (date-time)NoStart of the date range.
date_tostring (date-time)NoEnd of the date range.
json
{
  "type": "used",
  "organization_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "organization_id": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "responsible_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "warehouse_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "date_from": "2025-05-01T12:00:00Z",
  "date_to": "2025-05-01T12:00:00Z"
}

Response

Same response shape as POST /reports/production/by-product.

POST /reports/production/by-responsible-and-product ​

Manufacturing output aggregated by (responsible, product) pair.

Required permission: none — closed to an app that declares permissions · how permissions work

Example request

bash
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/reports/production/by-responsible-and-product' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "type": "used",
  "organization_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "organization_id": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "responsible_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "warehouse_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "date_from": "2025-05-01T12:00:00Z",
  "date_to": "2025-05-01T12:00:00Z",
  "product_type": "is_semi_product"
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/production/by-responsible-and-product', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "type": "used",
    "organization_ids": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "organization_id": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "responsible_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "warehouse_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "product_ids": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "date_from": "2025-05-01T12:00:00Z",
    "date_to": "2025-05-01T12:00:00Z",
    "product_type": "is_semi_product"
  }),
})
const { code, data } = await res.json()
python
import os
import requests

res = requests.request(
    "POST",
    "https://api.bito.uz/integration-api/integration/api/v2/reports/production/by-responsible-and-product",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "type": "used",
        "organization_ids": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "organization_id": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "responsible_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "warehouse_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "product_ids": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "date_from": "2025-05-01T12:00:00Z",
        "date_to": "2025-05-01T12:00:00Z",
        "product_type": "is_semi_product",
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "type": "used",
  "organization_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "organization_id": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "responsible_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "warehouse_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "date_from": "2025-05-01T12:00:00Z",
  "date_to": "2025-05-01T12:00:00Z",
  "product_type": "is_semi_product"
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/production/by-responsible-and-product');
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

FieldTypeRequiredDescription
typestringNoOne of: used, produced
organization_idsstring[]NoOrganization ObjectIds.
organization_idstring[]NoOrganization ObjectId.
responsible_idstringNo
warehouse_idstringNo
category_idstringNo
product_idstringNo
product_idsstring[]No
date_fromstring (date-time)NoStart of the date range.
date_tostring (date-time)NoEnd of the date range.
product_typestringNoOne of: is_semi_product, is_product, is_material, is_service
json
{
  "type": "used",
  "organization_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "organization_id": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "responsible_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "warehouse_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "date_from": "2025-05-01T12:00:00Z",
  "date_to": "2025-05-01T12:00:00Z",
  "product_type": "is_semi_product"
}

Response

Same response shape as POST /reports/production/by-product.

POST /reports/production/recommended-to-be-used ​

Recommended raw-materials to use for upcoming production based on stock + open orders.

Required permission: none — closed to an app that declares permissions · how permissions work

Example request

bash
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/reports/production/recommended-to-be-used' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "search": "string",
  "organization_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "organization_id": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "warehouse_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "days_ago": 0,
  "sort_by": "string",
  "asc": -1
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/production/recommended-to-be-used', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "search": "string",
    "organization_ids": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "organization_id": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "warehouse_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "product_ids": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "days_ago": 0,
    "sort_by": "string",
    "asc": -1
  }),
})
const { code, data } = await res.json()
python
import os
import requests

res = requests.request(
    "POST",
    "https://api.bito.uz/integration-api/integration/api/v2/reports/production/recommended-to-be-used",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "search": "string",
        "organization_ids": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "organization_id": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "warehouse_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "product_ids": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "days_ago": 0,
        "sort_by": "string",
        "asc": -1,
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "search": "string",
  "organization_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "organization_id": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "warehouse_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "days_ago": 0,
  "sort_by": "string",
  "asc": -1
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/production/recommended-to-be-used');
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

FieldTypeRequiredDescription
searchstringNoFree-text search.
organization_idsstring[]NoOrganization ObjectIds.
organization_idstring[]NoOrganization ObjectId.
warehouse_idstringNo
category_idstringNo
product_idstringNo
product_idsstring[]No
days_agonumberNo
sort_bystringNoField name to sort by.
ascintegerNoSort direction: 1 ascending, -1 descending.. One of: -1, 1
json
{
  "search": "string",
  "organization_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "organization_id": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "warehouse_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "days_ago": 0,
  "sort_by": "string",
  "asc": -1
}

Response

Same response shape as POST /reports/production/by-product.


This page is generated from the OpenAPI spec.

Bito 2.0 Integration API