Get District by City id
GET
https://api-dev.kirimpaket.id/api/open/location/districts
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Query Params
city_id
string
optional
Example:
1
Header Params
Accept
string
optional
Example:
application/json
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://api-dev.kirimpaket.id/api/open/location/districts?city_id=1' \
--header 'Accept: application/json'
Responses
🟢200Success
application/json
Body
array of:
id
integer
required
name
string
required
city_id
integer
required
province_id
integer
required
Examples
[
{
"id": 10,
"name": "ALAFAN",
"city_id": 1,
"province_id": 1
},
{
"id": 8,
"name": "SALANG",
"city_id": 1,
"province_id": 1
},
{
"id": 9,
"name": "SIMEULUE BARAT",
"city_id": 1,
"province_id": 1
},
{
"id": 7,
"name": "SIMEULUE CUT",
"city_id": 1,
"province_id": 1
},
{
"id": 5,
"name": "SIMEULUE TENGAH",
"city_id": 1,
"province_id": 1
},
{
"id": 2,
"name": "SIMEULUE TIMUR",
"city_id": 1,
"province_id": 1
},
{
"id": 6,
"name": "TELUK DALAM",
"city_id": 1,
"province_id": 1
},
{
"id": 3,
"name": "TEUPAH BARAT",
"city_id": 1,
"province_id": 1
},
{
"id": 1,
"name": "TEUPAH SELATAN",
"city_id": 1,
"province_id": 1
},
{
"id": 4,
"name": "TEUPAH TENGAH",
"city_id": 1,
"province_id": 1
}
]
🟢200Success But Empty Result