Skip to content
Markdown

Report production ​

INFO

Har bir javob umumiy konvertda qaytadi — code, message, messages, status_code, time — foydali yuk esa data ichida. Quyidagi jadvallar faqat data ichini tavsiflaydi.

POST /reports/production/by-product ​

Manufacturing output aggregated by product.

Kerakli ruxsat: yo‘q — ruxsat e’lon qilgan ilova uchun yopiq · ruxsatlar qanday ishlaydi

So‘rov namunasi

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

So‘rov tanasi

MaydonTurMajburiyTavsif
typestringYo‘qMumkin qiymatlar: used, produced
organization_idsstring[]Yo‘qOrganization ObjectIds.
organization_idstring[]Yo‘qOrganization ObjectId.
responsible_idstringYo‘q
category_idstringYo‘q
product_idstringYo‘q
product_idsstring[]Yo‘q
date_fromstring (date-time)Yo‘qStart of the date range.
date_tostring (date-time)Yo‘qEnd of the date range.
product_typestringYo‘qMumkin qiymatlar: is_semi_product, is_product, is_material, is_service
sort_bystringYo‘qField name to sort by.
ascintegerYo‘qSort direction: 1 ascending, -1 descending.. Mumkin qiymatlar: -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
}

Javob

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

Kerakli ruxsat: yo‘q — ruxsat e’lon qilgan ilova uchun yopiq · ruxsatlar qanday ishlaydi

So‘rov namunasi

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

So‘rov tanasi

MaydonTurMajburiyTavsif
typestringYo‘qMumkin qiymatlar: used, produced
organization_idsstring[]Yo‘qOrganization ObjectIds.
organization_idstring[]Yo‘qOrganization ObjectId.
responsible_idstringYo‘q
warehouse_idstringYo‘q
product_idstringYo‘q
date_fromstring (date-time)Yo‘qStart of the date range.
date_tostring (date-time)Yo‘qEnd 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"
}

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /reports/production/by-product.

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

Manufacturing output aggregated by (responsible, product) pair.

Kerakli ruxsat: yo‘q — ruxsat e’lon qilgan ilova uchun yopiq · ruxsatlar qanday ishlaydi

So‘rov namunasi

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

So‘rov tanasi

MaydonTurMajburiyTavsif
typestringYo‘qMumkin qiymatlar: used, produced
organization_idsstring[]Yo‘qOrganization ObjectIds.
organization_idstring[]Yo‘qOrganization ObjectId.
responsible_idstringYo‘q
warehouse_idstringYo‘q
category_idstringYo‘q
product_idstringYo‘q
product_idsstring[]Yo‘q
date_fromstring (date-time)Yo‘qStart of the date range.
date_tostring (date-time)Yo‘qEnd of the date range.
product_typestringYo‘qMumkin qiymatlar: 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"
}

Javob

Javob tuzilishi quyidagi bilan bir xil: 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.

Kerakli ruxsat: yo‘q — ruxsat e’lon qilgan ilova uchun yopiq · ruxsatlar qanday ishlaydi

So‘rov namunasi

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

So‘rov tanasi

MaydonTurMajburiyTavsif
searchstringYo‘qFree-text search.
organization_idsstring[]Yo‘qOrganization ObjectIds.
organization_idstring[]Yo‘qOrganization ObjectId.
warehouse_idstringYo‘q
category_idstringYo‘q
product_idstringYo‘q
product_idsstring[]Yo‘q
days_agonumberYo‘q
sort_bystringYo‘qField name to sort by.
ascintegerYo‘qSort direction: 1 ascending, -1 descending.. Mumkin qiymatlar: -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
}

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /reports/production/by-product.


Bu sahifa OpenAPI spetsifikatsiyasidan yaratilgan.

Bito 2.0 Integration API