Report analysis
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/analysis/abc/by-month
ABC analysis aggregated by month — classifies products into A/B/C buckets by contribution to revenue.
Required permission: none — closed to an app that declares permissions · how permissions work
Example request
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/reports/analysis/abc/by-month' \
-H "api-key: $BITO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"a": 0,
"b": 0,
"c": 0
}'const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/analysis/abc/by-month', {
method: 'POST',
headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"a": 0,
"b": 0,
"c": 0
}),
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"POST",
"https://api.bito.uz/integration-api/integration/api/v2/reports/analysis/abc/by-month",
headers={"api-key": os.environ["BITO_API_KEY"]},
json={
"a": 0,
"b": 0,
"c": 0,
},
)
print(res.json())<?php
$body = <<<'JSON'
{
"a": 0,
"b": 0,
"c": 0
}
JSON;
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/analysis/abc/by-month');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => $body,
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);Request body
| Field | Type | Required | Description |
|---|---|---|---|
sale_type | string | No | One of: receipt, sale_contract, trade |
from_date | string (date-time) | No | Start of the reporting window. |
to_date | string (date-time) | No | End of the reporting window. |
organizations | string[] | No | |
employees | string[] | No | |
responsible_ids | string[] | No | |
mediator_ids | string[] | No | |
field | string | No | Metric the chart plots.. One of: gross_sales, refund, discount, gift, net_sales, profit. Default: "gross_sales" |
organization_id | string | No | Organization ObjectId. |
category_id | string | No | |
customer_category_id | string | No | |
supplier_id | string | No | |
supplier_category_id | string | No | |
product_id | string | No | |
product_ids | string[] | No | |
contract_id | string | No | |
report_by | string | No | One of: created_by, responsible |
a | number | Yes | |
b | number | Yes | |
c | number | Yes | |
type | string | No | One of: product, customer, employee, payment, category |
{
"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",
"a": 0,
"b": 0,
"c": 0,
"type": "product"
}Response
| Field | Type | Description |
|---|---|---|
list | object[] | |
total | number |
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"list": [
{}
],
"total": 0
},
"time": "2025-05-01T12:00:00Z"
}POST /reports/analysis/abc/by-product
ABC analysis aggregated by product over the reporting window.
Required permission: none — closed to an app that declares permissions · how permissions work
Example request
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/reports/analysis/abc/by-product' \
-H "api-key: $BITO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"a": 0,
"b": 0,
"c": 0
}'const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/analysis/abc/by-product', {
method: 'POST',
headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"a": 0,
"b": 0,
"c": 0
}),
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"POST",
"https://api.bito.uz/integration-api/integration/api/v2/reports/analysis/abc/by-product",
headers={"api-key": os.environ["BITO_API_KEY"]},
json={
"a": 0,
"b": 0,
"c": 0,
},
)
print(res.json())<?php
$body = <<<'JSON'
{
"a": 0,
"b": 0,
"c": 0
}
JSON;
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/analysis/abc/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
| Field | Type | Required | Description |
|---|---|---|---|
sale_type | string | No | One of: receipt, sale_contract, trade |
from_date | string (date-time) | No | Start of the reporting window. |
to_date | string (date-time) | No | End of the reporting window. |
organizations | string[] | No | |
employees | string[] | No | |
responsible_ids | string[] | No | |
mediator_ids | string[] | No | |
field | string | No | Metric the chart plots.. One of: gross_sales, refund, discount, gift, net_sales, profit. Default: "gross_sales" |
organization_id | string | No | Organization ObjectId. |
category_id | string | No | |
customer_category_id | string | No | |
supplier_id | string | No | |
supplier_category_id | string | No | |
product_id | string | No | |
product_ids | string[] | No | |
contract_id | string | No | |
report_by | string | No | One of: created_by, responsible |
a | number | Yes | |
b | number | Yes | |
c | number | Yes | |
type | string | No | One of: product, customer, employee, payment, category |
{
"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",
"a": 0,
"b": 0,
"c": 0,
"type": "product"
}Response
Same response shape as POST /reports/analysis/abc/by-month.
POST /reports/analysis/customers/abc-xyz
ABC/XYZ analysis on customers — combines revenue contribution (ABC) with demand variability (XYZ).
Required permission: none — closed to an app that declares permissions · how permissions work
Example request
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/reports/analysis/customers/abc-xyz' \
-H "api-key: $BITO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"limit": 0,
"page": 0
}'const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/analysis/customers/abc-xyz', {
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()import os
import requests
res = requests.request(
"POST",
"https://api.bito.uz/integration-api/integration/api/v2/reports/analysis/customers/abc-xyz",
headers={"api-key": os.environ["BITO_API_KEY"]},
json={
"limit": 0,
"page": 0,
},
)
print(res.json())<?php
$body = <<<'JSON'
{
"limit": 0,
"page": 0
}
JSON;
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/analysis/customers/abc-xyz');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => $body,
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);Request body
| Field | Type | Required | Description |
|---|---|---|---|
limit | number | Yes | Maximum number of rows to return. |
page | number | Yes | Page number, starting from 1. |
organization_id | string | No | Organization ObjectId. |
warehouse_id | string | No | |
category_id | string | No | |
customer_category_id | string | No | |
supplier_id | string | No | |
supplier_category_id | string | No | |
product_id | string | No | |
product_ids | string[] | No | |
customer_id | string | No | |
date_from | string (date-time) | No | Start of the date range. |
date_to | string (date-time) | No | End of the date range. |
sort | object | No | |
sort.name | integer | No | One of: 1, -1 |
report_by | string | No | One of: created_by, responsible |
abc_class | string | No | One of: A, B, C, C-LOSS |
xyz_class | string | No | One of: X, Y, Z, Z-NEW |
segment | string | No | One of: AX, AY, AZ, AZ-NEW, BX, BY, BZ, BZ-NEW, CX, CY, CZ, CZ-NEW, C-LOSSX, C-LOSSY, C-LOSSZ, C-LOSSZ-NEW |
customer_type | string | No | One of: legal, natural |
{
"limit": 0,
"page": 0,
"organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
"warehouse_id": "64b7f4d9e2b3b6a0b7c5d7ff",
"category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
"customer_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
"supplier_id": "64b7f4d9e2b3b6a0b7c5d7ff",
"supplier_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
},
"report_by": "created_by",
"abc_class": "A",
"xyz_class": "X",
"segment": "AX",
"customer_type": "legal"
}Response
Same response shape as POST /reports/analysis/abc/by-month.
This page is generated from the OpenAPI spec.