Get List of Districts
GET/districts
Retrieve a list of districts based on the user type and city ID.
Request
Query Parameters
The type of user. Example 1
The ID of the city. Use null if not available.
Header Parameters
A unique identifier for the request, used for tracking and troubleshooting purposes. In case of any errors, Flip can use this value to trace and investigate the specific request.
The Request-ID will be formed of bigflip-{uuid}, where the “uuid” (Universally unique identifier) has to be generated on your end.
Example: "Request-ID: bigflip-47EB7F57-5565-4BF0-B9DD-46C6268CEE71".
Responses
- 200
- 401
List of districts retrieved successfully
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
districts
object[]
The ID of the district.
The name of the district.
{
"districts": [
{
"id": 0,
"name": "string"
}
]
}
{
"districts": [
{
"id": 1,
"name": "Sukmajaya"
},
{
"id": 2,
"name": "Beji"
}
]
}
Sample response when Your Flip api secret key value for Authorization is missing or invalid
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
errors
object[]
{
"errors": [
{
"code": 401,
"message": "Invalid Auth"
}
]
}