All services related to districts are listed in this page.
GET District List
This method returns a list of districts with less detailed information.
Path:/api/v1/oms/districts/
Query Parameters
The following query parameters can be used to get the information about
districts.
Parameter
Data Type
In
Description
token
string
header
The API key of the customer account
Example Request
To get a list of all districts, a GET request should be sent to the /api/v1/oms/districts/ endpoint. In the headers, set the Authorization header to include the token for authentication.
Here's an example of how to make the request in python:
In a successful response with a status code of 200 OK, the API returns all the districts in a JSON format. The response body contains a JSON object with the districts and their associated attributes, which may include ID, name, city ID, township ID, etc.
These attributes are described in the following table.
Parameter
Data Type
Description
pk
integer
The ID of the district
name
string
The name of the district
city
integer
The city ID of the district
township
integer
The township ID of the district
is_active
boolean
The status of the district
latitude
decimal
The latitude value of the district
longitude
decimal
The longitude value of the district
This example response serves as a reference to understand the structure and data format returned from this API service.
This method retrieves a list of districts with detailed information.
Path:/api/v1/oms/districts/list-simple/
Query Parameters
The following query parameters can be used to get the information about districts.
Parameter
Data Type
In
Description
token
string
header
The API key of the customer account
Example Request
To get a detailed list of all districts, a GET request should be sent to the /api/v1/oms/districts/list-simple/ endpoint. In the headers, set the Authorization header to include the token for authentication.
Here's an example of how to make the request in python:
In a successful response with a status code of 200 OK, the API returns all the districts in a JSON format. The response body contains a JSON object with the districts and their associated attributes, which may include ID, name, created_date, modified_date, etc.
These attributes are described in the following table.
Parameter
Data Type
Description
id
integer
The ID of the district
created_date
date
The creation date of the district
modified_date
date
The last modified date of the district
omnitron_id
integer
The Omnitron ID of the district
name
string
The name of the district
city
integer
The city ID of the district
township
integer
The township ID of the district
is_active
boolean
The status of the district
latitude
decimal
The latitude value of the district
longitude
decimal
The longitude value of the district
mapping
json
The mapped values of the district
This example response serves as a reference to understand the structure and data format returned from this API service.