Skip to content
Markdown

Report dashboard ​

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/summary/debt/paging ​

Paginated debt rows for the dashboard summary card.

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/summary/debt/paging' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "limit": 0,
  "page": 0
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/summary/debt/paging', {
  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
import os
import requests

res = requests.request(
    "POST",
    "https://api.bito.uz/integration-api/integration/api/v2/reports/summary/debt/paging",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "limit": 0,
        "page": 0,
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "limit": 0,
  "page": 0
}
JSON;

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

So‘rov tanasi

MaydonTurMajburiyTavsif
limitnumberHaMaximum number of rows to return.
pagenumberHaPage number, starting from 1.
organization_idstringYo‘qOrganization ObjectId.
supplier_idstringYo‘q
customer_idstringYo‘q
sortobjectYo‘q
sort.nameintegerYo‘qMumkin qiymatlar: 1, -1
searchstringYo‘qFree-text search.
json
{
  "limit": 0,
  "page": 0,
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "supplier_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "customer_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "sort": {
    "name": 1
  },
  "search": "string"
}

Javob

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

POST /reports/summary/credit/paging ​

Paginated credit rows for the dashboard summary card.

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/summary/credit/paging' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "limit": 0,
  "page": 0
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/summary/credit/paging', {
  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
import os
import requests

res = requests.request(
    "POST",
    "https://api.bito.uz/integration-api/integration/api/v2/reports/summary/credit/paging",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "limit": 0,
        "page": 0,
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "limit": 0,
  "page": 0
}
JSON;

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

So‘rov tanasi

MaydonTurMajburiyTavsif
limitnumberHaMaximum number of rows to return.
pagenumberHaPage number, starting from 1.
organization_idstringYo‘qOrganization ObjectId.
supplier_idstringYo‘q
customer_idstringYo‘q
sortobjectYo‘q
sort.nameintegerYo‘qMumkin qiymatlar: 1, -1
searchstringYo‘qFree-text search.
json
{
  "limit": 0,
  "page": 0,
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "supplier_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "customer_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "sort": {
    "name": 1
  },
  "search": "string"
}

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /reports/summary/debt/paging.

POST /reports/customers/health-score/charts ​

Customer health-score time series for charts.

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/customers/health-score/charts' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "from_date": "2025-05-01T12:00:00Z",
  "to_date": "2025-05-01T12:00:00Z",
  "divider": "hour",
  "field": "gross_sales",
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "type": "product"
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/customers/health-score/charts', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "from_date": "2025-05-01T12:00:00Z",
    "to_date": "2025-05-01T12:00:00Z",
    "divider": "hour",
    "field": "gross_sales",
    "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "type": "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/customers/health-score/charts",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "from_date": "2025-05-01T12:00:00Z",
        "to_date": "2025-05-01T12:00:00Z",
        "divider": "hour",
        "field": "gross_sales",
        "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "type": "product",
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "from_date": "2025-05-01T12:00:00Z",
  "to_date": "2025-05-01T12:00:00Z",
  "divider": "hour",
  "field": "gross_sales",
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "type": "product"
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/customers/health-score/charts');
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
from_datestring (date-time)Yo‘qStart of the reporting window.
to_datestring (date-time)Yo‘qEnd of the reporting window.
dividerstringYo‘qTime bucket of the chart series.. Mumkin qiymatlar: hour, day, week, month, quarter, year. Standart: "day"
fieldstringYo‘qMetric the chart plots.. Mumkin qiymatlar: gross_sales, refund, discount, gift, net_sales, profit. Standart: "gross_sales"
organization_idstringYo‘qOrganization ObjectId.
category_idstringYo‘q
product_idstringYo‘q
typestringYo‘qMumkin qiymatlar: product, customer, employee, payment, category
json
{
  "from_date": "2025-05-01T12:00:00Z",
  "to_date": "2025-05-01T12:00:00Z",
  "divider": "hour",
  "field": "gross_sales",
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "type": "product"
}

Javob

json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": [
    {
      "label": "string",
      "value": 0
    }
  ],
  "time": "2025-05-01T12:00:00Z"
}

POST /reports/customers/health-score/summary ​

Aggregate customer health-score summary (good / warning / churn-risk counts).

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/customers/health-score/summary' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "from_date": "2025-05-01T12:00:00Z",
  "to_date": "2025-05-01T12:00:00Z",
  "divider": "hour",
  "field": "gross_sales",
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "type": "product"
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/customers/health-score/summary', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "from_date": "2025-05-01T12:00:00Z",
    "to_date": "2025-05-01T12:00:00Z",
    "divider": "hour",
    "field": "gross_sales",
    "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "type": "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/customers/health-score/summary",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "from_date": "2025-05-01T12:00:00Z",
        "to_date": "2025-05-01T12:00:00Z",
        "divider": "hour",
        "field": "gross_sales",
        "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "type": "product",
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "from_date": "2025-05-01T12:00:00Z",
  "to_date": "2025-05-01T12:00:00Z",
  "divider": "hour",
  "field": "gross_sales",
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "type": "product"
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/customers/health-score/summary');
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
from_datestring (date-time)Yo‘qStart of the reporting window.
to_datestring (date-time)Yo‘qEnd of the reporting window.
dividerstringYo‘qTime bucket of the chart series.. Mumkin qiymatlar: hour, day, week, month, quarter, year. Standart: "day"
fieldstringYo‘qMetric the chart plots.. Mumkin qiymatlar: gross_sales, refund, discount, gift, net_sales, profit. Standart: "gross_sales"
organization_idstringYo‘qOrganization ObjectId.
category_idstringYo‘q
product_idstringYo‘q
typestringYo‘qMumkin qiymatlar: product, customer, employee, payment, category
json
{
  "from_date": "2025-05-01T12:00:00Z",
  "to_date": "2025-05-01T12:00:00Z",
  "divider": "hour",
  "field": "gross_sales",
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "type": "product"
}

Javob

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

POST /reports/dashboard/summary ​

Main dashboard KPI summary (sales, expenses, profit, top-line counters).

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/dashboard/summary' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "sale_type": "receipt",
  "from_date": "2025-05-01T12:00:00Z",
  "to_date": "2025-05-01T12:00:00Z",
  "organizations": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "employees": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "responsible_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "mediator_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "field": "gross_sales",
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "customer_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "supplier_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "supplier_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "report_by": "created_by",
  "type": "product"
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/dashboard/summary', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "sale_type": "receipt",
    "from_date": "2025-05-01T12:00:00Z",
    "to_date": "2025-05-01T12:00:00Z",
    "organizations": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "employees": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "responsible_ids": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "mediator_ids": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "field": "gross_sales",
    "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "customer_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "supplier_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "supplier_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "product_ids": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "report_by": "created_by",
    "type": "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/dashboard/summary",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "sale_type": "receipt",
        "from_date": "2025-05-01T12:00:00Z",
        "to_date": "2025-05-01T12:00:00Z",
        "organizations": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "employees": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "responsible_ids": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "mediator_ids": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "field": "gross_sales",
        "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "customer_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "supplier_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "supplier_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "product_ids": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "report_by": "created_by",
        "type": "product",
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "sale_type": "receipt",
  "from_date": "2025-05-01T12:00:00Z",
  "to_date": "2025-05-01T12:00:00Z",
  "organizations": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "employees": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "responsible_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "mediator_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "field": "gross_sales",
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "customer_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "supplier_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "supplier_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "report_by": "created_by",
  "type": "product"
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/dashboard/summary');
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
sale_typestringYo‘qMumkin qiymatlar: receipt, sale_contract, trade
from_datestring (date-time)Yo‘qStart of the reporting window.
to_datestring (date-time)Yo‘qEnd of the reporting window.
organizationsstring[]Yo‘q
employeesstring[]Yo‘q
responsible_idsstring[]Yo‘q
mediator_idsstring[]Yo‘q
fieldstringYo‘qMetric the chart plots.. Mumkin qiymatlar: gross_sales, refund, discount, gift, net_sales, profit. Standart: "gross_sales"
organization_idstringYo‘qOrganization ObjectId.
category_idstringYo‘q
customer_category_idstringYo‘q
supplier_idstringYo‘q
supplier_category_idstringYo‘q
product_idstringYo‘q
product_idsstring[]Yo‘q
contract_idstringYo‘q
report_bystringYo‘qMumkin qiymatlar: created_by, responsible
typestringYo‘qMumkin qiymatlar: product, customer, employee, payment, category
json
{
  "sale_type": "receipt",
  "from_date": "2025-05-01T12:00:00Z",
  "to_date": "2025-05-01T12:00:00Z",
  "organizations": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "employees": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "responsible_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "mediator_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "field": "gross_sales",
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "customer_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "supplier_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "supplier_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "report_by": "created_by",
  "type": "product"
}

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /reports/customers/health-score/summary.

POST /reports/dashboard/chart ​

Main dashboard time-series chart data.

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/dashboard/chart' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "sale_type": "receipt",
  "from_date": "2025-05-01T12:00:00Z",
  "to_date": "2025-05-01T12:00:00Z",
  "organizations": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "employees": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "responsible_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "mediator_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "field": "gross_sales",
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "customer_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "supplier_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "supplier_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "report_by": "created_by",
  "type": "product"
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/dashboard/chart', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "sale_type": "receipt",
    "from_date": "2025-05-01T12:00:00Z",
    "to_date": "2025-05-01T12:00:00Z",
    "organizations": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "employees": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "responsible_ids": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "mediator_ids": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "field": "gross_sales",
    "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "customer_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "supplier_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "supplier_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "product_ids": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "report_by": "created_by",
    "type": "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/dashboard/chart",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "sale_type": "receipt",
        "from_date": "2025-05-01T12:00:00Z",
        "to_date": "2025-05-01T12:00:00Z",
        "organizations": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "employees": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "responsible_ids": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "mediator_ids": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "field": "gross_sales",
        "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "customer_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "supplier_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "supplier_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "product_ids": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "report_by": "created_by",
        "type": "product",
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "sale_type": "receipt",
  "from_date": "2025-05-01T12:00:00Z",
  "to_date": "2025-05-01T12:00:00Z",
  "organizations": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "employees": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "responsible_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "mediator_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "field": "gross_sales",
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "customer_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "supplier_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "supplier_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "report_by": "created_by",
  "type": "product"
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/dashboard/chart');
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
sale_typestringYo‘qMumkin qiymatlar: receipt, sale_contract, trade
from_datestring (date-time)Yo‘qStart of the reporting window.
to_datestring (date-time)Yo‘qEnd of the reporting window.
organizationsstring[]Yo‘q
employeesstring[]Yo‘q
responsible_idsstring[]Yo‘q
mediator_idsstring[]Yo‘q
fieldstringYo‘qMetric the chart plots.. Mumkin qiymatlar: gross_sales, refund, discount, gift, net_sales, profit. Standart: "gross_sales"
organization_idstringYo‘qOrganization ObjectId.
category_idstringYo‘q
customer_category_idstringYo‘q
supplier_idstringYo‘q
supplier_category_idstringYo‘q
product_idstringYo‘q
product_idsstring[]Yo‘q
contract_idstringYo‘q
report_bystringYo‘qMumkin qiymatlar: created_by, responsible
typestringYo‘qMumkin qiymatlar: product, customer, employee, payment, category
json
{
  "sale_type": "receipt",
  "from_date": "2025-05-01T12:00:00Z",
  "to_date": "2025-05-01T12:00:00Z",
  "organizations": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "employees": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "responsible_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "mediator_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "field": "gross_sales",
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "customer_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "supplier_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "supplier_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "report_by": "created_by",
  "type": "product"
}

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /reports/customers/health-score/charts.

POST /reports/dashboard/top/{key} ​

Top-N entities ranked by the given key (e.g. products / customers / employees).

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/dashboard/top/product' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "sale_type": "receipt",
  "from_date": "2025-05-01T12:00:00Z",
  "to_date": "2025-05-01T12:00:00Z",
  "organizations": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "employees": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "responsible_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "mediator_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "field": "gross_sales",
  "limit": 0,
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "sort_by": "string",
  "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "customer_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "supplier_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "supplier_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "report_by": "created_by",
  "type": "product"
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/dashboard/top/product', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "sale_type": "receipt",
    "from_date": "2025-05-01T12:00:00Z",
    "to_date": "2025-05-01T12:00:00Z",
    "organizations": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "employees": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "responsible_ids": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "mediator_ids": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "field": "gross_sales",
    "limit": 0,
    "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "sort_by": "string",
    "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "customer_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "supplier_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "supplier_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "product_ids": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "report_by": "created_by",
    "type": "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/dashboard/top/product",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "sale_type": "receipt",
        "from_date": "2025-05-01T12:00:00Z",
        "to_date": "2025-05-01T12:00:00Z",
        "organizations": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "employees": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "responsible_ids": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "mediator_ids": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "field": "gross_sales",
        "limit": 0,
        "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "sort_by": "string",
        "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "customer_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "supplier_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "supplier_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "product_ids": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "report_by": "created_by",
        "type": "product",
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "sale_type": "receipt",
  "from_date": "2025-05-01T12:00:00Z",
  "to_date": "2025-05-01T12:00:00Z",
  "organizations": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "employees": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "responsible_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "mediator_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "field": "gross_sales",
  "limit": 0,
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "sort_by": "string",
  "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "customer_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "supplier_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "supplier_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "report_by": "created_by",
  "type": "product"
}
JSON;

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

Yo‘l parametrlari

ParametrTurMajburiyTavsif
keystringHaTop-N grouping key: product, customer, employee, category, payment_method, etc.

So‘rov tanasi

MaydonTurMajburiyTavsif
sale_typestringYo‘qMumkin qiymatlar: receipt, sale_contract, trade
from_datestring (date-time)Yo‘qStart of the reporting window.
to_datestring (date-time)Yo‘qEnd of the reporting window.
organizationsstring[]Yo‘q
employeesstring[]Yo‘q
responsible_idsstring[]Yo‘q
mediator_idsstring[]Yo‘q
fieldstringYo‘qMetric the chart plots.. Mumkin qiymatlar: gross_sales, refund, discount, gift, net_sales, profit. Standart: "gross_sales"
limitnumberYo‘qMaximum number of rows to return.
organization_idstringYo‘qOrganization ObjectId.
sort_bystringYo‘qField name to sort by.
category_idstringYo‘q
customer_category_idstringYo‘q
supplier_idstringYo‘q
supplier_category_idstringYo‘q
product_idstringYo‘q
product_idsstring[]Yo‘q
contract_idstringYo‘q
report_bystringYo‘qMumkin qiymatlar: created_by, responsible
typestringYo‘qMumkin qiymatlar: product, customer, employee, payment, category
json
{
  "sale_type": "receipt",
  "from_date": "2025-05-01T12:00:00Z",
  "to_date": "2025-05-01T12:00:00Z",
  "organizations": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "employees": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "responsible_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "mediator_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "field": "gross_sales",
  "limit": 0,
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "sort_by": "string",
  "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "customer_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "supplier_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "supplier_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "report_by": "created_by",
  "type": "product"
}

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /reports/summary/debt/paging.

POST /reports/order/dashboard/summary ​

Sale-order dashboard KPI summary.

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/order/dashboard/summary' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "from_date": "2025-05-01T12:00:00Z",
  "to_date": "2025-05-01T12:00:00Z",
  "responsible_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "state": "new"
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/order/dashboard/summary', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "from_date": "2025-05-01T12:00:00Z",
    "to_date": "2025-05-01T12:00:00Z",
    "responsible_ids": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "state": "new"
  }),
})
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/order/dashboard/summary",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "from_date": "2025-05-01T12:00:00Z",
        "to_date": "2025-05-01T12:00:00Z",
        "responsible_ids": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "state": "new",
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "from_date": "2025-05-01T12:00:00Z",
  "to_date": "2025-05-01T12:00:00Z",
  "responsible_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "state": "new"
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/order/dashboard/summary');
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
organization_idstringYo‘qOrganization ObjectId.
from_datestring (date-time)Yo‘qStart of the reporting window.
to_datestring (date-time)Yo‘qEnd of the reporting window.
responsible_idsstring[]Yo‘q
statestringYo‘qMumkin qiymatlar: new, draft, in_progress, canceled, done, accepted
json
{
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "from_date": "2025-05-01T12:00:00Z",
  "to_date": "2025-05-01T12:00:00Z",
  "responsible_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "state": "new"
}

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /reports/customers/health-score/summary.

POST /reports/order/dashboard/chart ​

Sale-order dashboard time-series chart.

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/order/dashboard/chart' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "responsible_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "state": "new"
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/order/dashboard/chart', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "responsible_ids": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "state": "new"
  }),
})
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/order/dashboard/chart",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "responsible_ids": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "state": "new",
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "responsible_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "state": "new"
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/order/dashboard/chart');
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
organization_idstringYo‘qOrganization ObjectId.
responsible_idsstring[]Yo‘q
statestringYo‘qMumkin qiymatlar: new, draft, in_progress, canceled, done, accepted
json
{
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "responsible_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "state": "new"
}

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /reports/customers/health-score/charts.

POST /reports/order/dashboard/states ​

Sale-order count by state (new / in-progress / done / canceled).

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/order/dashboard/states' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "from_date": "2025-05-01T12:00:00Z",
  "to_date": "2025-05-01T12:00:00Z",
  "responsible_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "state": "new"
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/order/dashboard/states', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "from_date": "2025-05-01T12:00:00Z",
    "to_date": "2025-05-01T12:00:00Z",
    "responsible_ids": [
      "64b7f4d9e2b3b6a0b7c5d7ff"
    ],
    "state": "new"
  }),
})
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/order/dashboard/states",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "from_date": "2025-05-01T12:00:00Z",
        "to_date": "2025-05-01T12:00:00Z",
        "responsible_ids": [
            "64b7f4d9e2b3b6a0b7c5d7ff",
        ],
        "state": "new",
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "from_date": "2025-05-01T12:00:00Z",
  "to_date": "2025-05-01T12:00:00Z",
  "responsible_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "state": "new"
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/order/dashboard/states');
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
organization_idstringYo‘qOrganization ObjectId.
from_datestring (date-time)Yo‘qStart of the reporting window.
to_datestring (date-time)Yo‘qEnd of the reporting window.
responsible_idsstring[]Yo‘q
statestringYo‘qMumkin qiymatlar: new, draft, in_progress, canceled, done, accepted
json
{
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "from_date": "2025-05-01T12:00:00Z",
  "to_date": "2025-05-01T12:00:00Z",
  "responsible_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "state": "new"
}

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /reports/customers/health-score/summary.

POST /reports/order/dashboard/top/{key} ​

Top-N for the sale-order dashboard, by the given key.

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/order/dashboard/top/product' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "limit": 0
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/order/dashboard/top/product', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "limit": 0
  }),
})
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/order/dashboard/top/product",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "limit": 0,
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "limit": 0
}
JSON;

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

Yo‘l parametrlari

ParametrTurMajburiyTavsif
keystringHa

So‘rov tanasi

MaydonTurMajburiyTavsif
organization_idstringYo‘qOrganization ObjectId.
from_datestring (date-time)Yo‘qStart of the reporting window.
to_datestring (date-time)Yo‘qEnd of the reporting window.
responsible_idsstring[]Yo‘q
statestringYo‘qMumkin qiymatlar: new, draft, in_progress, canceled, done, accepted
limitintegerHaMaximum number of rows to return.
json
{
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "from_date": "2025-05-01T12:00:00Z",
  "to_date": "2025-05-01T12:00:00Z",
  "responsible_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "state": "new",
  "limit": 0
}

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /reports/summary/debt/paging.

POST /reports/summary/debt/get-summary ​

Aggregate customer-debt summary for the dashboard card.

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/summary/debt/get-summary' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "limit": 0,
  "page": 0
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/summary/debt/get-summary', {
  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
import os
import requests

res = requests.request(
    "POST",
    "https://api.bito.uz/integration-api/integration/api/v2/reports/summary/debt/get-summary",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "limit": 0,
        "page": 0,
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "limit": 0,
  "page": 0
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/summary/debt/get-summary');
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
limitnumberHaMaximum number of rows to return.
pagenumberHaPage number, starting from 1.
organization_idstringYo‘qOrganization ObjectId.
supplier_idstringYo‘q
customer_idstringYo‘q
sortobjectYo‘q
sort.nameintegerYo‘qMumkin qiymatlar: 1, -1
searchstringYo‘qFree-text search.
json
{
  "limit": 0,
  "page": 0,
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "supplier_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "customer_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "sort": {
    "name": 1
  },
  "search": "string"
}

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /reports/customers/health-score/summary.

POST /reports/summary/credit/get-summary ​

Aggregate customer-credit summary for the dashboard card.

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/summary/credit/get-summary' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "limit": 0,
  "page": 0
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/summary/credit/get-summary', {
  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
import os
import requests

res = requests.request(
    "POST",
    "https://api.bito.uz/integration-api/integration/api/v2/reports/summary/credit/get-summary",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "limit": 0,
        "page": 0,
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "limit": 0,
  "page": 0
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/summary/credit/get-summary');
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
limitnumberHaMaximum number of rows to return.
pagenumberHaPage number, starting from 1.
organization_idstringYo‘qOrganization ObjectId.
supplier_idstringYo‘q
customer_idstringYo‘q
sortobjectYo‘q
sort.nameintegerYo‘qMumkin qiymatlar: 1, -1
searchstringYo‘qFree-text search.
json
{
  "limit": 0,
  "page": 0,
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "supplier_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "customer_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "sort": {
    "name": 1
  },
  "search": "string"
}

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /reports/customers/health-score/summary.

POST /reports/summary/goods/by-price/total ​

Total goods valuation grouped by price (dashboard card).

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/summary/goods/by-price/total' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "price_id": "64b7f4d9e2b3b6a0b7c5d7ff"
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/summary/goods/by-price/total', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "price_id": "64b7f4d9e2b3b6a0b7c5d7ff"
  }),
})
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/summary/goods/by-price/total",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "price_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "price_id": "64b7f4d9e2b3b6a0b7c5d7ff"
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/summary/goods/by-price/total');
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
organization_idstringHaOrganization ObjectId.
price_idstringHa
is_productbooleanYo‘q
is_materialbooleanYo‘q
is_semi_productbooleanYo‘q
json
{
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "price_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "is_product": false,
  "is_material": false,
  "is_semi_product": false
}

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /reports/customers/health-score/summary.

POST /reports/summary/product/chart-paging ​

Paginated product chart rows for the dashboard.

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/summary/product/chart-paging' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "limit": 0,
  "page": 0
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/summary/product/chart-paging', {
  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
import os
import requests

res = requests.request(
    "POST",
    "https://api.bito.uz/integration-api/integration/api/v2/reports/summary/product/chart-paging",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "limit": 0,
        "page": 0,
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "limit": 0,
  "page": 0
}
JSON;

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

So‘rov tanasi

MaydonTurMajburiyTavsif
limitnumberHaMaximum number of rows to return.
pagenumberHaPage number, starting from 1.
organization_idstringYo‘qOrganization ObjectId.
warehouse_idstringYo‘q
product_idstringYo‘q
sortobjectYo‘q
sort.nameintegerYo‘qMumkin qiymatlar: 1, -1
is_productbooleanYo‘q
is_materialbooleanYo‘q
is_semi_productbooleanYo‘q
searchstringYo‘qFree-text search.
statestringYo‘qMumkin qiymatlar: canceled, done
json
{
  "limit": 0,
  "page": 0,
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "warehouse_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "sort": {
    "name": 1
  },
  "is_product": false,
  "is_material": false,
  "is_semi_product": false,
  "search": "string",
  "state": "canceled"
}

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /reports/summary/debt/paging.

POST /reports/summary/product/get-summary ​

Aggregate product summary for the dashboard card.

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/summary/product/get-summary' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff"
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/summary/product/get-summary', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff"
  }),
})
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/summary/product/get-summary",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff"
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/summary/product/get-summary');
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
organization_idstringHaOrganization ObjectId.
is_productbooleanYo‘q
is_materialbooleanYo‘q
is_semi_productbooleanYo‘q
json
{
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "is_product": false,
  "is_material": false,
  "is_semi_product": false
}

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /reports/customers/health-score/summary.

POST /reports/summary/sale/chart ​

Sale chart time series for the dashboard.

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/summary/sale/chart' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "sale_type": "receipt",
  "from_date": "2025-05-01T12:00:00Z",
  "to_date": "2025-05-01T12:00:00Z",
  "field": "gross_sales",
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "type": "product"
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/summary/sale/chart', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "sale_type": "receipt",
    "from_date": "2025-05-01T12:00:00Z",
    "to_date": "2025-05-01T12:00:00Z",
    "field": "gross_sales",
    "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "type": "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/summary/sale/chart",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "sale_type": "receipt",
        "from_date": "2025-05-01T12:00:00Z",
        "to_date": "2025-05-01T12:00:00Z",
        "field": "gross_sales",
        "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        "type": "product",
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "sale_type": "receipt",
  "from_date": "2025-05-01T12:00:00Z",
  "to_date": "2025-05-01T12:00:00Z",
  "field": "gross_sales",
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "type": "product"
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/summary/sale/chart');
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
sale_typestringYo‘qMumkin qiymatlar: receipt, sale_contract, trade
from_datestring (date-time)Yo‘qStart of the reporting window.
to_datestring (date-time)Yo‘qEnd of the reporting window.
fieldstringYo‘qMetric the chart plots.. Mumkin qiymatlar: gross_sales, refund, discount, gift, net_sales, profit. Standart: "gross_sales"
organization_idstringYo‘qOrganization ObjectId.
typestringYo‘qMumkin qiymatlar: product, customer, employee, payment, category
json
{
  "sale_type": "receipt",
  "from_date": "2025-05-01T12:00:00Z",
  "to_date": "2025-05-01T12:00:00Z",
  "field": "gross_sales",
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "type": "product"
}

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /reports/customers/health-score/charts.

POST /reports/trade/customer/chart ​

Trade-by-customer chart time series for the dashboard.

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/trade/customer/chart' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "customer_id": "64b7f4d9e2b3b6a0b7c5d7ff"
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/trade/customer/chart', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "customer_id": "64b7f4d9e2b3b6a0b7c5d7ff"
  }),
})
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/trade/customer/chart",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "customer_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "customer_id": "64b7f4d9e2b3b6a0b7c5d7ff"
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/trade/customer/chart');
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
organization_idstringYo‘qOrganization ObjectId.
customer_idstringHa
date_fromstring (date-time)Yo‘qStart of the date range.
date_tostring (date-time)Yo‘qEnd of the date range.
json
{
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "customer_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/customers/health-score/charts.

POST /reports/trade/customer/health-score ​

Customer health-score rollup based on trade history.

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/trade/customer/health-score' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "customer_id": "64b7f4d9e2b3b6a0b7c5d7ff"
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/trade/customer/health-score', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "customer_id": "64b7f4d9e2b3b6a0b7c5d7ff"
  }),
})
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/trade/customer/health-score",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "customer_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "customer_id": "64b7f4d9e2b3b6a0b7c5d7ff"
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/trade/customer/health-score');
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
organization_idstringYo‘qOrganization ObjectId.
customer_idstringHa
json
{
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "customer_id": "64b7f4d9e2b3b6a0b7c5d7ff"
}

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /reports/customers/health-score/summary.

POST /reports/trade/price-deviation/paging ​

Paginated rows of trades where the sold price deviates from the configured price list.

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/trade/price-deviation/paging' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "limit": 0,
  "page": 0
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/trade/price-deviation/paging', {
  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
import os
import requests

res = requests.request(
    "POST",
    "https://api.bito.uz/integration-api/integration/api/v2/reports/trade/price-deviation/paging",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "limit": 0,
        "page": 0,
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "limit": 0,
  "page": 0
}
JSON;

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

So‘rov tanasi

MaydonTurMajburiyTavsif
limitnumberHaMaximum number of rows to return.
pagenumberHaPage number, starting from 1.
organization_idstringYo‘qOrganization ObjectId.
warehouse_idstringYo‘q
category_idstringYo‘q
product_idstringYo‘q
product_idsstring[]Yo‘q
customer_idstringYo‘q
date_fromstring (date-time)Yo‘qStart of the date range.
date_tostring (date-time)Yo‘qEnd of the date range.
sortobjectYo‘q
sort.nameintegerYo‘qMumkin qiymatlar: 1, -1
trade_statestringYo‘qMumkin qiymatlar: new, in_progress, canceled, done
trade_statesstring[]Yo‘q
statestringYo‘qMumkin qiymatlar: canceled, done
json
{
  "limit": 0,
  "page": 0,
  "organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "warehouse_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "product_ids": [
    "64b7f4d9e2b3b6a0b7c5d7ff"
  ],
  "customer_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "date_from": "2025-05-01T12:00:00Z",
  "date_to": "2025-05-01T12:00:00Z",
  "sort": {
    "name": 1
  },
  "trade_state": "new",
  "trade_states": [
    "new"
  ],
  "state": "canceled"
}

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /reports/summary/debt/paging.


Bu sahifa OpenAPI spetsifikatsiyasidan yaratilgan.

Bito 2.0 Integration API