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

List townships

Returns a paginated list of townships ordered by name ascending.

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

Filter by city, country, name, name_startswith, pk__in, retailstore__isnull, or store_type. Order results with sort.

get
/townships/
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 name. Case-insensitive contains match — ?name=kad matches Kadıköy.

Example: Kadıköy
cityintegerOptional

Filter by city identifier. Keeps only townships belonging to the given city.

Example: 3
countryintegerOptional

Filter by country identifier. Keeps only townships belonging to cities in the given country.

Example: 1
name_startswithstringOptional

Filter by name prefix. Case-insensitive starts-with match — ?name_startswith=kad matches Kadıköy.

Example: Kad
pk__instringOptional

Filter by a comma-separated list of township identifiers. Returns only the townships whose pk is in the list.

Example: 1,2,3
retailstore__isnullbooleanOptional

Filter by retail store presence. false keeps only townships that have at least one retail store; true keeps only townships with no retail store.

Example: false
store_typestringOptional

Filter by retail store type name. Case-sensitive exact match. Keeps only townships whose retail stores have the given store type name.

Example: flagship
Responses
200

A page of townships.

application/json

A paginated list of townships.

countintegerOptional

Total number of townships 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/townships/
GET /api/v1/remote/1/townships/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "pk": 42,
      "is_active": true,
      "name": "Kadıköy",
      "city": 3,
      "postcode": "34710",
      "translations": {
        "tr": {
          "name": "Kadıköy"
        }
      }
    }
  ]
}

Last updated

Was this helpful?