boscod OpenAPI
  1. Coverage Area
boscod OpenAPI
  • Introduction
  • Shipping label
  • Errors
  • Changelog
  • API
    • Coverage Area
      • Provinces
        GET
      • Cities
        GET
      • Districts
        GET
      • Search Area
        GET
    • Rates
      • List Courier
      • Shipping Fee
      • Shipping Fee (SSE)
    • Orders
      • Create Order
      • Cancel Order
      • Detail Order
      • Tracking
      • Estimation Rates
  • Webhook
  1. Coverage Area

Districts

Developing
GET
/v1/address/districts/{city_id}
Retrieves a paginated list of districts/subdistricts within a specified city. Includes complete hierarchical information and active status.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params
city_id
integer 
required
ID of the city
Example:
38
Query Params
start
integer 
optional
Starting index for pagination (default: 0)
Example:
0
limit
integer 
optional
Number of records per page (default: 10)
Example:
10

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://demo.boscod.com:4004/v1/address/districts/38?start=0&limit=10'

Responses

🟢200Success
application/json
Body
total
integer 
required
Total number of districts
data
array [object {5}] 
required
name
string 
required
District name
code
string 
optional
District code
id
integer 
required
District ID
city_id
integer 
required
Reference to city
province_id
integer 
required
Reference to province
Example
{
    "total": 8,
    "data": [
        {
            "name": "CEMPAKA PUTIH",
            "code": "JKTP01",
            "id": 14909,
            "city_id": 38,
            "province_id": 1
        },
        {
            "name": "GAMBIR",
            "code": "JKTP02",
            "id": 14910,
            "city_id": 38,
            "province_id": 1
        },
        {
            "name": "JOHAR BARU",
            "code": "JKTP03",
            "id": 14911,
            "city_id": 38,
            "province_id": 1
        },
        {
            "name": "KEMAYORAN",
            "code": "JKTP04",
            "id": 14912,
            "city_id": 38,
            "province_id": 1
        },
        {
            "name": "MENTENG",
            "code": "JKTP05",
            "id": 14913,
            "city_id": 38,
            "province_id": 1
        },
        {
            "name": "SAWAH BESAR",
            "code": "JKTP06",
            "id": 14914,
            "city_id": 38,
            "province_id": 1
        },
        {
            "name": "SENEN",
            "code": "JKTP07",
            "id": 14915,
            "city_id": 38,
            "province_id": 1
        },
        {
            "name": "TANAH ABANG",
            "code": "JKTP08",
            "id": 14916,
            "city_id": 38,
            "province_id": 1
        }
    ]
}
Previous
Cities
Next
Search Area
Built with