Create a district
Creates a new district under a city and township.
name, city, and township are required. The combination of city, township, and name must be unique; a duplicate is rejected with 406 Not Acceptable carrying error_code address_100_6.
Translations are optional. When supplied, provide them as an object keyed by language code where each value maps field names to translated strings: {"tr": {"name": "Kadıköy"}}.
Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.
The body of a district create or full update request.
Whether the district is active. Defaults to true when omitted on create.
The official name of the district.
The identifier of the city this district belongs to.
The identifier of the township this district belongs to.
The post/zip code of the district. Optional.
Translated field values keyed by language code. Example: {"tr": {"name": "Kadıköy"}}.
The created district.
A district record.
The unique identifier of the district.
Whether the district is active. Inactive districts are excluded from storefront address lookups.
The official name of the district.
The identifier of the city this district belongs to.
The identifier of the township this district belongs to.
The post/zip code of the district.
A mapping of language codes to translated field values. Example: {"tr": {"name": "Kadıköy"}}.
{}The request contains invalid or missing data.
Authentication credentials were not provided or are invalid.
The authenticated user does not have administrator privileges.
The request is well-formed but conflicts with a business rule — for example, requesting a product-type change that is not allowed (only Simple ↔ Miscellaneous transitions are permitted).
POST /api/v1/remote/1/districts/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 122
{
"is_active": true,
"name": "Kadıköy",
"city": 3,
"township": 12,
"postcode": "34710",
"translations": {
"tr": {
"name": "Kadıköy"
}
}
}{
"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?

