BTS API Hujjatlari
Buyurtmani tahrirlash

Buyurtmani tahrirlash

POST /v1/order/edit?orderId=<orderId>

Ushbu method orqali tizimdagi mavjud buyurtma ma’lumotlarini tahrirlash amalga oshiriladi.

Mijoz buyurtma identifikatori (order ID) orqali mavjud buyurtmani topadi va mahsulotlar, jo‘natuvchi yoki qabul qiluvchi ma’lumotlari hamda yetkazib berish parametrlarini yangilashi mumkin. Shuningdek, buyurtmaning topshirish va qabul qilish usullari ham o‘zgartirilishi mumkin:

Buyurtmani topshirish turi (pickup_type):

  • self — mijoz buyurtmani o‘zi ofis (filial) ga olib kelib topshiradi

  • courier — kuryer buyurtmani mijoz qo‘lidan olib ketadi

Buyurtmani qabul qilish turi (dropoff_type):

  • courier — buyurtma qabul qiluvchining manziliga kuryer orqali yetkazib beriladi

  • branch — qabul qiluvchi buyurtmani o‘zi ofis (filial) dan olib ketadi

Agar yuborilgan ma’lumotlar to‘g‘ri bo‘lsa, buyurtma muvaffaqiyatli yangilanadi va tizim yangilangan holatni qaytaradi.

Agar majburiy maydonlar to‘ldirilmagan yoki noto‘g‘ri qiymatlar yuborilgan bo‘lsa, tizim xatolik sababini ko‘rsatgan holda javob qaytaradi.

API Server https://apitest.bts.uz:28345/
Base Path /v1/order/edit?orderId=<orderId>
Full URL
https://apitest.bts.uz:28345/v1/order/edit?orderId=<orderId>
Authentication Bearer Token
Headers
Header
Value
Req.
Authorization
Bearer {token}
🔒
Content-Type
application/json
🔒
Accept
application/json
🔒
language
uz
🔒

REQUEST

{
    "clientId": "abc123mn12",
    "wcs_code": "900001",
    "pickup_type": "courier",
    "dropoff_type": "courier",
    "is_sender_location": true,
    "is_receiver_location": true,
    "sender": {
        "name": "Jurabek Turdiyevv",
        "phone": "+998991234560",
        "address": "Toshkent sh., Bobur ko‘chasi, 5-A",
        "latitude": "41.311081",
        "longitude": "69.240562",
        "city_code": "0101",
        "branch_code": "0101"
    },
    "receiver": {
        "name": "Odil Ahkmedov",
        "phone": "+998991234567",
        "phone1": "+998901096560",
        "address": "Gozovo qish. 41 uy",
        "latitude": "41.354213",
        "longitude": "69.198745",
        "city_code": "0101",
        "branch_code": "0101"
    },
    "bringBackMoney": 1,
    "back_money": 10000,
    "takePhoto": 1,
    "bringBackWaybill": 1,
    "cargo": {
        "weight": 3,
        "volume": 0,
        "piece": 2,
        "packageId": 4,
        "postTypeId": 26,
        "postTypes": [
            {
                "name": "Kitob",
                "code": "ZFD21AD",
                "count": 1,
                "cost": 10000
            },
            {
                "name": "Daftar",
                "code": "AV2321",
                "count": 2,
                "cost": 20000
            }
        ],
        "options": [
            {
                "optionId": 2,
                "goods": [
                    {
                        "mxikGoodsId": 71,
                        "amount": 1,
                        "goodPrice": 700000
                    },
                    {
                        "mxikGoodsId": 72,
                        "amount": 1,
                        "goodPrice": 100000
                    }
                ]
            }
        ]
    },
    "ready_to_take": true
}
Field Type Description
clientId string Mijoz identifikatori
wcs_code string wcs kodi
pickup_type * string Olib ketish turi
dropoff_type string Tushirish turi
is_sender_location boolean Yuboruvchining joylashuvi
is_receiver_location boolean Qabul qiluvchi joylashuvi
sender[name] * string Yuboruvchining ismi
sender[phone] * string Yuboruvchi telefon raqami
sender[address] * string Jo'natuvchining manzili
sender[latitude] string Jonatuvchi latitudi
sender[longitude] string Jo'natuvchi longitudi
sender[city_code] string Yuboruvchi shahar kodi
sender[branch_code] string Jo'natuvchi filialining kodi
receiver[name] * string Qabul qiluvchining ismi
receiver[phone] * string Qabul qiluvchining telefon raqami
receiver[phone1] string Qabul qiluvchining telefon raqami (qo'shimcha)
receiver[address] * string Qabul qiluvchining manzili
receiver[latitude] string Qabul qiluvchi latitudi
receiver[longitude] string Qabul qiluvchi longitudi
receiver[city_code] string Qabul qiluvchining shahar kodi
receiver[branch_code] string Qabul qiluvchi filial kodi
bringBackMoney integer Maxsulotning Pulni Qaytarish (COD)
back_money string Qaytarilgan Pul Miqdori
takePhoto integer Suratga olish
bringBackWaybill integer Qaytarilgan yo'l varaqasi
cargo[weight] * float Yuk og'irligi
cargo[volume] float Yuk hajmi
cargo[piece] * integer Yuk soni
cargo[packageId] integer Yuk paketi identifikatori
cargo[postTypeId] integer Yuk pochtasi turi identifikatori
cargo[postTypes][name] string Yuk pochtasi turi nomi
cargo[postTypes][code] string Yuk pochtasi turlari kodi
cargo[postTypes][count] integer Yuk postlari turlari soni
cargo[postTypes][cost] float Yuk pochtasi turlari narxi
cargo[options][optionId] integer Yuk tashish opsiyasi identifikatori
cargo[options][goods][mxikGoodsId] integer Yuk tashish imkoniyatlari tovarlari mxikGoods identifikatori
cargo[options][goods][amount] integer Yuk tovarlari miqdori
cargo[options][goods][goodPrice] float Yuk mollari narxi
ready_to_take boolean Qabul qilishga tayyor

RESPONSE

HTTP 200
Response Body
{
    "status": true,
    "message": "success.updated",
    "status_code": 200,
    "data": {
        "orderId": 4293644,
        "clientId": "abc123mn12",
        "wcs_code": "900001",
        "barcode": "019914293644",
        "customer": {
            "id": 123,
            "name": "ООО BTS EXPRESS"
        },
        "status": {
            "code": '0101',
            "info": "У отправителя (У ОТПРАВИТЕЛЯ)"
        },
        "pickup_type": "courier",
        "dropoff_type": "courier",
        "sender": {
            "name": null,
            "phone": "+998991234560",
            "address": "Toshkent sh., Bobur ko‘chasi, 5-A",
            "region": {
                "id": 6,
                "name": "город Ташкент",
                "code": "0101"
            },
            "city": {
                "id": 195,
                "name": "Учтепа тумани",
                "code": '0101'
            },
            "village": null,
            "branch": {
                "id": 3,
                "name": "YAKKASAROY",
                "code": null
            },
            "latitude": "41.311081",
            "longitude": "69.240562"
        },
        "receiver": {
            "name": "Odil Ahkmedov",
            "phone": "+998991234567",
            "phone1": "+998901096560",
            "address": "Gozovo qish. 41 uy",
            "region": {
                "id": 6,
                "name": "город Ташкент",
                "code": "01"
            },
            "city": {
                "id": 195,
                "name": "Учтепа тумани",
                "code": null
            },
            "village": null,
            "branch": {
                "id": 3,
                "name": "YAKKASAROY",
                "code": null
            },
            "latitude": "41.354213",
            "longitude": "69.198745",
            "stickerData": {
                "hubName": "Тошкент шахри   01",
                "cityName": "Uchtepa tumani",
                "branchName": "0101 - YAKKASAROY <b> (Д-КА)</b>",
                "zonaId": 26
            }
        },
        "cargo": {
            "weight": "3.000",
            "volume": "0.000",
            "piece": 2,
            "package": {
                "id": 4,
                "name": "СУМКА"
            },
            "postType": {
                "id": 26,
                "name": "KANTSELYARIYA TOVARLARI"
            },
            "postTypes": [
                {
                    "child_id": 58,
                    "barcode": "019914293644001",
                    "packageId": 0,
                    "weight": 0,
                    "name": "Kitob",
                    "code": "ZFD21AD",
                    "count": 1,
                    "cost": "10000.00"
                },
                {
                    "child_id": 59,
                    "barcode": "019914293644002",
                    "packageId": 0,
                    "weight": 0,
                    "name": "Daftar",
                    "code": "AV2321",
                    "count": 2,
                    "cost": "20000.00"
                },
                {
                    "child_id": 60,
                    "barcode": "019914293644001",
                    "packageId": 0,
                    "weight": 0,
                    "name": "Kitob",
                    "code": "ZFD21AD",
                    "count": 1,
                    "cost": "10000.00"
                },
                {
                    "child_id": 61,
                    "barcode": "019914293644002",
                    "packageId": 0,
                    "weight": 0,
                    "name": "Daftar",
                    "code": "AV2321",
                    "count": 2,
                    "cost": "20000.00"
                },
                {
                    "child_id": 64,
                    "barcode": "019914293644001",
                    "packageId": 0,
                    "weight": 0,
                    "name": "Kitob",
                    "code": "ZFD21AD",
                    "count": 1,
                    "cost": "10000.00"
                },
                {
                    "child_id": 65,
                    "barcode": "019914293644002",
                    "packageId": 0,
                    "weight": 0,
                    "name": "Daftar",
                    "code": "AV2321",
                    "count": 2,
                    "cost": "20000.00"
                }
            ],
            "options": {
                "with_unired": null,
                "urgent": 0,
                "takePhoto": 1,
                "bringBackWaybill": 1,
                "bringBackMoney": 1,
                "back_money": "10000"
            }
        },
        "cost": "227000.00",
        "senderDate": "2026-01-06",
        "receiverDate": "2026-01-06",
        "declarations": [],
        "goods": [],
        "inn": null,
        "ready_to_take": true,
        "tracking": "https://bts.uz/uz/waybill-tracking?term=eyJ3YXliaWxsX2lkIjo0MjkzNjQ0LCJiYXJjb2RlIjoiMDE5OTE0MjkzNjQ0IiwiaXNfcmVjZWl2ZXIiOm51bGx9"
    }
}
Field Type Description
status boolean Holat
message string Xabar
status_code string Kod Holati
orderId integer Buyurtma identifikatori
clientId integer Mijoz identifikatori
wcs_code string wcs kodi
barcode string Shtrix-kod
customer[id] integer Mijoz identifikatori
customer[name] string Mijoz nomi
status[code] string Kod Holati
status[info] string Holat haqida ma'lumot
pickup_type string Olib ketish turi
dropoff_type string Tashlab ketish turi
sender[name] string Yuboruvchining ismi
sender[phone] string Jo'natuvchining telefon raqami
sender[address] string Jo'natuvchining manzili
sender[region][id] integer Yuboruvchi mintaqasi identifikatori
sender[region][name] string Yuboruvchi mintaqasi nomi
sender[region][code] string Jo'natuvchining mintaqa kodi
sender[city][id] integer Yuboruvchi shahar identifikatori
sender[city][name] string Yuboruvchi shahar nomi
sender[city][code] string Yuboruvchi shahar kodi
sender[village] string Jo'natuvchi qishlog'i
sender[branch][id] integer Jo'natuvchi filiali identifikatori
sender[branch][name] string Jo'natuvchi filialining nomi
sender[branch][code] string Jo'natuvchi filialining kodi
sender[latitude] string Yuboruvchi latitudi
sender[longitude] string Yuboruvchi longitudi
receiver[name] string Qabul qiluvchining ismi
receiver[phone] string Qabul qiluvchining telefon raqami
receiver[phone1] string Qabul qiluvchining telefon raqami (qo'shimcha)
receiver[address] string Qabul qiluvchining manzili
receiver[region][id] integer Qabul qiluvchi mintaqa identifikatori
receiver[region][name] string Qabul qiluvchi mintaqa nomi
receiver[region][code] string Qabul qiluvchining mintaqaviy kodi
receiver[city][id] integer Qabul qiluvchi shahar identifikatori
receiver[city][name] string Qabul qiluvchi shahar nomi
receiver[city][code] string Qabul qiluvchining shahar kodi
receiver[village] string Qabul qiluvchi qishlog'i
receiver[branch][id] integer Qabul qiluvchi filial identifikatori
receiver[branch][name] string Qabul qiluvchi filial nomi
receiver[branch][code] string Qabul qiluvchi filial kodi
receiver[latitude] string Qabul qiluvchi latitudi
receiver[longitude] string Qabul qiluvchi longitudi
receiver[stickerData][hubName] string Qabul qilgich stiker ma'lumotlar markazi nomi
receiver[stickerData][cityName] string Qabul qiluvchi stiker ma'lumotlari Shahar nomi
receiver[stickerData][branchName] string Qabul qiluvchi stiker ma'lumotlari filiali nomi
receiver[stickerData][zonaId] integer Qabul qilgich stikerining ma'lumotlar zonasi identifikatori
cargo[weight] float Yuk og'irligi
cargo[volume] float Yuk hajmi
cargo[piece] integer Yuklar soni
cargo[package][id] integer Yuk paketi identifikatori
cargo[package][name] string Yuk paketining nomi
cargo[postType][id] integer Yuk pochtasi turi identifikatori
cargo[postType][name] string Yuk posti turi nomi
cargo[postTypes][child_id] integer Yuk pochtasi turlarining bola identifikatori
cargo[postTypes][barcode] string Yuk pochtasi turlari shtrix-kodi
cargo[postTypes][packageId] integer Yuk pochtasi turlari paketi identifikatori
cargo[postTypes][weight] float Yuk posti turlarining og'irligi
cargo[postTypes][name] string Yuk pochtasi turlarining nomi
cargo[postTypes][code] string Yuk pochtasi turlari kodi
cargo[postTypes][count] integer Yuk pochtasi turlari soni
cargo[postTypes][cost] float Yuk pochtasi turlari narxi
cargo[options][with_unired] string Unired bilan yuk tashish imkoniyatlari
cargo[options][urgent] integer Yuk tashish imkoniyatlari shoshilinch
cargo[options][takePhoto] integer Yuk tashish imkoniyatlari suratga olish
cargo[options][bringBackWaybill] integer Qaytarilgan yuk tashish varaqasi
cargo[options][bringBackMoney] integer Yuk tashish opsiyalari qaytarilgan pul
cargo[options][back_money] float Yuk tashish imkoniyatlari Qaytarilgan pul miqdori
cost float Narxi
senderDate string Yuborilgan sana
receiverDate string Qabul qilingan sana
ready_to_take boolean Qabul qilishga tayyor
tracking string Kuzatuv URL manzili
HTTP 401
Response Body
{
    "name": "Unauthorized",
    "message": "Your request was made with invalid credentials.",
    "code": 0,
    "status": 401,
    "type": "yii\\web\\UnauthorizedHttpException"
}
No schema defined.
HTTP 403
Response Body
{
    "status": false,
    "message": "Forbidden",
    "status_code": 403
}
No schema defined.
HTTP 404
Response Body
{
    "status": false,
    "message": "error.not_found",
    "status_code": 404
}
No schema defined.