Report distribution
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/distribution/get-summary
Aggregate distribution KPIs for the window (orders, deliveries, revenue).
Kerakli ruxsat: yo‘q — ruxsat e’lon qilgan ilova uchun yopiq · ruxsatlar qanday ishlaydi
So‘rov namunasi
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/reports/distribution/get-summary' \
-H "api-key: $BITO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"date_from": "2025-05-01T12:00:00Z",
"date_to": "2025-05-01T12:00:00Z"
}'const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/distribution/get-summary', {
method: 'POST',
headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"date_from": "2025-05-01T12:00:00Z",
"date_to": "2025-05-01T12:00:00Z"
}),
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"POST",
"https://api.bito.uz/integration-api/integration/api/v2/reports/distribution/get-summary",
headers={"api-key": os.environ["BITO_API_KEY"]},
json={
"date_from": "2025-05-01T12:00:00Z",
"date_to": "2025-05-01T12:00:00Z",
},
)
print(res.json())<?php
$body = <<<'JSON'
{
"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/distribution/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
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
organization_id | string | Yo‘q | Organization ObjectId. |
product_category_id | string | Yo‘q | |
employee_ids | string[] | Yo‘q | |
customer_ids | string[] | Yo‘q | |
date_from | string (date-time) | Ha | Start of the date range. |
date_to | string (date-time) | Ha | End of the date range. |
{
"organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
"product_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
"employee_ids": [
"64b7f4d9e2b3b6a0b7c5d7ff"
],
"customer_ids": [
"64b7f4d9e2b3b6a0b7c5d7ff"
],
"date_from": "2025-05-01T12:00:00Z",
"date_to": "2025-05-01T12:00:00Z"
}Javob
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {},
"time": "2025-05-01T12:00:00Z"
}POST /reports/distribution/get-by-product-category
Distribution volume grouped by product category.
Kerakli ruxsat: yo‘q — ruxsat e’lon qilgan ilova uchun yopiq · ruxsatlar qanday ishlaydi
So‘rov namunasi
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/reports/distribution/get-by-product-category' \
-H "api-key: $BITO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"page": 0,
"limit": 0
}'const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/distribution/get-by-product-category', {
method: 'POST',
headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"page": 0,
"limit": 0
}),
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"POST",
"https://api.bito.uz/integration-api/integration/api/v2/reports/distribution/get-by-product-category",
headers={"api-key": os.environ["BITO_API_KEY"]},
json={
"page": 0,
"limit": 0,
},
)
print(res.json())<?php
$body = <<<'JSON'
{
"page": 0,
"limit": 0
}
JSON;
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/distribution/get-by-product-category');
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
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
organization_id | string | Yo‘q | Organization ObjectId. |
product_category_id | string | Yo‘q | |
employee_ids | string[] | Yo‘q | |
customer_ids | string[] | Yo‘q | |
date_from | string (date-time) | Yo‘q | Start of the date range. |
date_to | string (date-time) | Yo‘q | End of the date range. |
page | number | Ha | Page number, starting from 1. |
limit | number | Ha | Maximum number of rows to return. |
{
"organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
"product_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
"employee_ids": [
"64b7f4d9e2b3b6a0b7c5d7ff"
],
"customer_ids": [
"64b7f4d9e2b3b6a0b7c5d7ff"
],
"date_from": "2025-05-01T12:00:00Z",
"date_to": "2025-05-01T12:00:00Z",
"page": 0,
"limit": 0
}Javob
| Maydon | Tur | Tavsif |
|---|---|---|
list | object[] | |
total | number |
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"list": [
{}
],
"total": 0
},
"time": "2025-05-01T12:00:00Z"
}POST /reports/distribution/get-by-agent-and-type
Distribution metrics grouped by (agent, distribution type).
Kerakli ruxsat: yo‘q — ruxsat e’lon qilgan ilova uchun yopiq · ruxsatlar qanday ishlaydi
So‘rov namunasi
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/reports/distribution/get-by-agent-and-type' \
-H "api-key: $BITO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"date_from": "2025-05-01T12:00:00Z",
"date_to": "2025-05-01T12:00:00Z"
}'const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/distribution/get-by-agent-and-type', {
method: 'POST',
headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"date_from": "2025-05-01T12:00:00Z",
"date_to": "2025-05-01T12:00:00Z"
}),
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"POST",
"https://api.bito.uz/integration-api/integration/api/v2/reports/distribution/get-by-agent-and-type",
headers={"api-key": os.environ["BITO_API_KEY"]},
json={
"date_from": "2025-05-01T12:00:00Z",
"date_to": "2025-05-01T12:00:00Z",
},
)
print(res.json())<?php
$body = <<<'JSON'
{
"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/distribution/get-by-agent-and-type');
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
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
organization_id | string | Yo‘q | Organization ObjectId. |
product_category_id | string | Yo‘q | |
employee_ids | string[] | Yo‘q | |
customer_ids | string[] | Yo‘q | |
date_from | string (date-time) | Ha | Start of the date range. |
date_to | string (date-time) | Ha | End of the date range. |
{
"organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
"product_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
"employee_ids": [
"64b7f4d9e2b3b6a0b7c5d7ff"
],
"customer_ids": [
"64b7f4d9e2b3b6a0b7c5d7ff"
],
"date_from": "2025-05-01T12:00:00Z",
"date_to": "2025-05-01T12:00:00Z"
}Javob
Javob tuzilishi quyidagi bilan bir xil: POST /reports/distribution/get-by-product-category.
POST /reports/distribution/get-by-agent
Distribution metrics aggregated by agent (sales rep).
Kerakli ruxsat: yo‘q — ruxsat e’lon qilgan ilova uchun yopiq · ruxsatlar qanday ishlaydi
So‘rov namunasi
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/reports/distribution/get-by-agent' \
-H "api-key: $BITO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"page": 0,
"limit": 0
}'const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/reports/distribution/get-by-agent', {
method: 'POST',
headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"page": 0,
"limit": 0
}),
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"POST",
"https://api.bito.uz/integration-api/integration/api/v2/reports/distribution/get-by-agent",
headers={"api-key": os.environ["BITO_API_KEY"]},
json={
"page": 0,
"limit": 0,
},
)
print(res.json())<?php
$body = <<<'JSON'
{
"page": 0,
"limit": 0
}
JSON;
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/reports/distribution/get-by-agent');
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
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
organization_id | string | Yo‘q | Organization ObjectId. |
product_category_id | string | Yo‘q | |
employee_ids | string[] | Yo‘q | |
customer_ids | string[] | Yo‘q | |
date_from | string (date-time) | Yo‘q | Start of the date range. |
date_to | string (date-time) | Yo‘q | End of the date range. |
page | number | Ha | Page number, starting from 1. |
limit | number | Ha | Maximum number of rows to return. |
{
"organization_id": "64b7f4d9e2b3b6a0b7c5d7ff",
"product_category_id": "64b7f4d9e2b3b6a0b7c5d7ff",
"employee_ids": [
"64b7f4d9e2b3b6a0b7c5d7ff"
],
"customer_ids": [
"64b7f4d9e2b3b6a0b7c5d7ff"
],
"date_from": "2025-05-01T12:00:00Z",
"date_to": "2025-05-01T12:00:00Z",
"page": 0,
"limit": 0
}Javob
Javob tuzilishi quyidagi bilan bir xil: POST /reports/distribution/get-by-product-category.
Bu sahifa OpenAPI spetsifikatsiyasidan yaratilgan.