Price
INFO
Har bir javob umumiy konvertda qaytadi — code, message, messages, status_code, time — foydali yuk esa data ichida. Quyidagi jadvallar faqat data ichini tavsiflaydi.
GET /price/get-all
Get all prices
Kerakli ruxsat: price · ruxsatlar qanday ishlaydi
So‘rov namunasi
bash
curl -X GET 'https://api.bito.uz/integration-api/integration/api/v2/price/get-all' \
-H "api-key: $BITO_API_KEY"js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/price/get-all', {
method: 'GET',
headers: { 'api-key': process.env.BITO_API_KEY },
})
const { code, data } = await res.json()python
import os
import requests
res = requests.request(
"GET",
"https://api.bito.uz/integration-api/integration/api/v2/price/get-all",
headers={"api-key": os.environ["BITO_API_KEY"]},
)
print(res.json())php
<?php
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/price/get-all');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY')],
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);So‘rov parametrlari
| Parametr | Tur | Majburiy | Tavsif |
|---|---|---|---|
status | string | Yo‘q | Mumkin qiymatlar: active, inactive |
type | string | Yo‘q | Mumkin qiymatlar: sale, income |
currency_id | string | Yo‘q | |
search | string | Yo‘q |
So‘rov tanasi
So‘rov tanasi talab qilinmaydi.
Javob
json
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": [],
"time": "2025-05-01T12:00:00Z"
}POST /price/items/get-paging
Price items
Kerakli ruxsat: price · ruxsatlar qanday ishlaydi
So‘rov namunasi
bash
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/price/items/get-paging' \
-H "api-key: $BITO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"page": 1,
"limit": 20
}'js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/price/items/get-paging', {
method: 'POST',
headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"page": 1,
"limit": 20
}),
})
const { code, data } = await res.json()python
import os
import requests
res = requests.request(
"POST",
"https://api.bito.uz/integration-api/integration/api/v2/price/items/get-paging",
headers={"api-key": os.environ["BITO_API_KEY"]},
json={
"page": 1,
"limit": 20,
},
)
print(res.json())php
<?php
$body = <<<'JSON'
{
"page": 1,
"limit": 20
}
JSON;
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/price/items/get-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
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
page | number | Ha | Standart: 1 |
limit | number | Ha | Standart: 20 |
organization_id | string | Yo‘q | |
price_id | string | Yo‘q | |
product_id | string | Yo‘q | |
search | string | Yo‘q | Free-text search. |
json
{
"page": 1,
"limit": 20,
"organization_id": "string",
"price_id": "string",
"product_id": "string",
"search": "string"
}Javob
Javob tuzilishi quyidagi bilan bir xil: GET /price/get-all.
GET /price/get-by-id/{id}
Get a price by its _id.
Kerakli ruxsat: price · ruxsatlar qanday ishlaydi
So‘rov namunasi
bash
curl -X GET 'https://api.bito.uz/integration-api/integration/api/v2/price/get-by-id/6712f0a9c4d1e87b3a0f9911' \
-H "api-key: $BITO_API_KEY"js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/price/get-by-id/6712f0a9c4d1e87b3a0f9911', {
method: 'GET',
headers: { 'api-key': process.env.BITO_API_KEY },
})
const { code, data } = await res.json()python
import os
import requests
res = requests.request(
"GET",
"https://api.bito.uz/integration-api/integration/api/v2/price/get-by-id/6712f0a9c4d1e87b3a0f9911",
headers={"api-key": os.environ["BITO_API_KEY"]},
)
print(res.json())php
<?php
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/price/get-by-id/6712f0a9c4d1e87b3a0f9911');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY')],
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);Yo‘l parametrlari
| Parametr | Tur | Majburiy | Tavsif |
|---|---|---|---|
id | string | Ha |
So‘rov tanasi
So‘rov tanasi talab qilinmaydi.
Javob
| Maydon | Tur | Tavsif |
|---|---|---|
_id | string | The ID of the price |
code | string | The code of the price |
short_name | string | The short name of the price |
name | string | The name of the price |
currency_id | string | The currency ID of the price |
status | string | The status of the price. Mumkin qiymatlar: active, inactive |
type | string | The type of the price. Mumkin qiymatlar: sale, income |
updated_by | string | The ID of the user who updated the price |
is_default | boolean | Whether the price is the default price |
can_be_updated | boolean | Whether the price can be updated |
is_main | boolean | Whether the price is the main price |
has_access | boolean | Whether the price has access |
employee_ids | string[] | The IDs of the employees who have access to the price |
json
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"_id": "string",
"code": "string",
"short_name": "string",
"name": "string",
"currency_id": "string",
"status": "active",
"type": "sale",
"updated_by": "string",
"is_default": false,
"can_be_updated": false,
"is_main": false,
"has_access": false,
"employee_ids": [
"string"
]
},
"time": "2025-05-01T12:00:00Z"
}Bu sahifa OpenAPI spetsifikatsiyasidan yaratilgan.