documentation
Shahar(tumanlar)

Shahar(tumanlar)

GET /v1/directory/cities?regionCode=<regionCode>

Ushbu bo‘lim orqali tanlangan hudud (region) bo‘yicha shahar va tumanlar (cities) ro‘yxati olinadi.

So‘rovda regionCode parametri yuboriladi va tizim shu hududga tegishli barcha shahar va tumanlarni qaytaradi. Ushbu ma’lumotlar buyurtma yaratishda jo‘natuvchi va qabul qiluvchi manzillarini tanlashda ishlatiladi.

Har bir shahar yoki tuman uchun uning identifikatori, nomi va tegishli kodlari qaytarilishi mumkin.

Bu endpoint faqat ma’lumot olish uchun mo‘ljallangan va tizimdagi hech qanday ma’lumotni o‘zgartirmaydi.

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

REQUEST

Field Type Description
regionCode * string Viloyat kodi. Path: GET /v1/directory/cities/{regionCode} yoki query: ?regionCode={regionCode}. Faqat harf va raqam (A-Za-z0-9). /v1/directory/regions dagi code
page integer Sahifa raqami (pagination). Default: 1
per-page integer Sahifadagi elementlar soni (pagination)

RESPONSE

HTTP 200
Response Body
{
    "status": true,
    "message": "Ma’lumot muvaffaqiyatli olindi.",
    "status_code": 200,
    "data": {
        "items": [
            {
                "code": "6004",
                "name": "Andijon tumani",
                "office_exists": true
            },
            {
                "code": "6007",
                "name": "Bo'z tumani",
                "office_exists": true
            },
            {
                "code": "6003",
                "name": "Xonobod shahar",
                "office_exists": true
            },
            {
                "code": "6010",
                "name": "Ulug'nor tumani",
                "office_exists": true
            },
            {
                "code": "6002",
                "name": "Asaka tuman",
                "office_exists": true
            },
            {
                "code": "6006",
                "name": "Buloqboshi tuman",
                "office_exists": true
            },
            {
                "code": "6005",
                "name": "Baliqchi tumani",
                "office_exists": true
            },
            {
                "code": "6015",
                "name": "Qo'rg'ontepa tumani",
                "office_exists": true
            },
            {
                "code": "6001",
                "name": "Andijon shahri",
                "office_exists": true
            },
            {
                "code": "6018",
                "name": "Bo'ston tumani",
                "office_exists": false
            },
            {
                "code": "6008",
                "name": "Jalaquduq tumani",
                "office_exists": true
            },
            {
                "code": "6011",
                "name": "Marhamat tuman",
                "office_exists": true
            },
            {
                "code": "6009",
                "name": "Izboskan tuman",
                "office_exists": true
            },
            {
                "code": "6012",
                "name": "Paxtaobod tumani",
                "office_exists": true
            },
            {
                "code": "6016",
                "name": "Shaxrixon tuman",
                "office_exists": true
            },
            {
                "code": "6013",
                "name": "Xo'jaobod tumani",
                "office_exists": true
            },
            {
                "code": "6014",
                "name": "Oltinko'l tumani",
                "office_exists": true
            }
        ],
        "_links": {
            "self": "/v1/directory/cities/60?page=1",
            "first": "/v1/directory/cities/60?page=1",
            "last": "/v1/directory/cities/60?page=1",
            "next": null,
            "prev": null
        },
        "_meta": {
            "totalCount": 17,
            "pageCount": 1,
            "currentPage": 1,
            "perPage": 20,
            "params": {
                "regionCode": "60"
            }
        }
    }
}
Field Type Description
status boolean So'rov muvaffaqiyatli bajarilganligi (true/false)
message string Javob xabari
status_code integer HTTP status kodi
data[items] array<object> Shaharlar ro'yxati (pagination items)
data[items][0][code] string Shahar kodi (City.code). sender.cityCode / senderCityCode uchun ishlatiladi
data[items][0][name] string Shahar nomi (Language header bo'yicha lokalizatsiya)
data[items][0][office_exists] boolean Shu hududda BTS ofisi mavjudligi
data[_links] object Pagination havolalari (self, next, last va hokazo)
data[_meta][totalCount] integer Jami elementlar soni
data[_meta][pageCount] integer Jami sahifalar soni
data[_meta][currentPage] integer Joriy sahifa raqami
data[_meta][perPage] integer Sahifadagi elementlar soni