NAV undefined
undefined O'zbekcha English Русский
bash

Kirish

Api Url http://api.bts.uz:8080/index.php

Version 1.0 End point http://api.bts.uz:8080/index.php

API Token ni olish

    
    curl --location 'http://api.bts.uz:8080/index.php?r=v1%2Fauth%2Fget-token' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "username": "{{username}}",
        "password": "{{password}}",
        "inn": "{{inn}}"
    }

    

SUCCESS

    
    {
        "data":{
            "token":"{{token}}" 
        },
        "state":null,
        "message":null,
        "code":200
    }
    

FAILURE 401

    
    {
        "data":null,
        "state":null,
        "message":
        {
            "text": "Invalid INN"
        },
        "code":401
    }
    

HTTP Request

POST (JSON) v1/auth/get-token

Query Parameters

Parameter Type Required Description
username string Yes Login
password string Yes Parol
inn string Yes Kompaniya INN raqami

Mahalliy Buyurtma

Buyurtma yaratish

curl
--request POST \
--url "http://api.bts.uz:8080/index.php?r=v1/order/add" \
--header "Authorization: Bearer <token>"
--header 'content-type: application/json'
--data{
         "clientId":abc123mn12,
         "wcs_code":900001,
         "senderDelivery":1,
         "senderCityId":3,
         "senderAddress":"Toshkent sh., Bobur ko‘chasi, 5-A",
         "senderReal":"Jurabek Turdiyev",
         "senderPhone":"+998 99 1234567",
         "weight":2,
         "packageId":4,
         "postTypeId":16,
         "postTypes":[
              {
                  "name": "Kitob",
                  "code": "ZFD21AD",
                  "count": 1
              },
              {
                  "name": "Daftar",
                  "code": "AV2321",
                  "count": 2
              }
         ],
         "receiverDelivery":1,
         "receiver":"Odil Ahkmedov",
         "receiverCityId":3,
         "receiverAddress":"Gozovo qish. 41 uy",
         "volume":0,
         "takePhoto":1,
         "piece":1,
         "senderDate":"2018-02-06",
         "receiverDate":"2018-02-07",
         "receiverPhone":"+998 99 1234567",
         "receiverPhone1":null,
         "options": [
            {
              "optionId": 2,
              "goods": [
                {
                  "mxikGoodsId": 71,
                  "amount": 1,
                  "goodPrice": 700000
                },
                {
                  "mxikGoodsId": 72,
                  "amount": 1,
                  "goodPrice": 100000
                }
              ]
            }
          ]
        }

SUCCESS

{
    "orderId": 229234,
    "clientId": abc123mn12,
    "wcs_code": "900001"
    "customer": {
        "id": 79,
        "name": "ООО JOHD "
    },
    "status": {
        "id": 1,
        "info": "Mijozda"
    },
    "senderRegion": {
        "id": 2,
        "name": "Andijon viloyati"
    },
    "senderCity": {
        "id": 3,
        "name": "Асака туман",
        "regionId": 2
    },
    "senderBranch": {
        "id": 93,
        "name": "ASAKA BTS"
        "regionId": 2
    },
    "senderDelivery": 1,
    "senderAddress": "Toshkent sh., Bobur ko‘chasi, 7-A",
    "senderReal": "Jurabek Turdiyev",
    "senderPhone": "+998 99 1234567",
    "receiver": "Odil Ahkmedov",
    "receiverRegion": {
        "id": 2,
        "name": "Andijon viloyati"
    },
    "receiverCity": {
        "id": 3,
        "name": "Асака туман"
    },
    "receiverBranch": {
        "id": 93,
        "name": "ASAKA BTS"
        "regionId": 2
    },
    "receiverDelivery": 1,
    "receiverAddress": "Gozovo qish. 41 uy",
    "receiverPhone": "+998 99 1234568",
    "receiverPhone1": null,
    "package": {
        "id": 8,
        "name": "BTS PAKETLAR"
    },
    "postType": {
        "id": 4,
        "name": "HUJJATLAR"
    },
    "cost": "12000.00",
    "weight": "2.000",
    "piece": 1,
    "volume": 0,
    "takePhoto": 0,
    "senderDate": "2018-02-06",
    "receiverDate": "2018-02-07",
    "barcode": "60000006106",
    "labelEncode": "https://...",
    "labelSticker": "https://...",
    "tracking": "https://..."
}

Failure Validation error

{
"errors": {
    "senderPhone": [
        "«Telefon» ni to'ldirishingiz kerak."
    ],
    "weight": [
        "«Kg» to'ldirilishi kerak."
    ]
}
}

HTTP Request

POST /order/add

Query Parameters

Parameter Type Description
senderCityId* integer Yuboruvchining shahri. Shaharlar ro'yxati
senderAddress* string Yuboruvchining manzili
senderDelivery integer 1-Kurerga qo'ng'iroq qiling, 0-BTS ofisiga olib ketish.
senderReal* string Yuboruvchining to'liq ismi
senderPhone* string Yuboruvchining telefon raqami
weight* double Jo'natma og'irligi
packageId* integer Qadoqlash turi. Qadoqlash turlari
postTypeId* integer Yuborish turi Yuborish turlari
receiver* string Qabul qiluvchining to'liq ismi
receiverAddress* string Qabul qiluvchining manzili
receiverDelivery integer 1-Agar kurer yetkazib bersa, 0-qabul qiluvchi BTSni ofisdan olsa.
receiverCityId* integer Qabul qiluvchining shahri. Shaharlar ro'yxati
receiver_branch_id integer receiverDelivery = 0 yuborilsa receiver_branch_id qiymatiga "receiverCityId" da mavjud bolgan ofis "id"si biriktiriladiFiliallar ro'yxati
clientId string Mijoz shtrix kodi
volume number Hajm (hajm = uzunlik * balandlik * kenglik) yuborish
takePhoto integer 1 - oluvchining fotosurati kerak, 0 - shart emas. standart 0. Qabul qilingan qiymatlar
is_test integer 1 - sinov uchun, 0 - kerak emas. standart 0. Qabul qilingan qiymatlar
piece integer joʻnatma soni, standart 1
senderDate date Taqdim etilgan sana, boshlang'ich buyurtma sanasi
receiverDate date Qabul qilingan sana, standart buyurtma sanasi
receiverPhone* string Qabul qiluvchining telefon raqami
receiverPhone1 string Qabul qiluvchining qo'shimcha telefon raqami
bringBackMoney integer 1 - tovar uchun pul qaytarilishi kerak, 0 - etkazib berishda naqd pul yo'q.
back_money integer siz bringBackMoney 1 ga teng bo'lganda miqdorni ko'rsatishingiz kerak.
bringBackWaybill integer 1-Qaytish hujjati kerak
additionalInfo string Sharhlar (Hujjatning bir nusxasi qaytariladi)
labelEncode string Shtrix-kod (fayl)
wcs_code string(70) Unikal buyurtma kodi
tracking string Tracking url manzili
labelSticker string Shtrix-kod stiker fayl manzili
Elektron kassa chekni olish uchun (COD uchun majburiy)
options array Mahsulot tafsilotlari massivi
optionId integer 2 - Elektron kassa chekini olish uchun
goods array Mahsulot tafsilotlari massivi
mxikGoodsId integer Mahsulotning mahsulotlar ro'yxatidagi ID raqami Mahsulotlar ro'yxati
amount integer Mahsulotning soni
goodPrice integer 1 dona tovarning qiymati (summasi so'mda)

Buyurtmani taxrirlash

curl
--request POST \
--url "http://api.bts.uz:8080/index.php?r=v1/order/edit" \
--header "Authorization: Bearer <token>"
--header 'content-type: application/json'
--data{
         "orderId":229234,
         "clientId":abc123mn12,
         "wcs_code":900001,
         "senderDelivery":1,
         "senderCityId":3,
         "senderAddress":"Toshkent sh., Bobur ko‘chasi, 5-A",
         "senderReal":"Jurabek Turdiyev",
         "senderPhone":"+998 99 1234567",
         "weight":2,
         "packageId":4,
         "postTypeId":16,
         "postTypes":[
              {
                  "name": "Kitob",
                  "code": "ZFD21AD",
                  "count": 1
              },
              {
                  "name": "Daftar",
                  "code": "AV2321",
                  "count": 2
              }
         ],
         "receiverDelivery":1,
         "receiver":"Odil Ahkmedov",
         "receiverCityId":3,
         "receiverAddress":"Gozovo qish. 41 uy",
         "volume":0,
         "takePhoto":1,
         "piece":1,
         "senderDate":"2018-02-06",
         "receiverDate":"2018-02-07",
         "receiverPhone":"+998 99 1234567",
         "receiverPhone1":null,
         "options": [
            {
              "optionId": 2,
              "goods": [
                {
                  "mxikGoodsId": 71,
                  "amount": 1,
                  "goodPrice": 700000
                },
                {
                  "mxikGoodsId": 72,
                  "amount": 1,
                  "goodPrice": 100000
                }
              ]
            }
          ]
        }

SUCCESS

{
    "orderId": 229234,
    "clientId": abc123mn12,
    "wcs_code": "900001"
    "customer": {
        "id": 79,
        "name": "ООО JOHD "
    },
    "status": {
        "id": 1,
        "info": "Mijozda"
    },
    "senderRegion": {
        "id": 2,
        "name": "Andijon viloyati"
    },
    "senderCity": {
        "id": 3,
        "name": "Асака туман",
        "regionId": 2
    },
    "senderBranch": {
        "id": 93,
        "name": "ASAKA BTS"
        "regionId": 2
    },
    "senderDelivery": 1,
    "senderAddress": "Toshkent sh., Bobur ko‘chasi, 7-A",
    "senderReal": "Jurabek Turdiyev",
    "senderPhone": "+998 99 1234567",
    "receiver": "Odil Ahkmedov",
    "receiverRegion": {
        "id": 2,
        "name": "Andijon viloyati"
    },
    "receiverCity": {
        "id": 3,
        "name": "Асака туман"
    },
    "receiverBranch": {
        "id": 93,
        "name": "ASAKA BTS"
        "regionId": 2
    },
    "receiverDelivery": 1,
    "receiverAddress": "Gozovo qish. 41 uy",
    "receiverPhone": "+998 99 1234568",
    "receiverPhone1": null,
    "package": {
        "id": 8,
        "name": "BTS PAKETLAR"
    },
    "postType": {
        "id": 4,
        "name": "HUJJATLAR"
    },
    "cost": "12000.00",
    "weight": "2.000",
    "piece": 1,
    "volume": 0,
    "takePhoto": 0,
    "senderDate": "2018-02-06",
    "receiverDate": "2018-02-07",
    "barcode": "60000006106"
    "labelEncode": "https://..."
    "labelSticker": "https://..."
    "tracking": "https://..."
}

Failure Validation error

{
"errors": {
    "senderPhone": [
        "«Telefon» ni to'ldirishingiz kerak."
    ],
    "weight": [
        "«Kg» to'ldirilishi kerak."
    ]
}
}

HTTP Request

POST /order/edit

Query Parameters

Parameter Type Description
orderId* integer Buyurtma ID si
senderCityId* integer Yuboruvchining shahri. Shaharlar ro'yxati
senderAddress* string Yuboruvchining manzili
senderDelivery integer 1-Kurerga qo'ng'iroq qiling, 0-BTS ofisiga olib ketish.
senderReal* string Yuboruvchining to'liq ismi
senderPhone* string Yuboruvchining telefon raqami
weight* double Jo'natma og'irligi
packageId* integer Qadoqlash turi. Qadoqlash turlari
postTypeId* integer Yuborish turi Yuborish turlari
receiver* string Qabul qiluvchining to'liq ismi
receiverAddress* string Qabul qiluvchining manzili
receiverDelivery integer 1-Agar kurer yetkazib bersa, 0-qabul qiluvchi BTSni ofisdan olsa.
receiverCityId* integer Qabul qiluvchining shahri. Shaharlar ro'yxati
receiver_branch_id integer receiverDelivery = 0 yuborilsa receiver_branch_id qiymatiga "receiverCityId" da mavjud bolgan ofis "id"si biriktiriladiFiliallar ro'yxati
clientId string Mijoz shtrix kodi
volume number Hajm (hajm = uzunlik * balandlik * kenglik) yuborish
takePhoto integer 1 - oluvchining fotosurati kerak, 0 - shart emas. standart 0. Qabul qilingan qiymatlar
is_test integer 1 - sinov uchun, 0 - kerak emas. standart 0. Qabul qilingan qiymatlar
piece integer joʻnatma soni, standart 1
senderDate date Taqdim etilgan sana, boshlang'ich buyurtma sanasi
receiverDate date Qabul qilingan sana, standart buyurtma sanasi
receiverPhone* string Qabul qiluvchining telefon raqami
receiverPhone1 string Qabul qiluvchining qo'shimcha telefon raqami
bringBackMoney integer 1 - tovar uchun pul qaytarilishi kerak, 0 - etkazib berishda naqd pul yo'q.
back_money integer siz bringBackMoney 1 ga teng bo'lganda miqdorni ko'rsatishingiz kerak.
bringBackWaybill integer 1-Qaytish hujjati kerak
additionalInfo string Sharhlar (Hujjatning bir nusxasi qaytariladi)
labelEncode string Shtrix-kod (fayl)
wcs_code string(70) Unikal buyurtma kodi
tracking string Tracking url manzili
labelSticker string Shtrix-kod stiker fayl manzili
Elektron kassa chekni olish uchun (COD uchun majburiy)
options array Mahsulot tafsilotlari massivi
optionId integer 2 - Elektron kassa chekini olish uchun
goods array Mahsulot tafsilotlari massivi
mxikGoodsId integer Mahsulotning mahsulotlar ro'yxatidagi ID raqami Mahsulotlar ro'yxati
amount integer Mahsulotning soni
goodPrice integer 1 dona tovarning qiymati (summasi so'mda)

Elektron kassa cheki uchun mahsulotni ro'yxatdan o'tkazish

Http request

POST http://api.bts.uz:8080/index.php?r=v1/order/reg-good

Parameter Type Description
spic string Mahsulotlar va xizmatlarning identifikatsiya kodlari (MXIK)
name string Mahsulotning qisqacha nomi
units string O'lchov birligi
goodPrice integer Bitta mahsulotning narxi
{
  "spic": "08517001001020045",
  "name": "Telefon",
  "units": "dona",
  "goodPrice": 100000
}

SUCCESS

{
    "id": 72,
    "spic": "08517001001020045",
    "name": "Telefon",
    "units": "dona",
    "goodPrice": "100000"
}

Elektron kassa cheki uchun mahsulotlar ro'yxati

Http request

GET http://api.bts.uz:8080/index.php?r=v1/order/list-goods

SUCCESS

[
    {
        "id": 71,
        "spic": "04901001001000000",
        "name": "Босма китоблар",
        "units": "dona",
        "goodPrice": 700000
    },
    {
        "id": 72,
        "spic": "08517001001020045",
        "name": "Telefon",
        "units": "dona",
        "goodPrice": 100000
    }
]

Buyurtma ma'lumotlari

Http request

GET /order/detail&id=<orderId>

Parameter Type Description
orderId integer Buyurtma raqami
curl
--request GET \
--url "http://api.bts.uz:8080/index.php?r=v1/order/detail&id=<orderId>" \
--header "Authorization: Bearer <token>"

JSON формат:

{
    "orderId": "<orderId>",
    "customer": {
        "id": 79,
        "name": "ООО JOHD "
    },
    "status": {
        "id": 1,
        "info": "Mijozda"
    },
    "senderRegion": {
        "id": 2,
        "name": "Andijon viloyati"
    },
    "senderCity": {
        "id": 3,
        "name": "Асака туман",
        "regionId": 2
    },
    "senderBranch": {
        "id": 93,
        "name": "ASAKA BTS"
        "regionId": 2
    },
    "senderDelivery": 1,
    "senderAddress": "г.Ташкент,ул.Бабаева,7-А",
    "senderPhone": "+998 99 1234567",
    "receiver": "Odil Ahkmedov",
    "receiverRegion": {
        "id": 2,
        "name": "Andijon viloyati"
    },
    "receiverCity": {
        "id": 3,
        "name": "Асака туман"
    },
    "receiverBranch": {
        "id": 93,
        "name": "ASAKA BTS"
        "regionId": 2
    },
    "receiverDelivery": 1,
    "receiverAddress":"Gozovo qish. 41 uy",
    "receiverPhone": "+998 99 1234568",
    "receiverPhone1": null,
    "package": {
        "id": 8,
        "name": "BTS PAKETLAR"
    },
    "postType": {
        "id": 4,
        "name": "HUJJATLAR"
    },
    "cost": "12000.00",
    "weight": "2.000",
    "piece": 1,
    "volume": "0",
    "urgent": 0,
    "takePhoto": 0,
    "senderSign": null,
    "receiverSign": null,
    "senderDate": "2018-02-06",
    "receiverDate": "2018-02-07",
    "barcode": "60000006106",
    "labelEncode": "<encoded_file>",
    "wcs_code": "900001"
}

Buyurtmani o'chirish

Http request

GET /order/cancel&id=<orderId>

Parameter Type Description
orderId integer Buyurtma raqami
curl
--request GET \
--url "http://api.bts.uz:8080/index.php?r=v1/order/cancel&id=<orderId>" \
--header "Authorization: Bearer <token>"

JSON формат:

{
    "orderId": "229234",
    "status": {
        "id": 0,
        "name": "Bekor qilingan buyurtma"
    },
}

Buyurtma kalkulyator

Buyurtma narxi.

Http Request

POST /order/calculate

curl
--request POST \
--url "http://api.bts.uz:8080/index.php?r=v1/order/calculate" \
--header "Authorization: Bearer <token>"\
--data
{
    "senderCityId": 3,
    "receiverCityId": 3,
    "weight": 1,
    "volume": null,
    "senderDate": "2018-02-06",
    "senderDelivery": 1,
    "receiverDelivery": 1
}

SUCCESS

{
    "summaryPrice": 10000,
    "requestData": {
        "weight": 1,
        "volume": null,
        "senderCityId": 3,
        "receiverCityId": 3,
        "senderDate": "2018-02-06",
        "senderDelivery": 1,
        "receiverDelivery": 1
    }
}

FAILURE

{
    "errors": {
        "senderCityId": [
            "«Yuborish shahri» ni to'ldirishingiz kerak."
        ]
    }
}
Parameter Type Description
senderCityId* integer Yuboruvchining shahri. Shaharlar ro'yxati
weight* double Jo'natma og'irligi
receiverCityId* integer Qabul qiluvchining shahri. Shaharlar ro'yxati
volume number Hajm (hajm = uzunlik * balandlik * kenglik) yuborish
senderDate date Taqdim etilgan sana, boshlang'ich buyurtma sanasi
senderDelivery integer 2-Kuryer chaqirish (uzoq qishloqdan), 1-kurer chaqarish (shahar markazidan), 0-BTS ofisiga olib ketish.
receiverDelivery integer 2-Agar kurer yetkazib bersa (uzoq qishloqga), 1-agar kurer yetkazib bersa (shahar markaziga), 0-agar qabul qiluvchi BTSni ofisdan olsa.

Hozirgi holat

Http request

GET /order/track&id=<orderId>

curl
--request GET \
--url "http://api.bts.uz:8080/index.php?r=v1/order/track&id=<orderId>" \
--header "Authorization: Bearer <token>"
Parameter Type Description
orderId integer Buyurtma ID si

SUCCESS

{
    "orderId": 229234,
    "status": {
        "id": 1,
        "name": "new"
    }
}

Kuzatuv

Http request

GET /order/history&id=<orderId>

Parameter Type Description
orderId integer Buyurtma ID si
curl
--request GET \
--url "http://api.bts.uz:8080/index.php?r=v1/order/history&id=<orderId>" \
--header "Authorization: Bearer <token>"

SUCCESS:

{
   {
    "message": "message1",
    "timestamp": 1720690236,
    "status_id": 4,
    "location": "QUSHBEGI BTS (PVZ)"
   },
   {
    "message": "message2",
    "timestamp": 1720690321,
    "status_id": 5,
    "location": "JARQO'RG'ON BTS"
   },
}

Webhook endpointini ro‘yxatdan o‘tkazish

Http request

POST /webhook/add

Parameter Type Description
webhook_url string Webhook endpoint URL manzili
has_token boolean Har bir webhook so'rovida token yuborish
curl
        --request POST \
        --url "http://api.bts.uz:8080/index.php?r=v1/webhook/add" \
        --header "Authorization: Bearer <token>"

SUCCESS:

{
    {
        "data": {
            "webhook_url": "https://...",
            "method": "POST",
            "date": "2025-04-03",
            "has_token": true
        },
        "state": null,
        "message": null,
        "code": 200
    }
}

Webhook so‘rov formati

Http request

POST /webhook_url

Webhook so‘rov formati (Webhook so‘rovlari POST metodi orqali yuboriladi va JSON formatda bo‘ladi.)
Parameter Type Description
clientId string Mijoz ID raqami
orderId integer Buyurtma ID si
barcode string Shtrix kod (BTS)
status integer Buyurtma statusi
date date Status yangilangan vaqt
curl
        --request POST \
        --url "http://webhook_url" \
        --header "Authorization: Bearer <token>"

SUCCESS:

{
    {
        {
            "clientId": "10090981",
            "orderId": 4392014,
            "barcode": "10090981",
            "status": 
                {
                    "id": 6,
                    "name": "Доставлен"
                },
            "date": "2024-09-13 07:55:01"

        },
    }
}

Bekor qilish sabablari

Http request

GET v1/order/cancellation&id=<orderId>

Parameter Type Description
orderId integer Buyurtma ID si
curl
--request GET \
--url "http://api.bts.uz:8080/index.php?r=v1/order/cancellation&id=<orderId>" \
--header "Authorization: Bearer <token>"

SUCCESS:

[
   {
    "employee": "Jon Done",
    "description": "Saqlash muddati tugagan",
    "date": 2024-08-20 14:29:06
   },
   {
    "employee": "Jon Done",
    "description": "Noto`g`ri manzil",
    "date": 2024-08-23 14:29:06
   }
]

Statuslar ro'yxati

id info
0 Rad etilgan
1 Yuboruvchida
2 Kuryer buyurtmani qabul qildi
3 Jo'natuvchining ofisida
4 Yetkazish ofisida
5 Kuryer yetkazmoqda
6 Yetkazib berilgan
7 Qaytarish
8 Tranzit ofisda
10 Saralash markazida
31 Omborda
32 Qopda
33 Transportda
34 RC kuryerka

Xalqaro Buyurtma

Buyurtma yaratish

curl
--request POST \
--url "http://api.bts.uz:8080/index.php?r=v1/international/add" \
--header "Authorization: Bearer <token>"
--header 'content-type: application/json'
--data{
         "ParcelNumber":"366489851",
         "ReceiverPhone":"+998 99 1234567",
         "ReceiverPhone1":"+998 88 1234567",
         "ReceiverPatronymic":"Johnson",
         "ReceiverSurname":"Elizabeth"
         "ReceiverFirstName":"Emily",
         "ReceiverPassposrtSerial":"AC",
         "ReceiverPassposrtNumber":"0579415",
         "ReceiverPinfl":"12345678912345",
         "ReceiverAddress":"Toshkent sh., Bobur ko‘chasi, 5-A",
         "ReceiverCustomsAgree":"1",
         "ParcelWeight":"13",
         "ParcelValue":"3",
         "ParcelDeclareCurrency":"RUB",
         "ReceiverCityId":"3",
         "ReceiverBranchId":62,
         "ReceiverDelivery":0,
         "products":{
            {
                "ProductDescription":"Футболка1",
                "ProductDescriptionRu":"ФутболкаRu1",
                "ProductQuantity":"2",
                "ProductWeight":"4",
                "ProductDeclareValue":"1",
                "ProductUrl":"url1",
                "ProductUnit":"kg",
                "HsCodeIs":"6211390000",
                "ProductModel":"2324345",
                "ProductImei":"2342342341245",
            },
            {
                "ProductDescription":"Футболка2",
                "ProductDescriptionRu":"ФутболкаRu2",
                "ProductQuantity":"1",
                "ProductWeight":"5",
                "ProductDeclareValue":"1",
                "ProductUrl":"url2",
                "ProductUnit":"kg",
                "HsCodeIs":"546567565",
                "ProductModel":"6523434",
                "ProductImei":"324234523412",
            },
            {
                ....
            }
         }
        }  

SUCCESS

{
    "ParcelNumber": "366489851"
    "ReceiverPhone": "+998 99 1234567",
    "ReceiverPhone1": "+998 88 1234567",
    "ReceiverPatronymic": 2,
    "ReceiverSurname": Elizabeth,
    "ReceiverFirstName": Emily,
    "ReceiverPassposrtSerial": AC,
    "ReceiverPassposrtNumber": 0579415,
    "ReceiverPinfl": 12345678912345,
    "ReceiverAddress":"Toshkent sh., Bobur ko‘chasi, 5-A",
    "ReceiverCustomsAgree": 1,
    "ParcelWeight": "4"
    "ParcelValue": "312412 "
    "ParcelDeclareCurrency": "RUB"
    "ReceiverDelivery": 0,
    "branch": {
        "ReceiverBranchId": 62,
        "name": "ASAKA BTS"
    },
    "city": {
        "ReceiverCityId": 3,
        "name": "Асака туман"
    },
    "products": {
        {
            "ProductDescription": "Футболка1",
            "ProductDescriptionRu": "ФутболкаRu1",
            "ProductQuantity": "2",
            "ProductWeight": "4",
            "ProductDeclareValue": "1",
            "ProductUrl": "url1",
            "ProductUnit": "kg",
            "HsCodeIs": "6211390000",
            "ProductModel": "2324345",
            "ProductImei": "2342342341245"
        },
        {
            "ProductDescription": "Футболка2",
            "ProductDescriptionRu": "ФутболкаRu2",
            "ProductQuantity": "1",
            "ProductWeight": "5",
            "ProductDeclareValue": "1",
            "ProductUrl": "url2",
            "ProductUnit": "kg",
            "HsCodeIs": "546567565",
            "ProductModel": "6523434",
            "ProductImei": "324234523412"
        },
        {
            ....
        }
    },
}

Failure Validation error

{
"errors": {
    "ReceiverPhone": [
        "«Telefon» ni to'ldirishingiz kerak."
    ],
    "ParcelWeight": [
        "«Kg» to'ldirilishi kerak."
    ]
}
}

HTTP Request

POST /international/add

Query Parameters

Parameter Type Description
ParcelNumber* string Posilka raqami
ReceiverPhone* string Bog‘lanish uchun raqam
ReceiverPhone1 string Mahalliy telefon
ReceiverPatronymic string Otasining ismi
ReceiverSurname* string Familiya
ReceiverFirstName* string Ism
ReceiverPassposrtSerial* string Pasport seriyasi
ReceiverPassposrtNumber* string Pasport raqami
ReceiverPinfl* string Pinfl
ReceiverAddress string Oluvchining manzili (Jismoniy shaxs)
ReceiverCustomsAgree string Oluvchi bojxona roziligi
ParcelWeight* string Posilkaning vazni
ParcelValue string Posilkaning qiymati
ParcelDeclareCurrency* string Posilka deklaratsiyasi valyutasi
ReceiverCityId integer Qabul qiluvchining shahri. Shaharlar ro'yxati
ReceiverBranchId integer receiverDelivery = 0 yuborilsa receiver_branch_id qiymatiga "receiverCityId" da mavjud bolgan ofis "id"si biriktiriladiFiliallar ro'yxati
ReceiverDelivery* string 1-Kurerga qo'ng'iroq qiling, 0-BTS ofisiga olib ketish.
products array Product tafsilotlari massivi
ProductDescription* text Mahsulot tavsifi
ProductDescriptionRu* text Ruscha tavsif
ProductQuantity* string Soni
ProductWeight* string Sof vazn (kg)
ProductDeclareValue* string Bitta uchun eʼlon qilingan qiymat
ProductUrl* string Mahsulot havolasi
ProductUnit* string Mahsulot birligi Og'irlik: Kilogramm (kg), Gramm (g), Tonna (t). Miqdor: Dona (dona). Hajm: Litr (L), Millilitr (mL), Kub metr (m³).
HsCodeIs* string HS kodi
ProductModel string Mahsulot modeli
ProductImei string Mahsulot IMEI raqami

Hozirgi holat

Http request

GET /international/track-by-barcode&barcode=<barcode>

curl
--request GET \
--url "http://api.bts.uz:8080/index.php?r=v1/international/track-by-barcode&barcode=<barcode>" \
--header "Authorization: Bearer <token>"
Parameter Type Description
barcode string Buyurtma shtrix kodi

SUCCESS

{
    "barcode": 01000865704,
    "status": {
        "code": 200,
        "message": "In the sorting center"
    }
}

Manifest

curl
--request POST \
--url "http://api.bts.uz:8080/index.php?r=v1/international/manifest" \
--header "Authorization: Bearer <token>"
--header 'content-type: application/json'
--data{
         "ManifestNumber":"12345672121",
         "Parcels"{
            {
                "ParcelNumber":"867465466877546"
            },
            {
                "ParcelNumber":"543655876765767"
            }
         },
         "ManifestDetails"{
                "ParcelsCount":"2",
                "Date":"2024-10-10"
         },
        }  

SUCCESS

{
    "success": true,
    "message": "Manifest processed successfully.."
}

Failure Validation error

{
"errors": {
    "ManifestNumber": [
        "ManifestNumber cannot be blank.."
    ],
    "ParcelsCount": [
        "ParcelsCount bo'sh bo'lishi mumkin emas.."
    ]
}
}

HTTP Request

POST /international/manifest

Query Parameters

Parameter Type Description
ManifestNumber* string Manifest raqami
Date* string Manifest sanasi
ParcelNumber* string Buyurtma raqami
ParcelsCount* string Buyurtmalar soni

Statuslar ro'yxati

code info
100 Yuboruvchida
110 Bojxonaga kirdi
120 Bojxonadan chiqdi
130 Bojxona tomonidan bekor qilindi
200 Saralash markazida
300 Qabul qiluvchi ofisida
400 Kuryer yetkazmoqda
500 Yetkazib berildi

Katalog

Shaharlar ro'yxati

id regionId name
3 2 Асака туман
25 2 Андижон шаҳар
26 2 Хонобод шаҳар
27 2 Андижон тумани
28 2 Балиқчи туман
29 2 Булоқбоши туман
30 2 Бўз туман
31 2 Жалақудуқ туман
32 2 Избоскан туман
33 2 Улуғнор туман
34 2 Марҳамат туман
35 2 Пахтаобод туман
36 2 Хўжаобод туман
37 2 Олтинкўл туман
38 2 Қўрғонтепа туман
39 2 Шахрихон туман
2 3 Поп тумани
90 3 Наманган шаҳар
91 3 Мингбулоқ тумани
92 3 Косонсой тумани
93 3 Наманган тумани
94 3 Норин тумани
95 3 Тўрақўрғон тумани
96 3 Уйчи тумани
97 3 Учқўрғон тумани
98 3 Чортоқ тумани
99 3 Чуст тумани
100 3 Янгиқўрғон тумани
10 4 Хива шаҳар
179 4 Урганч шаҳар
180 4 Боғот туман
181 4 Урганч туман
182 4 Қўшкўпир туман
183 4 Хонка туман
184 4 Янгиариқ туман
185 4 Хива туман
186 4 Янгибозор туман
187 4 Хозарасп туман
188 4 Шовот туман
189 4 Гурлан туман
218 4 Тупроққалъа туман
4 5 Тошкент тумани
5 5 Янгийўл шаҳар
6 5 Оҳангарон шаҳар
7 5 Нурафшон шаҳар
142 5 Ангрен шаҳар
143 5 Бекобод шаҳар
144 5 Олмалиқ шаҳар
145 5 Чирчиқ шаҳар
146 5 Бекобод туман
147 5 Бўстонлиқ туман
148 5 Қибрай туман
149 5 Зангиота туман
150 5 Қуйичирчиқ туман
151 5 Оққўрғон туман
152 5 Паркент туман
154 5 Ўртачирчиқ туман
155 5 Чиноз туман
156 5 Юқоричирчиқ туман
157 5 Бўка туман
158 5 Янгийўл туман
159 5 Охангарон туман
201 5 Пискент туман
190 6 Бектемир тумани
191 6 Миробод тумани
192 6 М.Улуғбек тумани
193 6 Сергели тумани
194 6 Олмазор тумани
195 6 Учтепа тумани
196 6 Яшнобод тумани
197 6 Чилонзор тумани
198 6 Шайхонтохур тумани
199 6 Юнусобод тумани
200 6 Яккасарой тумани
216 6 Янги ҳаёт тумани
40 7 Бухоро шаҳар
41 7 Когон шаҳар
42 7 Бухоро туман
43 7 Вобкент туман
44 7 Жондор туман
45 7 Когон туман
46 7 Олот туман
47 7 Пешку туман
48 7 Ромитан туман
49 7 Шофиркон туман
50 7 Қоракўл туман
51 7 Қоровулбозор туман
52 7 Ғиждувон туман
101 8 Самарқанд шаҳар
102 8 Ургут туман
103 8 Пахтачи туман
104 8 Каттақўрғон туман
105 8 Самарқанд туман
106 8 Булунғур туман
107 8 Жомбой туман
108 8 Қўшробод туман
109 8 Нарпай туман
110 8 Тайлоқ туман
111 8 Пастдарғом туман
112 8 Нуробод туман
113 8 Каттақўрғон шаҳар
114 8 Пайариқ туман
115 8 Оқдарё туман
116 8 Иштихон туман
53 9 Арнасой туман
54 9 Бахмал туман
55 9 Ғаллаорол туман
56 9 Дўстлик туман
57 9 Жиззах шаҳар
58 9 Шароф Рашидов
59 9 Зарбдор туман
60 9 Зафаробод туман
61 9 Зомин туман
62 9 Мирзачўл туман
63 9 Пахтакор туман
64 9 Фориш туман
65 9 Янгиобод туман
80 10 Навоий шаҳар
81 10 Зарафшон шаҳар
82 10 Кармана туман
83 10 Томди тумани
84 10 Навбаҳор туман
85 10 Нурота туман
86 10 Хатирчи туман
87 10 Қизилтепа туман
88 10 Конимех туман
89 10 Учқудуқ туман
8 11 Нукус шаҳар
9 11 Тахиатош тумани
11 11 Амударё туман
12 11 Беруний туман
13 11 Қонликул туман
14 11 Қораузак туман
15 11 Кегейли туман
16 11 Қўнғирот туман
17 11 Муйнақ туман
18 11 Нукус туман
19 11 Тахтакупир туман
20 11 Турткул туман
21 11 Хўжайли туман
22 11 Чимбой туман
23 11 Шуманай туман
24 11 Элликкалъа туман
217 11 Бўзатов тумани
131 12 Гулистон шаҳар
132 12 Янгиер туман
133 12 Ширин туман
134 12 Оқалтин тумани
135 12 Боёвут туман
136 12 Гулистон туман
137 12 Мирзаобод туман
138 12 Сайхунобод туман
139 12 Сардоба туман
140 12 Сирдарё туман
141 12 Ховос туман
117 13 Термиз шаҳар
118 13 Термиз туман
119 13 Музработ туман
120 13 Олтинсой туман
121 13 Денов туман
122 13 Сариосиё туман
123 13 Қизириқ туман
124 13 Жарқўрғон туман
125 13 Ангор туман
126 13 Қумқўрғон туман
127 13 Бойсун туман
128 13 Шўрчи туман
129 13 Шеробод туман
130 13 Узун туман
220 13 Бандихон
1 14 Шахрисабз шаҳар
66 14 Қарши шаҳар
67 14 Қарши туман
68 14 Муборак туман
69 14 Ғузор тумани
70 14 Қамаши туман
71 14 Чироқчи туман
72 14 Шахрисабз туман
73 14 Касби туман
74 14 Косон туман
75 14 Китоб туман
76 14 Нишон туман
77 14 Миришкор туман
78 14 Деҳқонобод туман
79 14 Яккабоғ туман
219 14 Ko'kdala tumani
160 15 Фарғона шаҳар
161 15 Марғилон шаҳар
162 15 Қувасой шаҳар
163 15 Қўқон шаҳар
164 15 Боғдод туман
165 15 Бувайда туман
166 15 Данғара туман
167 15 Ёзёвон туман
168 15 Олтиариқ туман
169 15 Бешариқ туман
170 15 Қўштепа туман
171 15 Риштон туман
172 15 Сўх туман
173 15 Тошлоқ туман
174 15 Учкўприк туман
175 15 Фарғона туман
176 15 Ўзбекистон туман
177 15 Қува туман
178 15 Фурқат туман

Hududlar

id name
2 Andijon viloyati
3 Namangan viloyati
4 Xorazm viloyati
5 Toshkent viloyati
6 Toshkent
7 Buxoro viloyati
8 Samarqand viloyati
9 Jizzax viloyati
10 Navoiy viloyati
11 Qoraqalpog'iston
12 Sirdaryo viloyati
13 Surxondaryo viloyati
14 Qashqadaryo viloyati
15 Farg'ona viloyati

Filiallar

Http request

GET /directory/branches&regionId=<Id>

Parameter Type Description
regionId integer Hudud raqami (Majburiy emas)
curl
--request GET \
--url "http://api.bts.uz:8080/index.php?r=directory/branches&regionId=<Id>" \
--header "Authorization: Bearer <token>"

JSON формат:

{
  {
    "id": 10,
    "name": "KARSHI BTS",
    "regionId": 14,
    "cityId": 66,
    "address": "KARSHI 5-Mikro rayon ul. Nasaf. or: Nikoh uyi orqa tomoni ",
    "lat_long": "38.837395,65.783467",
    "phone": "1230",
    "video_link": "https://youtu.be/g6TsS5PLTF0",
    "working_hours": {
        "1": "08:00-20:00",
        "2": "08:00-20:00",
        "3": "08:00-20:00",
        "4": "08:00-20:00",
        "5": "08:00-20:00",
        "6": "08:00-16:00",
        "7": "08:00-16:00"
    }
  },
}

Filiallar (cityId)

Http request

GET /directory/branches-with-city&cityId=<Id>

Parameter Type Description
cityId integer Shahar raqami (ixtiyoriy)
curl
--request GET \
--url "http://api.bts.uz:8080/index.php?r=directory/branches-with-city&cityId=<Id>" \
--header "Authorization: Bearer <token>"

JSON формат:

{
  {
    "id": 79,
    "name": "MALIKA BOZOR BTS",
    "regionId": 6,
    "cityId": 198,
    "address": "Toshkent, Labzak ko'ch 2/122. Mag 118 or: Tramvay aylanasi",
    "lat_long": "41.338727,69.269875",
    "phone": "1230",
    "video_link": "",
    "working_hours": {
        "1": "09:00-18:00",
        "2": "09:00-18:00",
        "3": "09:00-18:00",
        "4": "09:00-18:00",
        "5": "09:00-18:00",
        "6": "09:00-18:00",
        "7": "09:00-18:00"
    }
  },
  {
    "id": 24,
    "name": "SHAYXONTOHUR BTS",
    "regionId": 6,
    "cityId": 198,
    "address": "TASHKENT, ul. Furkat 6. Mo'ljal: Xadra,Asaka Bankni orqasi",
    "lat_long": "41.319124,69.240262",
    "phone": "1230",
    "video_link": "https://youtu.be/g6TsS5PLTF0",
    "working_hours": {
        "1": "27/7",
        "2": "27/7",
        "3": "27/7",
        "4": "27/7",
        "5": "27/7",
        "6": "27/7",
        "7": "27/7"
    }
  }
}

Yuborish turlari

id name
4 HUJJATLAR
5 ZAPCHASTLAR
6 DORI-DARMONLAR
7 ORGTEXNIKA
8 KITOBLAR
9 SHISHA BUYUMLARI
10 REKLAMA MAHSULOTLARI
11 KIYIM-POYABZALLAR
12 UYALI TELEFON
13 PASSPORT
14 PARFUMERIYA
15 MAHSULOTLAR
16 KIMYOVIY MODDALAR
17 PROTEZLAR (TISH)
18 URUG'LAR
19 PLASTIK KARTA
20 MUHR
21 SANTEXNIKA
22 MEBEL
23 TIBBIY ASBOBLAR
24 MATOLAR
25 USKUNALAR
26 KANSTOVARLAR
27 XO'JALIK MAHSULOTLARI
28 O'YINCHOQLAR
29 BIJUTERIYA
30 KOSMETIKA
31 MAISHIY TEXNIKA
32 QURITILGAN MEVALAR
33 QURILISH MATERIALLARI

Qadoqlash turlari

id name
4 SUMKA
5 KONTEYNER
6 KONVERT
7 QUTI
8 BTS PAKETLAR
9 QADOQSIZ
10 ZAVOD QADOQLASHI

Ha yoki Yo'q

Qiymatlar Tavsiflar
1 Yoqilgan
0 O'chirilgan

Statuslar ro'yxati

id info
0 Rad etilgan
1 Yuboruvchida
2 Kuryer buyurtmani qabul qildi
3 Jo'natuvchining ofisida
4 Yetkazish ofisida
5 Kuryer yetkazmoqda
6 Yetkazib berilgan
7 Qaytarish
8 Tranzit ofisda
10 Saralash markazida
31 Omborda
32 Qopda
33 Transportda
34 RC kuryerka

Fulfillment WMS

Http request

POST /auth

curl \
--request POST \
--url "http://wms.bts:8040/v1/auth/login" \
--header  "accept: "application/json"
--header  "Content-Type: "application/json"
--data '{
    "login": "login",
    "password": "password"
}'

SUCCESS:


  {
    "access_token": "string",
    "refresh_token": "string"
  }
Parameter Type Description
login string foydalanuvchi inn yoki tel raqam, tuldrish shart
password string parolni tuldirish shart

Yetkazib beruvchi yaratish

Http request

POST v1/purveyor/create

curl \
--request POST \
--url "http://wms.bts.uz:8040/v1/purveyor/create" \
--header  "Authorization: "Bearer token"
--header  "accept: "application/json"
--header  "Content-Type: "application/json"
--data '{
    "group": "group",
    "code": "code",
    "name": "name",
    "full_name": "full_name",
    "name_eng": "name_eng",
    "stock_percentage": "stock_percentage",
    "stock_expiry": "stock_expiry",
    "legal_entity": "legal_entity",
    "inn": "inn",
    "kpp": "kpp",
    "okpp": "okpp",
    "is_buyer": "is_buyer",
    "main_delivery_address": "main_delivery_address",
    "depositor": "depositor",
    "contract_number": "contract_number",
    "contract_date": "contract_date",
    "bank_details": "bank_details",
    "contact_info": "contact_info",
    "additional_details": "additional_details",
    "is_supplier": "is_supplier"
}'

SUCCESS:


  {
    "message": "Record successfully created.",
    "data": {
        "id": 14,
        "group": "string",
        "code": "string",
        "name": "string",
        "full_name": "string",
        "name_eng": "string",
        "contractBankDetail": {
            "id": 11,
            "supplier_buyer_id": 14,
            "contract_number": "string",
            "contract_date": "2024-11-11",
            "bank_details": "string",
            "contact_info": "string",
            "additional_details": "string",
            "main_delivery_address": "string"
        },
        "entityType": {
            "id": 11,
            "stock_percentage": "0.00",
            "stock_expiry": 0,
            "supplier_buyer_id": 14,
            "legal_entity": true
        },
        "supplierBuyerStatus": {
            "id": 11,
            "supplier_buyer_id": 14,
            "is_supplier": true,
            "is_buyer": true,
            "depositor": true
        },
        "taxInfo": {
            "id": 11,
            "supplier_buyer_id": 14,
            "inn": "string",
            "kpp": "string",
            "okpo": "string"
        },
        "_links": {
            "self": {
                "href": "http:/wms.bts.uz:8040/v1/purveyor/view?id=14"
            }
        }
    }
}
Parameter Type Description
group string Mahsulot guruhi tuldirish shart
code string Mahsulot kodi tuldirish shart
name string Mahsulot nomi tuldirish shart
full_name string Mahsulotning to'liq nomi tuldirish shart
name_eng string Inglizcha nom (mahsulotning ingliz tilidagi nomi)
stock_percentage string Yaroqlilik zaxirasi foizi
stock_expiry string Yaroqlilik muddati
legal_entity boolean Yuridik/jismoniy shaxs (Да/Нет)
inn integer Soliq to'lovchining identifikatsiya raqami
kpp integer Kompaniya ro'yxatidan o'tgan kod
okpp integer Yetkazib beruvchi
is_buyer boolean Xaridor (Да/Нет)
main_delivery_address string Asosiy yetkazib berish manzili
depositor boolean Omborchi (mahsulot uchun javobgar omborchi)
contract_number integer Shartnoma raqami
contract_date string Shartnoma sanasi
bank_details string Bank rekvizitlari
contact_info string Aloqa ma'lumotlari
additional_details string Qo'shimcha rekvizitlar
is_supplier boolean Yetkazib beruvchi (Да/Нет)

Yetkazib beruvchi ro'yxat

Http request

GET v1/purveyor/clients

curl \
--request GET \
--url "http://wms.bts.uz:8040/v1/purveyor/clients" \
--header  "Authorization: "Bearer token"
--header  "accept: "application/json"
--header  "Content-Type: "application/json"

SUCCESS:


  {
    "message": "Data successfully retrieved.",
    "data": {
        "items": [
            {
                "id": 12,
                "group": "string",
                "code": "string",
                "name": "string",
                "full_name": "string",
                "name_eng": "string",
                "contractBankDetail": {
                    "id": 9,
                    "supplier_buyer_id": 12,
                    "contract_number": "string",
                    "contract_date": "2024-10-10",
                    "bank_details": "string",
                    "contact_info": "string",
                    "additional_details": "string",
                    "main_delivery_address": "string"
                },
                "entityType": {
                    "id": 9,
                    "stock_percentage": "20.00",
                    "stock_expiry": 0,
                    "supplier_buyer_id": 12,
                    "legal_entity": true
                },
                "supplierBuyerStatus": {
                    "id": 9,
                    "supplier_buyer_id": 12,
                    "is_supplier": true,
                    "is_buyer": true,
                    "depositor": true
                },
                "taxInfo": {
                    "id": 9,
                    "supplier_buyer_id": 12,
                    "inn": "string",
                    "kpp": "string",
                    "okpo": "string"
                },
                "_links": {
                    "self": {
                        "href": "http://wms.bts.uz:8040/v1/purveyor/view?id=12"
                    }
                }
            }
        ],
        "_links": {
            "self": "/v1/purveyor/clients?page=1",
            "first": "/v1/purveyor/clients?page=1",
            "last": "/v1/purveyor/clients?page=1"
        },
        "_meta": {
            "totalCount": 11,
            "pageCount": 1,
            "currentPage": 1,
            "perPage": 20
        }
    }
}
Parameter Type Description
group string Mahsulot guruhi
code string Mahsulot kodi
name string Mahsulot nomi
full_name string Mahsulotning to'liq nomi
name_eng string Inglizcha nom (mahsulotning ingliz tilidagi nomi)
stock_percentage string Yaroqlilik zaxirasi foizi
stock_expiry string Yaroqlilik muddati
legal_entity boolean Yuridik/jismoniy shaxs (Да/Нет)
inn integer Soliq to'lovchining identifikatsiya raqami
kpp integer Kompaniya ro'yxatidan o'tgan kod
okpp integer Yetkazib beruvchi
is_buyer boolean Xaridor (Да/Нет)
main_delivery_address string Asosiy yetkazib berish manzili
depositor boolean Omborchi (mahsulot uchun javobgar omborchi)
contract_number integer Shartnoma raqami
contract_date string Shartnoma sanasi
bank_details string Bank rekvizitlari
contact_info string Aloqa ma'lumotlari
additional_details string Qo'shimcha rekvizitlar
is_supplier boolean Yetkazib beruvchi (Да/Нет)

Yetkazib beruvchi statusini yangilash

Http request

POST v1/purveyor/client-status

curl \
--request POST \
--url "http://wms.bts.uz:8040/v1/purveyor/client-status" \
--header  "Authorization\: "Bearer token"
--header  "accept\: "application/json"
--header  "Content-Type\: "application/json"
--data '{
    "status" => [
                  {"id": 1,"status": "ok"},
                  {"id": 2,"status": "ok"}
       ]
}'

SUCCESS:


{
  "message": "supplier-buyers successfully updated to delivered status"
}
  
Parameter Type Description
status array Bazangizga muvaffaqiyatli saqlangan purveyor IDlarini OK statusi bilan yuborishingiz kerak bo'ladi.

Mahsulot yaratish

Http request

POST v1/product/create

curl \
--request POST \
--url "http://wms.bts.uz:8040/v1/product/create" \
--header  "Authorization: "Bearer token"
--header  "accept: "application/json"
--header  "Content-Type: "application/json"
--data '{
    "group": "group",
    "code": "code",
    "name": "name",
    "full_name": "full_name",
    "gtin": "gtin",
    "article": "article",
    "nomenclature_type": "nomenclature_type",
    "shelf_life_stock": "shelf_life_stock",
    "abc_class": "abc_class",
    "kis_code": "kis_code",
    "comment": "comment",
    "is_set": "is_set",
    "weight": "weight",
    "net_weight": "net_weight",
    "min_shelf_life_stock": "min_shelf_life_stock",
    "name_eng": "name_eng",
    "tsd_name": "tsd_name",
    "volume": "volume",
    "net_volume": "net_volume",
    "shelf_life_deviation_days": "shelf_life_deviation_days",
    "min_shelf_life_period": "min_shelf_life_period",
    "shelf_life_deviation_period": "shelf_life_deviation_period",
    "depositor": "depositor",
    "seasonal_abc_coefficient": "seasonal_abc_coefficient",
    "specification": "specification",
    "storage_period_days": "storage_period_days",
    "default_status": "default_status",
    "temperature_mode": "temperature_mode",
    "base_packaging": "base_packaging",
    "billing_packaging": "billing_packaging",
    "report_packaging": "report_packaging",
    "unit": "unit"
}'

SUCCESS:


  {
    "message": "Record successfully created.",
    "data": {
        "id": 34,
        "supplier_buyer_id": 5,
        "group": "string",
        "code": "12345",
        "name": "string",
        "full_name": "string",
        "gtin": "1234",
        "article": "string",
        "nomenclature_type": "string",
        "unit": "string",
        "comment": "string",
        "productPackagin": {
            "id": 5,
            "product_id": 34,
            "base_packaging": "string",
            "billing_packaging": "string",
            "report_packaging": "string"
        },
        "productShelfLive": {
            "id": 8,
            "product_id": 34,
            "shelf_life_stock": "40.00",
            "min_shelf_life_stock": "33.00",
            "shelf_life_deviation_days": 0,
            "shelf_life_period": 0,
            "min_shelf_life_period": 0,
            "shelf_life_deviation_period": 0,
            "storage_period_days": 0,
            "specification": "string",
            "temperature_mode": "string"
        },
        "productTechnical": {
            "id": 15,
            "product_id": 34,
            "weight": "20.000",
            "net_weight": "50.000",
            "volume": "30.000",
            "net_volume": "60.000",
            "is_set": true,
            "kis_code": "string",
            "default_status": "string"
        },
        "_links": {
            "self": {
                "href": "http:/wms.bts.uz:8040:/v1/product/view?id=34"
            }
        }
    }
}
Parameter Type Description
group string Mahsulot guruhi tuldirish shart
code string Mahsulot kodi tuldirish shart
name string Mahsulot nomi tuldirish shart
full_name string Mahsulotning to'liq nomi tuldirish shart
gtin integer GTIN (Global Trade Item Number - xalqaro savdo birligi raqami) tuldirish shart
article string Mahsulot artikuli (artikul raqami) tuldirish shart
nomenclature_type string Nomenklatura turi (mahsulotning turi) tuldirish shart
shelf_life_stock integer Yaroqlilik zaxirasi (mahsulotning maksimal saqlash muddati) tuldirish shart
abc_class string ABC sinfi (ABC tahlili bo'yicha mahsulot klassifikatsiyasi)
kis_code string KIS kodi (Kompyuter axborot tizimi kodi) tuldirish shart
comment string Izoh (qo'shimcha izoh yoki sharh)
is_set boolean To'plam (komplektmi yoki yo'qmi) 1 yoki 0 tuldirish shart
weight integer Og'irlik (mahsulotning og'irligi) tuldirish shart
net_weight integer Netto og'irlik (qadoqdagi sof og'irlik) tuldirish shart
min_shelf_life_stock string Minimal yaroqlilik zaxirasi (qabul qilish paytidagi minimal saqlash muddati)
name_eng string Inglizcha nom (mahsulotning ingliz tilidagi nomi)
tsd_name string TSD nomi (terminal yoki skanerlarda ishlatiladigan nom)
volume integer Hajm (mahsulot hajmi) tuldirish shart
net_volume integer Netto hajm (qadoqdagi sof hajm) tuldirish shart
shelf_life_deviation_days string Yaroqlilik muddatining chetlashishi kunlarda (maximal og'ish)
min_shelf_life_period integer Minimal yaroqlilik zaxirasi muddati (qabul qilish paytidagi minimal yaroqlilik muddati)
shelf_life_deviation_period string Yaroqlilik muddatining chetlashishi davri (maksimal og'ish davri)
depositor string Omborchi (mahsulot uchun javobgar omborchi)
seasonal_abc_coefficient integer Mavsumiy ABC koeffitsienti (mavsumiy mahsulotlarning ABC tahlili bo'yicha koeffitsienti)
specification string Spetsifikatsiya (mahsulot tavsifi yoki texnik talablari) tuldirish shart
storage_period_days string Saqlash muddati kunlarda (mahsulotning maksimal saqlash muddati)
default_status string Sukut bo'yicha status (mahsulotning boshlang'ich holati)
temperature_mode string Harorat rejimi (mahsulotni saqlash harorati) tuldirish shart
base_packaging string Asosiy o'ram (mahsulotning asosiy qadoqlanishi) tuldirish shart
billing_packaging string Billing uchun o'ram (billing jarayonida foydalaniladigan o'ram)
report_packaging string Hisobot uchun o'ram (hisobotlar uchun ishlatiladigan o'ram)
unit integer O'lchov birligi (masalan, kg, dona, litr) tuldirish shart

Mahsulot ro'yxat

Http request

GET v1/product/clients

curl \
--request GET \
--url "http://wms.bts.uz:8040/v1/product/clients" \
--header  "Authorization: "Bearer token"
--header  "accept: "application/json"
--header  "Content-Type: "application/json"

SUCCESS:


  {
    "message": "Data successfully retrieved.",
    "data": {
        "items": [
            {
                "id": 39,
                "supplier_buyer_id": 5,
                "group": "stringcceee",
                "code": "stringcccee",
                "name": "stringcceee",
                "full_name": "string",
                "gtin": "112",
                "article": "string",
                "nomenclature_type": "11",
                "unit": "22",
                "comment": "string",
                "productPackagin": {
                    "id": 7,
                    "product_id": 39,
                    "base_packaging": "string",
                    "billing_packaging": "string",
                    "report_packaging": "string"
                },
                "productShelfLive": {
                    "id": 10,
                    "product_id": 39,
                    "shelf_life_stock": "22.00",
                    "min_shelf_life_stock": "0.00",
                    "shelf_life_deviation_days": 2,
                    "shelf_life_period": 2,
                    "min_shelf_life_period": 2,
                    "shelf_life_deviation_period": 2,
                    "storage_period_days": 2,
                    "specification": "string",
                    "temperature_mode": "string"
                },
                "productTechnical": {
                    "id": 18,
                    "product_id": 39,
                    "weight": "88.000",
                    "net_weight": "55.000",
                    "volume": "77.000",
                    "net_volume": "44.000",
                    "is_set": true,
                    "kis_code": "99",
                    "default_status": "string"
                },
                "_links": {
                    "self": {
                        "href": "http://wms.bts.uz:8040/v1/product/view?id=39"
                    }
                }
            }
        ],
        "_links": {
            "self": "/v1/product/clients?page=1",
            "first": "/v1/product/clients?page=1",
            "last": "/v1/product/clients?page=1"
        },
        "_meta": {
            "totalCount": 3,
            "pageCount": 1,
            "currentPage": 1,
            "perPage": 20
        }
    }
}
Parameter Type Description
group string Mahsulot guruhi
code string Mahsulot kodi
name string Mahsulot nomi
full_name string Mahsulotning to'liq nomi
gtin integer GTIN (Global Trade Item Number - xalqaro savdo birligi raqami)
article string Mahsulot artikuli (artikul raqami)
nomenclature_type string Nomenklatura turi (mahsulotning turi)
shelf_life_stock integer Yaroqlilik zaxirasi (mahsulotning maksimal saqlash muddati)
abc_class string ABC sinfi (ABC tahlili bo'yicha mahsulot klassifikatsiyasi)
kis_code string KIS kodi (Kompyuter axborot tizimi kodi)
comment string Izoh (qo'shimcha izoh yoki sharh)
is_set boolean To'plam (komplektmi yoki yo'qmi) 1 yoki 0
weight integer Og'irlik (mahsulotning og'irligi)
net_weight integer Netto og'irlik (qadoqdagi sof og'irlik)
min_shelf_life_stock string Minimal yaroqlilik zaxirasi (qabul qilish paytidagi minimal saqlash muddati)
name_eng string Inglizcha nom (mahsulotning ingliz tilidagi nomi)
tsd_name string TSD nomi (terminal yoki skanerlarda ishlatiladigan nom)
volume integer Hajm (mahsulot hajmi)
net_volume integer Netto hajm (qadoqdagi sof hajm)
shelf_life_deviation_days string Yaroqlilik muddatining chetlashishi kunlarda (maximal og'ish)
min_shelf_life_period integer Minimal yaroqlilik zaxirasi muddati (qabul qilish paytidagi minimal yaroqlilik muddati)
shelf_life_deviation_period string Yaroqlilik muddatining chetlashishi davri (maksimal og'ish davri)
depositor string Omborchi (mahsulot uchun javobgar omborchi)
seasonal_abc_coefficient integer Mavsumiy ABC koeffitsienti (mavsumiy mahsulotlarning ABC tahlili bo'yicha koeffitsienti)
specification string Spetsifikatsiya (mahsulot tavsifi yoki texnik talablari)
storage_period_days string Saqlash muddati kunlarda (mahsulotning maksimal saqlash muddati)
default_status string Sukut bo'yicha status (mahsulotning boshlang'ich holati)
temperature_mode string Harorat rejimi (mahsulotni saqlash harorati)
base_packaging string Asosiy o'ram (mahsulotning asosiy qadoqlanishi)
billing_packaging string Billing uchun o'ram (billing jarayonida foydalaniladigan o'ram)
report_packaging string Hisobot uchun o'ram (hisobotlar uchun ishlatiladigan o'ram)
unit integer O'lchov birligi (masalan, kg, dona, litr)

Qabul qilinishi kerak bo'lgan mahsulotlar statusini yangilash

Http request

POST v1/product/client-status

curl \
--request POST \
--url "http://wms.bts.uz:8040/v1/product/client-status" \
--header  "Authorization\: "Bearer token"
--header  "accept\: "application/json"
--header  "Content-Type\: "application/json"
--data '{
    "status" => [
                  {"id": 1,"status": "ok"},
                  {"id": 2,"status": "ok"}
       ]
}'

SUCCESS:


{
  "message": "products successfully updated to delivered status"
}
  
Parameter Type Description
status array Bazangizga muvaffaqiyatli saqlangan product IDlarini OK statusi bilan yuborishingiz kerak bo'ladi.

Tovarlarni qabul qilish

Http request

POST v1/receiving-goods/create

curl \
--request POST \
--url "http://wms.bts.uz:8040/v1/receiving-goods/create" \
--header  "Authorization: "Bearer token"
--header  "accept: "application/json"
--header  "Content-Type: "application/json"
--data '{
    "number": "number",
    "date": "date",
    "counterparty": "counterparty",
    "arrival_date": "arrival_date",
    "comment": "comment",
    "vehicle_model": "vehicle_model",
    "vehicle_number": "vehicle_number",
    "driver_name": "driver_name",
    "driver_document": "driver_document",
    "contract_number": "contract_number",
    "contract_date": "contract_date",
    "nomenclature": "nomenclature",
    "quantity": "quantity",
    "price": "price",
    "total_amount": "total_amount",
    "kis_number": "kis_number",
    "kis_date": "kis_date",
    "accept_by_places": "accept_by_places",
    "vehicle_type": "vehicle_type",
    "vat_rate": "vat_rate",
    "vat_amount": "vat_amount",
    "price_includes_vat": "price_includes_vat",
    "discount_amount": "discount_amount",
    "under_delivery_percent": "under_delivery_percent",
    "over_delivery_percent": "over_delivery_percent",
    "nomenclature_package": "nomenclature_package",
    "package_quantity": "package_quantity"
}'

SUCCESS:


  {
    "message": "Record successfully created.",
    "data": {
        "id": 11,
        "number": "string",
        "date": "2024-11-11",
        "counterparty": "string",
        "arrival_date": "2024-11-11",
        "comment": "string",
        "vehicle_model": "string",
        "vehicle_number": "string",
        "driver_name": "string",
        "driver_document": "string",
        "contract_number": "string",
        "contract_date": "2024-11-11",
        "acceptance_gate": null,
        "nomenclature": "string",
        "quantity": 11,
        "price": "44.00",
        "total_amount": "55.00",
        "supplierDetail": {
            "id": 8,
            "supplier_id": 11,
            "kis_number": null,
            "kis_date": "2024-11-11",
            "accept_by_places": true,
            "vehicle_type": null,
            "vat_rate": "444.00",
            "vat_amount": "66.00",
            "price_includes_vat": true,
            "discount_amount": "44.00",
            "under_delivery_percent": "20.00",
            "over_delivery_percent": "30.00"
        },
        "supplierPackage": {
            "id": 2,
            "supplier_id": 11,
            "nomenclature_package": "string",
            "package_quantity": 0
        },
        "_links": {
            "self": {
                "href": "http:/wms.bts.uz:8040/v1/receiving-goods/view?id=11"
            }
        }
    }
}
Parameter Type Description
number integer Yetkazib berish raqami tuldirish shart
date string Yetkazib berish sanasi tuldirish shart
counterparty string Kontragent (yukni yetkazib beruvchi tashkilot) tuldirish shart
arrival_date string Yuk qabul qilingan sana
comment string Izoh (qo'shimcha izoh yoki sharh)
vehicle_model string Transport vositasining modeli
vehicle_number integer Transport vositasining davlat raqami
driver_name string Haydovchining to'liq ismi
driver_document string Haydovchiga tegishli hujjat (pasport, litsenziya va h.k.)
contract_number integer Shartnoma raqami
contract_date string Shartnoma sanasi
nomenclature string Nomenklatura (yukning turi yoki mahsulotlar ro‘yxati) tuldirish shart
quantity integer Mahsulot miqdori tuldirish shart
price integer Mahsulotning bir dona yoki birlik narxi tuldirish shart
total_amount integer Jami summa (narx * miqdor) tuldirish shart
kis_number integer KIS tizimidagi buyurtma raqami
kis_date string KIS tizimida buyurtma kiritilgan sana
accept_by_places boolean Yuk joylari bo‘yicha qabul qilish (true/false)
vehicle_type string Transport vositasi turi (masalan, yuk mashinasi, avtobus)
vat_rate integer QQS stavkasi (foizda)
vat_amount integer QQS summasi
price_includes_vat boolean Narxga QQS kiritilganmi (true/false)
discount_amount integer Chegirma summasi
under_delivery_percent integer Yetkazib berilmagan mahsulot foizi
over_delivery_percent integer Ortiqcha yetkazib berilgan mahsulot foizi
nomenclature_package string Nomenklatura qadoqlanishi turi
package_quantity integer Qadoqlar soni

Qabul qilinishi kerak bo'lgan tovar ro'yxati

Http request

GET v1/receiving-goods/clients

curl \
--request GET \
--url "http://wms.bts.uz:8040/v1/receiving-goods/clients" \
--header  "Authorization: "Bearer token"
--header  "accept: "application/json"
--header  "Content-Type: "application/json"

SUCCESS:


  {
    "message": "Data successfully retrieved.",
    "data": {
        "items": [
            {
                "id": 10,
                "number": "string",
                "date": "2024-11-11",
                "counterparty": "string",
                "arrival_date": "2024-11-11",
                "comment": "string",
                "vehicle_model": "string",
                "vehicle_number": "string",
                "driver_name": "string",
                "driver_document": "string",
                "contract_number": "string",
                "contract_date": "2024-11-11",
                "acceptance_gate": null,
                "nomenclature": "string",
                "quantity": 20,
                "price": "200.00",
                "total_amount": "2000.00",
                "supplierDetail": {
                    "id": 7,
                    "supplier_id": 10,
                    "kis_number": null,
                    "kis_date": "2024-11-11",
                    "accept_by_places": true,
                    "vehicle_type": null,
                    "vat_rate": "20.00",
                    "vat_amount": "30.00",
                    "price_includes_vat": true,
                    "discount_amount": "40.00",
                    "under_delivery_percent": "25.00",
                    "over_delivery_percent": "50.00"
                },
                "supplierPackage": {
                    "id": 1,
                    "supplier_id": 10,
                    "nomenclature_package": "string11",
                    "package_quantity": 0
                },
                "_links": {
                    "self": {
                        "href": "http://wms.bts.uz:8040/v1/receiving-goods/view?id=10"
                    }
                }
            }
        ],
        "_links": {
            "self": "/v1/receiving-goods/clients?page=1",
            "first": "/v1/receiving-goods/clients?page=1",
            "last": "/v1/receiving-goods/clients?page=1"
        },
        "_meta": {
            "totalCount": 2,
            "pageCount": 1,
            "currentPage": 1,
            "perPage": 20
        }
    }
}
Parameter Type Description
number integer Yetkazib berish raqami
date string Yetkazib berish sanasi
counterparty string Kontragent (yukni yetkazib beruvchi tashkilot)
arrival_date string Yuk qabul qilingan sana
comment string Izoh (qo'shimcha izoh yoki sharh)
vehicle_model string Transport vositasining modeli
vehicle_number integer Transport vositasining davlat raqami
driver_name string Haydovchining to'liq ismi
driver_document string Haydovchiga tegishli hujjat (pasport, litsenziya va h.k.)
contract_number integer Shartnoma raqami
contract_date string Shartnoma sanasi
nomenclature string Nomenklatura (yukning turi yoki mahsulotlar ro‘yxati)
quantity integer Mahsulot miqdori
price integer Mahsulotning bir dona yoki birlik narxi
total_amount integer Jami summa (narx * miqdor)
kis_number integer KIS tizimidagi buyurtma raqami
kis_date string KIS tizimida buyurtma kiritilgan sana
accept_by_places boolean Yuk joylari bo‘yicha qabul qilish (true/false)
vehicle_type string Transport vositasi turi (masalan, yuk mashinasi, avtobus)
vat_rate integer QQS stavkasi (foizda)
vat_amount integer QQS summasi
price_includes_vat boolean Narxga QQS kiritilganmi (true/false)
discount_amount integer Chegirma summasi
under_delivery_percent integer Yetkazib berilmagan mahsulot foizi
over_delivery_percent integer Ortiqcha yetkazib berilgan mahsulot foizi
nomenclature_package string Nomenklatura qadoqlanishi turi
package_quantity integer Qadoqlar soni

Qabul qilinishi kerak bo'lgan tovarlar statusini yangilash

Http request

POST v1/receiving-goods/client-status

curl \
--request POST \
--url "http://wms.bts.uz:8040/v1/receiving-goods/client-status" \
--header  "Authorization\: "Bearer token"
--header  "accept\: "application/json"
--header  "Content-Type\: "application/json"
--data '{
    "status" => [
                  {"id": 1,"status": "ok"},
                  {"id": 2,"status": "ok"}
       ]
}'

SUCCESS:


{
  "message": "supplier successfully updated to delivered status"
}
  
Parameter Type Description
status array Bazangizga muvaffaqiyatli saqlangan receiving_goods IDlarini OK statusi bilan yuborishingiz kerak bo'ladi.

Xatoliklar

Xatolik kodi Ma'nosi
400 Bad Request -- Your request sucks
401 Unauthorized -- Your API key is wrong
403 Forbidden -- The kitten requested is hidden for administrators only
404 Not Found -- The specified kitten could not be found
405 Method Not Allowed -- You tried to access a kitten with an invalid method
406 Not Acceptable -- You requested a format that isn't json
410 Gone -- The kitten requested has been removed from our servers
429 Too Many Requests -- You're requesting too many kittens! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarially offline for maintanance. Please try again later.