For the complete documentation index, see llms.txt. This page is also available as Markdown.

List districts

Returns a paginated list of districts ordered by name ascending.

Unlike the storefront endpoint, this admin endpoint returns all districts regardless of their is_active status.

Filter by name, city, township, or has_retail_store. Order results with sort.

get
/districts/
Authorizations
AuthorizationstringRequired

Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.

Query parameters
pageintegerOptional

The page number to return.

Default: 1
limitintegerOptional

The number of items to return per page.

Default: 10
sortstringOptional

Orders the results by one or more fields. Separate multiple fields with commas. Prefix a field with a hyphen (-) for descending order.

Example: -id
namestringOptional

Filter by district name. Exact match.

Example: Kadıköy
cityintegerOptional

Filter by city identifier. Keeps only districts in the given city.

Example: 3
townshipintegerOptional

Filter by township identifier. Keeps only districts in the given township.

Example: 12
has_retail_storebooleanOptional

When true, keep only districts that have at least one retail store.

Example: true
Responses
200

A page of districts.

application/json

A paginated list of districts.

countintegerOptional

Total number of districts matching the request.

nextstring · nullableOptional

URL of the next page, or null if this is the last page.

previousstring · nullableOptional

URL of the previous page, or null if this is the first page.

get/districts/
GET /api/v1/remote/1/districts/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "pk": 7,
      "is_active": true,
      "name": "Kadıköy",
      "city": 3,
      "township": 12,
      "postcode": "34710",
      "translations": {
        "tr": {
          "name": "Kadıköy"
        }
      }
    }
  ]
}

Last updated

Was this helpful?