Mahsulotlar API
Kitob, kanselyariya, tavsiyalar va seller mahsulotlarini olish.
Mahsulotlar API
Katalogdagi barcha kitoblar, kanselyariyalar va sellerlar ro'yxatini olish uchun endpointlar.
Bitta kitob tafsiloti
Kitobning to‘liq tavsifi, muallifi, nashriyoti, narxi, qoldig‘i va rasmlarini qaytaradi.
| Parametr | Turi | Joyi | Majburiy | Tavsifi |
|---|---|---|---|---|
| id | integer | path | Ha | Kitob ID raqami. |
curl --request GET \
--url 'https://kitobchi.com/api/v1/client/products/book/128' \
--header 'Accept: application/json' \
--header 'X-App-ID: app_xxxxxxxxxxxx' \
--header 'X-App-Secret: your-secret'
const res = await fetch("https://kitobchi.com/api/v1/client/products/book/128", {
headers: {
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": process.env.KITOBCHI_APP_SECRET,
},
});
const data = await res.json();
<?php
$ch = curl_init("https://kitobchi.com/api/v1/client/products/book/128");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'X-App-ID: app_xxxxxxxxxxxx',
'X-App-Secret: ' . getenv('KITOBCHI_APP_SECRET'),
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import os, requests
res = requests.get(
"https://kitobchi.com/api/v1/client/products/book/128",
headers={
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": os.environ["KITOBCHI_APP_SECRET"],
},
)
data = res.json()
{
"status": "success",
"data": {
"id": 128,
"name": "Atomic Habits",
"price": 89000,
"old_price": 99000,
"image": "https://kitobchi.com/storage/books/128.jpg",
"type": "book",
"in_stock": true,
"description": "Kichik o‘zgarishlar, ulkan natijalar...",
"pages": 320,
"isbn": "9781847941831",
"author": {
"id": 45,
"name": "James Clear"
},
"seller": {
"id": 12,
"name": "Asaxiy Books"
}
}
}⚡ Live Konsolda Sinab Ko'rish (Try It Out)
Kanselyariya mahsuloti tafsiloti
Kanselyariya tovarining to‘liq ma’lumoti va variantlarini qaytaradi.
| Parametr | Turi | Joyi | Majburiy | Tavsifi |
|---|---|---|---|---|
| id | integer | path | Ha | Mahsulot ID si. |
curl --request GET \
--url 'https://kitobchi.com/api/v1/client/products/stationery/54' \
--header 'Accept: application/json' \
--header 'X-App-ID: app_xxxxxxxxxxxx' \
--header 'X-App-Secret: your-secret'
const res = await fetch("https://kitobchi.com/api/v1/client/products/stationery/54", {
headers: {
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": process.env.KITOBCHI_APP_SECRET,
},
});
const data = await res.json();
<?php
$ch = curl_init("https://kitobchi.com/api/v1/client/products/stationery/54");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'X-App-ID: app_xxxxxxxxxxxx',
'X-App-Secret: ' . getenv('KITOBCHI_APP_SECRET'),
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import os, requests
res = requests.get(
"https://kitobchi.com/api/v1/client/products/stationery/54",
headers={
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": os.environ["KITOBCHI_APP_SECRET"],
},
)
data = res.json()
{
"status": "success",
"data": {
"id": 54,
"name": "ErichKrause Qalam to‘plami",
"price": 25000,
"type": "stationery",
"in_stock": true,
"seller": {
"id": 12,
"name": "Kanselyariya Dunyosi"
}
}
}⚡ Live Konsolda Sinab Ko'rish (Try It Out)
Muallif bo‘yicha kitoblar
Muayyan muallifning barcha faol kitoblari ro‘yxatini sahifalab qaytaradi.
| Parametr | Turi | Joyi | Majburiy | Tavsifi |
|---|---|---|---|---|
| authorId | integer | path | Ha | Muallif ID raqami. |
| page | integer | query | Yo‘q | Sahifa raqami. |
| per_page | integer | query | Yo‘q | Sahifadagi elementlar soni. |
curl --request GET \
--url 'https://kitobchi.com/api/v1/client/products/by-author/45?page=1&per_page=20' \
--header 'Accept: application/json' \
--header 'X-App-ID: app_xxxxxxxxxxxx' \
--header 'X-App-Secret: your-secret'
const res = await fetch("https://kitobchi.com/api/v1/client/products/by-author/45?page=1&per_page=20", {
headers: {
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": process.env.KITOBCHI_APP_SECRET,
},
});
const data = await res.json();
<?php
$ch = curl_init("https://kitobchi.com/api/v1/client/products/by-author/45?page=1&per_page=20");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'X-App-ID: app_xxxxxxxxxxxx',
'X-App-Secret: ' . getenv('KITOBCHI_APP_SECRET'),
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import os, requests
res = requests.get(
"https://kitobchi.com/api/v1/client/products/by-author/45?page=1&per_page=20",
headers={
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": os.environ["KITOBCHI_APP_SECRET"],
},
)
data = res.json()
{
"status": "success",
"data": [
{
"id": 128,
"name": "Atomic Habits",
"price": 89000,
"type": "book"
}
],
"meta": {
"current_page": 1,
"per_page": 20,
"total": 4,
"last_page": 1
}
}⚡ Live Konsolda Sinab Ko'rish (Try It Out)
Nashriyot bo‘yicha kitoblar
Muayyan nashriyotning barcha faol kitoblari ro‘yxatini sahifalab qaytaradi.
| Parametr | Turi | Joyi | Majburiy | Tavsifi |
|---|---|---|---|---|
| publisherId | integer | path | Ha | Nashriyot ID raqami. |
| page | integer | query | Yo‘q | Sahifa raqami. |
| per_page | integer | query | Yo‘q | Sahifadagi elementlar soni. |
curl --request GET \
--url 'https://kitobchi.com/api/v1/client/products/by-publisher/8?page=1&per_page=20' \
--header 'Accept: application/json' \
--header 'X-App-ID: app_xxxxxxxxxxxx' \
--header 'X-App-Secret: your-secret'
const res = await fetch("https://kitobchi.com/api/v1/client/products/by-publisher/8?page=1&per_page=20", {
headers: {
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": process.env.KITOBCHI_APP_SECRET,
},
});
const data = await res.json();
<?php
$ch = curl_init("https://kitobchi.com/api/v1/client/products/by-publisher/8?page=1&per_page=20");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'X-App-ID: app_xxxxxxxxxxxx',
'X-App-Secret: ' . getenv('KITOBCHI_APP_SECRET'),
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import os, requests
res = requests.get(
"https://kitobchi.com/api/v1/client/products/by-publisher/8?page=1&per_page=20",
headers={
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": os.environ["KITOBCHI_APP_SECRET"],
},
)
data = res.json()
{
"status": "success",
"data": [
{
"id": 128,
"name": "Atomic Habits",
"price": 89000,
"type": "book"
}
],
"meta": {
"current_page": 1,
"per_page": 20,
"total": 12,
"last_page": 1
}
}⚡ Live Konsolda Sinab Ko'rish (Try It Out)
Mahsulotlar ro‘yxati
Katalogdagi mahsulotlarni turi bo‘yicha sahifalab qaytaradi.
| Parametr | Turi | Joyi | Majburiy | Tavsifi |
|---|---|---|---|---|
| col | string | path | Ha | Mahsulot turi: books yoki stationery. |
| page | integer | query | Yo‘q | Sahifa raqami (1 dan boshlanadi). |
| q | string | query | Yo‘q | Nom bo‘yicha filtr. |
| sort | string | query | Yo‘q | Tartiblash: popular, new, price_asc, price_desc. |
curl --request GET \
--url 'https://kitobchi.com/api/v1/client/products/books?page=1' \
--header 'Accept: application/json' \
--header 'X-App-ID: app_xxxxxxxxxxxx' \
--header 'X-App-Secret: your-secret'
const res = await fetch("https://kitobchi.com/api/v1/client/products/books?page=1", {
headers: {
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": process.env.KITOBCHI_APP_SECRET,
},
});
const data = await res.json();
<?php
$ch = curl_init("https://kitobchi.com/api/v1/client/products/books?page=1");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'X-App-ID: app_xxxxxxxxxxxx',
'X-App-Secret: ' . getenv('KITOBCHI_APP_SECRET'),
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import os, requests
res = requests.get(
"https://kitobchi.com/api/v1/client/products/books?page=1",
headers={
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": os.environ["KITOBCHI_APP_SECRET"],
},
)
data = res.json()
{
"status": "success",
"data": [
{
"id": 128,
"name": "Atomic Habits",
"price": 89000,
"old_price": 99000,
"image": "https://kitobchi.com/storage/books/128.jpg",
"type": "book",
"in_stock": true,
"seller_id": 12
}
],
"meta": {
"page": 1,
"per_page": 20,
"total": 342
}
}⚡ Live Konsolda Sinab Ko'rish (Try It Out)
Tavsiya qilingan mahsulotlar
Vitrina va “sizga mos” bloklari uchun tavsiya ro‘yxati.
| Parametr | Turi | Joyi | Majburiy | Tavsifi |
|---|---|---|---|---|
| col | string | path | Ha | Mahsulot turi: books yoki stationery. |
curl --request GET \
--url 'https://kitobchi.com/api/v1/client/products/recommendation/books' \
--header 'Accept: application/json' \
--header 'X-App-ID: app_xxxxxxxxxxxx' \
--header 'X-App-Secret: your-secret'
const res = await fetch("https://kitobchi.com/api/v1/client/products/recommendation/books", {
headers: {
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": process.env.KITOBCHI_APP_SECRET,
},
});
const data = await res.json();
<?php
$ch = curl_init("https://kitobchi.com/api/v1/client/products/recommendation/books");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'X-App-ID: app_xxxxxxxxxxxx',
'X-App-Secret: ' . getenv('KITOBCHI_APP_SECRET'),
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import os, requests
res = requests.get(
"https://kitobchi.com/api/v1/client/products/recommendation/books",
headers={
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": os.environ["KITOBCHI_APP_SECRET"],
},
)
data = res.json()
{
"status": "success",
"data": [
{
"id": 305,
"name": "Deep Work",
"price": 76000,
"image": "https://kitobchi.com/storage/books/305.jpg",
"type": "book",
"in_stock": true
}
]
}⚡ Live Konsolda Sinab Ko'rish (Try It Out)
Sellerlar va oxirgi mahsulotlari
Do‘konlar ro‘yxati va har biri uchun eng so‘nggi mahsulotlar.
| Parametr | Turi | Joyi | Majburiy | Tavsifi |
|---|---|---|---|---|
| page | integer | query | Yo‘q | Sahifa raqami. |
curl --request GET \
--url 'https://kitobchi.com/api/v1/client/products/sellers/list?page=1' \
--header 'Accept: application/json' \
--header 'X-App-ID: app_xxxxxxxxxxxx' \
--header 'X-App-Secret: your-secret'
const res = await fetch("https://kitobchi.com/api/v1/client/products/sellers/list?page=1", {
headers: {
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": process.env.KITOBCHI_APP_SECRET,
},
});
const data = await res.json();
<?php
$ch = curl_init("https://kitobchi.com/api/v1/client/products/sellers/list?page=1");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'X-App-ID: app_xxxxxxxxxxxx',
'X-App-Secret: ' . getenv('KITOBCHI_APP_SECRET'),
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import os, requests
res = requests.get(
"https://kitobchi.com/api/v1/client/products/sellers/list?page=1",
headers={
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": os.environ["KITOBCHI_APP_SECRET"],
},
)
data = res.json()
{
"status": "success",
"data": [
{
"id": 12,
"name": "Asaxiy Books",
"logo": "https://kitobchi.com/storage/sellers/12.png",
"rating": 4.8,
"latest_products": []
}
]
}⚡ Live Konsolda Sinab Ko'rish (Try It Out)
QR orqali seller
QR token orqali do‘kon ma’lumotini olish.
| Parametr | Turi | Joyi | Majburiy | Tavsifi |
|---|---|---|---|---|
| token | string | path | Ha | Seller QR tokeni. |
curl --request GET \
--url 'https://kitobchi.com/api/v1/client/products/sellers/by-qr/qr_9f3c1a' \
--header 'Accept: application/json' \
--header 'X-App-ID: app_xxxxxxxxxxxx' \
--header 'X-App-Secret: your-secret'
const res = await fetch("https://kitobchi.com/api/v1/client/products/sellers/by-qr/qr_9f3c1a", {
headers: {
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": process.env.KITOBCHI_APP_SECRET,
},
});
const data = await res.json();
<?php
$ch = curl_init("https://kitobchi.com/api/v1/client/products/sellers/by-qr/qr_9f3c1a");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'X-App-ID: app_xxxxxxxxxxxx',
'X-App-Secret: ' . getenv('KITOBCHI_APP_SECRET'),
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import os, requests
res = requests.get(
"https://kitobchi.com/api/v1/client/products/sellers/by-qr/qr_9f3c1a",
headers={
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": os.environ["KITOBCHI_APP_SECRET"],
},
)
data = res.json()
{
"status": "success",
"data": {
"id": 12,
"name": "Asaxiy Books",
"rating": 4.8
}
}⚡ Live Konsolda Sinab Ko'rish (Try It Out)
Seller profili
Do‘kon profili va uning sahifalangan mahsulotlari.
| Parametr | Turi | Joyi | Majburiy | Tavsifi |
|---|---|---|---|---|
| id | integer | path | Ha | Seller ID. |
| page | integer | path | Ha | Mahsulotlar sahifasi. |
curl --request GET \
--url 'https://kitobchi.com/api/v1/client/products/sellers/profile/12/1' \
--header 'Accept: application/json' \
--header 'X-App-ID: app_xxxxxxxxxxxx' \
--header 'X-App-Secret: your-secret'
const res = await fetch("https://kitobchi.com/api/v1/client/products/sellers/profile/12/1", {
headers: {
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": process.env.KITOBCHI_APP_SECRET,
},
});
const data = await res.json();
<?php
$ch = curl_init("https://kitobchi.com/api/v1/client/products/sellers/profile/12/1");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'X-App-ID: app_xxxxxxxxxxxx',
'X-App-Secret: ' . getenv('KITOBCHI_APP_SECRET'),
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import os, requests
res = requests.get(
"https://kitobchi.com/api/v1/client/products/sellers/profile/12/1",
headers={
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": os.environ["KITOBCHI_APP_SECRET"],
},
)
data = res.json()
{
"status": "success",
"data": {
"id": 12,
"name": "Asaxiy Books",
"products": [],
"meta": {
"page": 1,
"total": 240
}
}
}⚡ Live Konsolda Sinab Ko'rish (Try It Out)
Shtrix-kod / ISBN bo‘yicha mahsulot
Do‘kon ichidan shtrix-kod yoki ISBN orqali bitta mahsulotni topadi. `/isbn/{isbn}` alias ham mavjud.
| Parametr | Turi | Joyi | Majburiy | Tavsifi |
|---|---|---|---|---|
| sellerId | integer | path | Ha | Seller ID. |
| code | string | path | Ha | Shtrix-kod yoki ISBN. |
curl --request GET \
--url 'https://kitobchi.com/api/v1/client/products/sellers/12/code/9781847941831' \
--header 'Accept: application/json' \
--header 'X-App-ID: app_xxxxxxxxxxxx' \
--header 'X-App-Secret: your-secret'
const res = await fetch("https://kitobchi.com/api/v1/client/products/sellers/12/code/9781847941831", {
headers: {
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": process.env.KITOBCHI_APP_SECRET,
},
});
const data = await res.json();
<?php
$ch = curl_init("https://kitobchi.com/api/v1/client/products/sellers/12/code/9781847941831");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'X-App-ID: app_xxxxxxxxxxxx',
'X-App-Secret: ' . getenv('KITOBCHI_APP_SECRET'),
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import os, requests
res = requests.get(
"https://kitobchi.com/api/v1/client/products/sellers/12/code/9781847941831",
headers={
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": os.environ["KITOBCHI_APP_SECRET"],
},
)
data = res.json()
{
"status": "success",
"data": {
"id": 128,
"name": "Atomic Habits",
"price": 89000,
"in_stock": true,
"seller_id": 12
}
}