Kitobchi API v1
OpenAPI Postman Kitobchi.com

Mahsulotlar API

Kitob, kanselyariya, mualliflar, nashriyotlar, tavsiyalar va seller mahsulotlarini olish.

Katalogdagi kitoblar, kanselyariyalar, seller ma'lumotlari va tavsiyalar. Barcha GET endpointlar read ability talab qiladi.

GET https://www.kitobchi.com/api/v1/client/products/book/{id}
Kesh
Bitta kitob tafsiloti

Kitobning to‘liq tavsifi, muallifi, nashriyoti, narxi, qoldig‘i va rasmlarini qaytaradi.

Path parametrlari
ParametrTuriTavsifi
id majburiy integer Kitob ID raqami.
curl --request GET \
  --url 'https://www.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://www.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://www.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://www.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()
Javob 200 OK
{
    "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"
        }
    }
}
Sinab ko'rish
X-App-ID
X-App-Secret
id
GET https://www.kitobchi.com/api/v1/client/products/stationery/{id}
Kesh
Kanselyariya mahsuloti tafsiloti

Kanselyariya tovarining to‘liq ma’lumoti va variantlarini qaytaradi.

Path parametrlari
ParametrTuriTavsifi
id majburiy integer Mahsulot ID si.
curl --request GET \
  --url 'https://www.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://www.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://www.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://www.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()
Javob 200 OK
{
    "status": "success",
    "data": {
        "id": 54,
        "name": "ErichKrause Qalam to‘plami",
        "price": 25000,
        "type": "stationery",
        "in_stock": true,
        "seller": {
            "id": 12,
            "name": "Kanselyariya Dunyosi"
        }
    }
}
Sinab ko'rish
X-App-ID
X-App-Secret
id
GET https://www.kitobchi.com/api/v1/client/products/by-author/{authorId}
Kesh
Muallif bo‘yicha kitoblar

Muayyan muallifning barcha faol kitoblari ro‘yxatini sahifalab qaytaradi.

Path parametrlari
ParametrTuriTavsifi
authorId majburiy integer Muallif ID raqami.
Query parametrlari
ParametrTuriTalabTavsifi
page integer ixtiyoriy Sahifa raqami.
per_page integer ixtiyoriy Sahifadagi elementlar soni.
curl --request GET \
  --url 'https://www.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://www.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://www.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://www.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()
Javob 200 OK
{
    "status": "success",
    "data": [
        {
            "id": 128,
            "name": "Atomic Habits",
            "price": 89000,
            "type": "book"
        }
    ],
    "meta": {
        "current_page": 1,
        "per_page": 20,
        "total": 4,
        "last_page": 1
    }
}
Sinab ko'rish
X-App-ID
X-App-Secret
authorId
page
per_page
GET https://www.kitobchi.com/api/v1/client/products/by-publisher/{publisherId}
Kesh
Nashriyot bo‘yicha kitoblar

Muayyan nashriyotning barcha faol kitoblari ro‘yxatini sahifalab qaytaradi.

Path parametrlari
ParametrTuriTavsifi
publisherId majburiy integer Nashriyot ID raqami.
Query parametrlari
ParametrTuriTalabTavsifi
page integer ixtiyoriy Sahifa raqami.
per_page integer ixtiyoriy Sahifadagi elementlar soni.
curl --request GET \
  --url 'https://www.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://www.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://www.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://www.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()
Javob 200 OK
{
    "status": "success",
    "data": [
        {
            "id": 128,
            "name": "Atomic Habits",
            "price": 89000,
            "type": "book"
        }
    ],
    "meta": {
        "current_page": 1,
        "per_page": 20,
        "total": 12,
        "last_page": 1
    }
}
Sinab ko'rish
X-App-ID
X-App-Secret
publisherId
page
per_page
GET https://www.kitobchi.com/api/v1/client/products/{col}
Kesh
Mahsulotlar ro‘yxati

Katalogdagi mahsulotlarni turi bo‘yicha sahifalab qaytaradi.

Path parametrlari
ParametrTuriTavsifi
col majburiy string Mahsulot turi: books yoki stationery.
Query parametrlari
ParametrTuriTalabTavsifi
page integer ixtiyoriy Sahifa raqami (1 dan boshlanadi).
per_page integer ixtiyoriy Sahifadagi elementlar soni (maksimal 100).
q string ixtiyoriy Nom bo‘yicha filtr.
sort string ixtiyoriy Tartiblash: popular, new, price_asc, price_desc.
curl --request GET \
  --url 'https://www.kitobchi.com/api/v1/client/products/books?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://www.kitobchi.com/api/v1/client/products/books?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://www.kitobchi.com/api/v1/client/products/books?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://www.kitobchi.com/api/v1/client/products/books?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()
Javob 200 OK
{
    "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
    }
}
Sinab ko'rish
X-App-ID
X-App-Secret
col
page
per_page
q
sort
GET https://www.kitobchi.com/api/v1/client/products/recommendation/{col}
Kesh
Tavsiya qilingan mahsulotlar

Vitrina va “sizga mos” bloklari uchun tavsiya ro‘yxati.

Path parametrlari
ParametrTuriTavsifi
col majburiy string Mahsulot turi: books yoki stationery.
curl --request GET \
  --url 'https://www.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://www.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://www.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://www.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()
Javob 200 OK
{
    "status": "success",
    "data": [
        {
            "id": 305,
            "name": "Deep Work",
            "price": 76000,
            "image": "https://kitobchi.com/storage/books/305.jpg",
            "type": "book",
            "in_stock": true
        }
    ]
}
Sinab ko'rish
X-App-ID
X-App-Secret
col
GET https://www.kitobchi.com/api/v1/client/products/sellers/list
Kesh
Sellerlar va oxirgi mahsulotlari

Do‘konlar ro‘yxati va har biri uchun eng so‘nggi mahsulotlar.

Query parametrlari
ParametrTuriTalabTavsifi
page integer ixtiyoriy Sahifa raqami.
curl --request GET \
  --url 'https://www.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://www.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://www.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://www.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()
Javob 200 OK
{
    "status": "success",
    "data": [
        {
            "id": 12,
            "name": "Asaxiy Books",
            "logo": "https://kitobchi.com/storage/sellers/12.png",
            "rating": 4.8,
            "latest_products": []
        }
    ]
}
Sinab ko'rish
X-App-ID
X-App-Secret
page
GET https://www.kitobchi.com/api/v1/client/products/sellers/by-qr/{token}
Kesh
QR orqali seller

QR token orqali do‘kon ma’lumotini olish.

Path parametrlari
ParametrTuriTavsifi
token majburiy string Seller QR tokeni.
curl --request GET \
  --url 'https://www.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://www.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://www.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://www.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()
Javob 200 OK
{
    "status": "success",
    "data": {
        "id": 12,
        "name": "Asaxiy Books",
        "rating": 4.8
    }
}
Sinab ko'rish
X-App-ID
X-App-Secret
token
GET https://www.kitobchi.com/api/v1/client/products/sellers/profile/{id}/{page}
Kesh
Seller profili

Do‘kon profili va uning sahifalangan mahsulotlari.

Path parametrlari
ParametrTuriTavsifi
id majburiy integer Seller ID.
page majburiy integer Mahsulotlar sahifasi.
curl --request GET \
  --url 'https://www.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://www.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://www.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://www.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()
Javob 200 OK
{
    "status": "success",
    "data": {
        "id": 12,
        "name": "Asaxiy Books",
        "products": [],
        "meta": {
            "page": 1,
            "total": 240
        }
    }
}
Sinab ko'rish
X-App-ID
X-App-Secret
id
page
GET https://www.kitobchi.com/api/v1/client/products/sellers/{sellerId}/code/{code}
Kesh
Shtrix-kod / ISBN bo‘yicha mahsulot

Do‘kon ichidan shtrix-kod yoki ISBN orqali bitta mahsulotni topadi. `/isbn/{isbn}` alias ham mavjud.

Path parametrlari
ParametrTuriTavsifi
sellerId majburiy integer Seller ID.
code majburiy string Shtrix-kod yoki ISBN.
curl --request GET \
  --url 'https://www.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://www.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://www.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://www.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()
Javob 200 OK
{
    "status": "success",
    "data": {
        "id": 128,
        "name": "Atomic Habits",
        "price": 89000,
        "in_stock": true,
        "seller_id": 12
    }
}
Sinab ko'rish
X-App-ID
X-App-Secret
sellerId
code