# Townships

## Retrieve Township

> Retrieve a specific Township by ID

```json
{"openapi":"3.0.3","info":{"title":"Omnitron API","version":"1.0.0"},"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"apiKey","in":"header","name":"Authorization"}},"parameters":{"id_path":{"name":"id","in":"path","description":"Unique identifier of the resource","required":true,"schema":{"type":"integer"}}},"schemas":{"Township":{"type":"object","allOf":[{"$ref":"#/components/schemas/StarterModel"}],"properties":{"pk":{"type":"integer","description":"Primary key of the township"},"name":{"type":"string","format":"string","description":"Township Name"},"is_active":{"type":"boolean","description":"Is it active? (True/False)"},"city":{"type":"integer","format":"int64","description":"Related City ID"},"translations":{"type":"object","description":"A dynamic object holding translations for different languages","additionalProperties":{"type":"string"},"readOnly":true},"postcode":{"type":"string","format":"string","description":"Postcode"}},"required":["city","name"]},"StarterModel":{"type":"object","properties":{"created_date":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the object was created."},"modified_date":{"type":"string","format":"date-time","description":"The date and time when the object was last modified."}}}},"responses":{"401":{"description":"Unauthorized Access","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"Contains a detailed description of the error."},"code":{"type":"string","description":"Represents the server-side error code."}}}}}},"404":{"description":"The given resource or object was not found or does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"description":"Contains a detailed description of the error.","type":"string"}}}}}},"500":{"description":"Server Error"}}},"paths":{"/api/v1/townships/{id}/":{"get":{"summary":"Retrieve Township","description":"Retrieve a specific Township by ID","tags":["Townships"],"parameters":[{"$ref":"#/components/parameters/id_path"}],"responses":{"200":{"description":"Township retrieved successfully","content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/Township"}}}},"401":{"$ref":"#/components/responses/401"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Update Township

> Update a specific Township by ID

```json
{"openapi":"3.0.3","info":{"title":"Omnitron API","version":"1.0.0"},"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"apiKey","in":"header","name":"Authorization"}},"parameters":{"id_path":{"name":"id","in":"path","description":"Unique identifier of the resource","required":true,"schema":{"type":"integer"}}},"schemas":{"Township":{"type":"object","allOf":[{"$ref":"#/components/schemas/StarterModel"}],"properties":{"pk":{"type":"integer","description":"Primary key of the township"},"name":{"type":"string","format":"string","description":"Township Name"},"is_active":{"type":"boolean","description":"Is it active? (True/False)"},"city":{"type":"integer","format":"int64","description":"Related City ID"},"translations":{"type":"object","description":"A dynamic object holding translations for different languages","additionalProperties":{"type":"string"},"readOnly":true},"postcode":{"type":"string","format":"string","description":"Postcode"}},"required":["city","name"]},"StarterModel":{"type":"object","properties":{"created_date":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the object was created."},"modified_date":{"type":"string","format":"date-time","description":"The date and time when the object was last modified."}}}},"responses":{"401":{"description":"Unauthorized Access","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"Contains a detailed description of the error."},"code":{"type":"string","description":"Represents the server-side error code."}}}}}},"404":{"description":"The given resource or object was not found or does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"description":"Contains a detailed description of the error.","type":"string"}}}}}},"500":{"description":"Server Error"}}},"paths":{"/api/v1/townships/{id}/":{"put":{"summary":"Update Township","description":"Update a specific Township by ID","tags":["Townships"],"parameters":[{"$ref":"#/components/parameters/id_path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Township"}}}},"responses":{"200":{"description":"Township updated"},"401":{"$ref":"#/components/responses/401"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Delete Township

> Delete a specific Township by ID

```json
{"openapi":"3.0.3","info":{"title":"Omnitron API","version":"1.0.0"},"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"apiKey","in":"header","name":"Authorization"}},"parameters":{"id_path":{"name":"id","in":"path","description":"Unique identifier of the resource","required":true,"schema":{"type":"integer"}}},"responses":{"401":{"description":"Unauthorized Access","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"Contains a detailed description of the error."},"code":{"type":"string","description":"Represents the server-side error code."}}}}}},"404":{"description":"The given resource or object was not found or does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"description":"Contains a detailed description of the error.","type":"string"}}}}}},"500":{"description":"Server Error"}}},"paths":{"/api/v1/townships/{id}/":{"delete":{"summary":"Delete Township","description":"Delete a specific Township by ID","tags":["Townships"],"parameters":[{"$ref":"#/components/parameters/id_path"}],"responses":{"204":{"description":"Township deleted successfully"},"401":{"$ref":"#/components/responses/401"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Partial Update Township

> Partial update a specific Township by ID

```json
{"openapi":"3.0.3","info":{"title":"Omnitron API","version":"1.0.0"},"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"apiKey","in":"header","name":"Authorization"}},"parameters":{"id_path":{"name":"id","in":"path","description":"Unique identifier of the resource","required":true,"schema":{"type":"integer"}}},"schemas":{"Township":{"type":"object","allOf":[{"$ref":"#/components/schemas/StarterModel"}],"properties":{"pk":{"type":"integer","description":"Primary key of the township"},"name":{"type":"string","format":"string","description":"Township Name"},"is_active":{"type":"boolean","description":"Is it active? (True/False)"},"city":{"type":"integer","format":"int64","description":"Related City ID"},"translations":{"type":"object","description":"A dynamic object holding translations for different languages","additionalProperties":{"type":"string"},"readOnly":true},"postcode":{"type":"string","format":"string","description":"Postcode"}},"required":["city","name"]},"StarterModel":{"type":"object","properties":{"created_date":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the object was created."},"modified_date":{"type":"string","format":"date-time","description":"The date and time when the object was last modified."}}}},"responses":{"401":{"description":"Unauthorized Access","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"Contains a detailed description of the error."},"code":{"type":"string","description":"Represents the server-side error code."}}}}}},"404":{"description":"The given resource or object was not found or does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"description":"Contains a detailed description of the error.","type":"string"}}}}}},"500":{"description":"Server Error"}}},"paths":{"/api/v1/townships/{id}/":{"patch":{"summary":"Partial Update Township","description":"Partial update a specific Township by ID","tags":["Townships"],"parameters":[{"$ref":"#/components/parameters/id_path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Township"}}}},"responses":{"200":{"description":"Township updated"},"401":{"$ref":"#/components/responses/401"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Retrieve Township with details

> Retrieve a specific Township by ID with details

```json
{"openapi":"3.0.3","info":{"title":"Omnitron API","version":"1.0.0"},"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"apiKey","in":"header","name":"Authorization"}},"parameters":{"id_path":{"name":"id","in":"path","description":"Unique identifier of the resource","required":true,"schema":{"type":"integer"}}},"schemas":{"TownshipDetailed":{"allOf":[{"$ref":"#/components/schemas/Township"}],"properties":{"city":{"$ref":"#/components/schemas/City"}}},"Township":{"type":"object","allOf":[{"$ref":"#/components/schemas/StarterModel"}],"properties":{"pk":{"type":"integer","description":"Primary key of the township"},"name":{"type":"string","format":"string","description":"Township Name"},"is_active":{"type":"boolean","description":"Is it active? (True/False)"},"city":{"type":"integer","format":"int64","description":"Related City ID"},"translations":{"type":"object","description":"A dynamic object holding translations for different languages","additionalProperties":{"type":"string"},"readOnly":true},"postcode":{"type":"string","format":"string","description":"Postcode"}},"required":["city","name"]},"StarterModel":{"type":"object","properties":{"created_date":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the object was created."},"modified_date":{"type":"string","format":"date-time","description":"The date and time when the object was last modified."}}},"City":{"type":"object","properties":{"id":{"type":"integer","readOnly":true,"description":"City ID"},"name":{"type":"string","format":"string","description":"City Name"},"created_date":{"type":"string","format":"date-time","description":"Creation Date","readOnly":true},"modified_date":{"type":"string","format":"date-time","description":"Last Modification Date","readOnly":true},"is_active":{"type":"boolean","description":"Is it active? (True/False)"},"country":{"type":"integer","format":"int64","description":"Related Country ID"},"translations":{"type":"object","description":"A dynamic object holding translations for different languages","additionalProperties":{"type":"string"},"readOnly":true},"priority":{"type":"integer","format":"int64","description":"Priority"},"postcode":{"type":"string","format":"string","description":"Postcode"}},"required":["country","name"]}},"responses":{"401":{"description":"Unauthorized Access","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"Contains a detailed description of the error."},"code":{"type":"string","description":"Represents the server-side error code."}}}}}},"404":{"description":"The given resource or object was not found or does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"description":"Contains a detailed description of the error.","type":"string"}}}}}},"500":{"description":"Server Error"}}},"paths":{"/api/v1/townships/{id}/detailed/":{"get":{"summary":"Retrieve Township with details","description":"Retrieve a specific Township by ID with details","tags":["Townships"],"parameters":[{"$ref":"#/components/parameters/id_path"}],"responses":{"200":{"description":"Township retrieved successfully with details","content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/TownshipDetailed"}}}},"401":{"$ref":"#/components/responses/401"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## List Townships

> List Townships

```json
{"openapi":"3.0.3","info":{"title":"Omnitron API","version":"1.0.0"},"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"apiKey","in":"header","name":"Authorization"}},"parameters":{"page":{"name":"page","in":"query","required":false,"description":"Specifies the page number of the current dataset","schema":{"type":"integer","minimum":1,"default":1}},"limit":{"name":"limit","in":"query","required":false,"description":"Indicates the number of rows on the current page.","schema":{"type":"integer","minimum":1,"default":10}},"name__exact":{"name":"name__exact","in":"query","required":false,"description":"Filters by exact name","schema":{"type":"string"}},"name__iexact":{"name":"name__iexact","in":"query","required":false,"description":"Filters case insensitive by exact name","schema":{"type":"string"}},"mapping__integration_type":{"name":"mapping__integration_type","in":"query","description":"Filter by integration mapping object's integration type","required":false,"schema":{"type":"string","enum":["hepsiburada","hepsiburadaads","n11","web","external_company","gittigidiyor","trendyol","ups","morhipo","morhipoV2","amazon","b2c_direct","allegro","akinon","ay_cargo","aliexpress","emag","yurtici","ciceksepeti","fancourier","diva","hana","gordumaldim","pazarama","flo","dpd","cdek","turkcellds","sales_channel","kolay_gelsin","sameday","sendeo","cargus","dataeva","speedy","modanisa"]}},"mapping__code__exact":{"name":"mapping__code__exact","in":"query","description":"Filter by integration mapping object's code","required":false,"schema":{"type":"string"}},"hyper":{"name":"hyper","in":"query","description":"Activate id to hyperlink the response data.","required":false,"schema":{"type":"boolean"}},"priority":{"name":"priority","in":"query","description":"Filter by priority","required":false,"schema":{"type":"integer"}},"city":{"name":"city_id","in":"query","required":false,"description":"Filter by City ID","schema":{"type":"integer","minimum":1}},"postcode":{"name":"postcode","in":"query","required":false,"description":"Filter by Postcode","schema":{"type":"string"}},"pk__in":{"name":"pk__in","in":"query","description":"Filter by multiple primary key values (comma-separated list of integers)","required":false,"schema":{"type":"array","items":{"type":"integer"}},"style":"form","explode":false}},"schemas":{"Township":{"type":"object","allOf":[{"$ref":"#/components/schemas/StarterModel"}],"properties":{"pk":{"type":"integer","description":"Primary key of the township"},"name":{"type":"string","format":"string","description":"Township Name"},"is_active":{"type":"boolean","description":"Is it active? (True/False)"},"city":{"type":"integer","format":"int64","description":"Related City ID"},"translations":{"type":"object","description":"A dynamic object holding translations for different languages","additionalProperties":{"type":"string"},"readOnly":true},"postcode":{"type":"string","format":"string","description":"Postcode"}},"required":["city","name"]},"StarterModel":{"type":"object","properties":{"created_date":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the object was created."},"modified_date":{"type":"string","format":"date-time","description":"The date and time when the object was last modified."}}}},"responses":{"401":{"description":"Unauthorized Access","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"Contains a detailed description of the error."},"code":{"type":"string","description":"Represents the server-side error code."}}}}}},"404":{"description":"The given resource or object was not found or does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"description":"Contains a detailed description of the error.","type":"string"}}}}}},"500":{"description":"Server Error"}}},"paths":{"/api/v1/townships/":{"get":{"summary":"List Townships","description":"List Townships","tags":["Townships"],"parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/name__exact"},{"$ref":"#/components/parameters/name__iexact"},{"$ref":"#/components/parameters/mapping__integration_type"},{"$ref":"#/components/parameters/mapping__code__exact"},{"$ref":"#/components/parameters/hyper"},{"$ref":"#/components/parameters/priority"},{"$ref":"#/components/parameters/city"},{"$ref":"#/components/parameters/postcode"},{"$ref":"#/components/parameters/pk__in"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":"string","description":"Next page URL","nullable":true},"previous":{"type":"string","description":"Previous page URL","nullable":true},"results":{"type":"array","items":{"$ref":"#/components/schemas/Township"}}}}}}},"401":{"$ref":"#/components/responses/401"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Create Township

> Create Township

```json
{"openapi":"3.0.3","info":{"title":"Omnitron API","version":"1.0.0"},"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"Township":{"type":"object","allOf":[{"$ref":"#/components/schemas/StarterModel"}],"properties":{"pk":{"type":"integer","description":"Primary key of the township"},"name":{"type":"string","format":"string","description":"Township Name"},"is_active":{"type":"boolean","description":"Is it active? (True/False)"},"city":{"type":"integer","format":"int64","description":"Related City ID"},"translations":{"type":"object","description":"A dynamic object holding translations for different languages","additionalProperties":{"type":"string"},"readOnly":true},"postcode":{"type":"string","format":"string","description":"Postcode"}},"required":["city","name"]},"StarterModel":{"type":"object","properties":{"created_date":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the object was created."},"modified_date":{"type":"string","format":"date-time","description":"The date and time when the object was last modified."}}}},"responses":{"401":{"description":"Unauthorized Access","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"Contains a detailed description of the error."},"code":{"type":"string","description":"Represents the server-side error code."}}}}}},"404":{"description":"The given resource or object was not found or does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"description":"Contains a detailed description of the error.","type":"string"}}}}}},"500":{"description":"Server Error"}}},"paths":{"/api/v1/townships/":{"post":{"summary":"Create Township","description":"Create Township","tags":["Townships"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Township"}}}},"responses":{"201":{"description":"Township Created","content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/Township"}}}},"401":{"$ref":"#/components/responses/401"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## List Townships with details

> List Townships with details

```json
{"openapi":"3.0.3","info":{"title":"Omnitron API","version":"1.0.0"},"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"apiKey","in":"header","name":"Authorization"}},"parameters":{"page":{"name":"page","in":"query","required":false,"description":"Specifies the page number of the current dataset","schema":{"type":"integer","minimum":1,"default":1}},"limit":{"name":"limit","in":"query","required":false,"description":"Indicates the number of rows on the current page.","schema":{"type":"integer","minimum":1,"default":10}},"name__exact":{"name":"name__exact","in":"query","required":false,"description":"Filters by exact name","schema":{"type":"string"}},"name__iexact":{"name":"name__iexact","in":"query","required":false,"description":"Filters case insensitive by exact name","schema":{"type":"string"}},"mapping__integration_type":{"name":"mapping__integration_type","in":"query","description":"Filter by integration mapping object's integration type","required":false,"schema":{"type":"string","enum":["hepsiburada","hepsiburadaads","n11","web","external_company","gittigidiyor","trendyol","ups","morhipo","morhipoV2","amazon","b2c_direct","allegro","akinon","ay_cargo","aliexpress","emag","yurtici","ciceksepeti","fancourier","diva","hana","gordumaldim","pazarama","flo","dpd","cdek","turkcellds","sales_channel","kolay_gelsin","sameday","sendeo","cargus","dataeva","speedy","modanisa"]}},"mapping__code__exact":{"name":"mapping__code__exact","in":"query","description":"Filter by integration mapping object's code","required":false,"schema":{"type":"string"}},"hyper":{"name":"hyper","in":"query","description":"Activate id to hyperlink the response data.","required":false,"schema":{"type":"boolean"}},"priority":{"name":"priority","in":"query","description":"Filter by priority","required":false,"schema":{"type":"integer"}},"city":{"name":"city_id","in":"query","required":false,"description":"Filter by City ID","schema":{"type":"integer","minimum":1}},"postcode":{"name":"postcode","in":"query","required":false,"description":"Filter by Postcode","schema":{"type":"string"}},"pk__in":{"name":"pk__in","in":"query","description":"Filter by multiple primary key values (comma-separated list of integers)","required":false,"schema":{"type":"array","items":{"type":"integer"}},"style":"form","explode":false}},"schemas":{"TownshipDetailed":{"allOf":[{"$ref":"#/components/schemas/Township"}],"properties":{"city":{"$ref":"#/components/schemas/City"}}},"Township":{"type":"object","allOf":[{"$ref":"#/components/schemas/StarterModel"}],"properties":{"pk":{"type":"integer","description":"Primary key of the township"},"name":{"type":"string","format":"string","description":"Township Name"},"is_active":{"type":"boolean","description":"Is it active? (True/False)"},"city":{"type":"integer","format":"int64","description":"Related City ID"},"translations":{"type":"object","description":"A dynamic object holding translations for different languages","additionalProperties":{"type":"string"},"readOnly":true},"postcode":{"type":"string","format":"string","description":"Postcode"}},"required":["city","name"]},"StarterModel":{"type":"object","properties":{"created_date":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the object was created."},"modified_date":{"type":"string","format":"date-time","description":"The date and time when the object was last modified."}}},"City":{"type":"object","properties":{"id":{"type":"integer","readOnly":true,"description":"City ID"},"name":{"type":"string","format":"string","description":"City Name"},"created_date":{"type":"string","format":"date-time","description":"Creation Date","readOnly":true},"modified_date":{"type":"string","format":"date-time","description":"Last Modification Date","readOnly":true},"is_active":{"type":"boolean","description":"Is it active? (True/False)"},"country":{"type":"integer","format":"int64","description":"Related Country ID"},"translations":{"type":"object","description":"A dynamic object holding translations for different languages","additionalProperties":{"type":"string"},"readOnly":true},"priority":{"type":"integer","format":"int64","description":"Priority"},"postcode":{"type":"string","format":"string","description":"Postcode"}},"required":["country","name"]}},"responses":{"401":{"description":"Unauthorized Access","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string","description":"Contains a detailed description of the error."},"code":{"type":"string","description":"Represents the server-side error code."}}}}}},"404":{"description":"The given resource or object was not found or does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"description":"Contains a detailed description of the error.","type":"string"}}}}}},"500":{"description":"Server Error"}}},"paths":{"/api/v1/townships/detailed/":{"get":{"summary":"List Townships with details","description":"List Townships with details","tags":["Townships"],"parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/name__exact"},{"$ref":"#/components/parameters/name__iexact"},{"$ref":"#/components/parameters/mapping__integration_type"},{"$ref":"#/components/parameters/mapping__code__exact"},{"$ref":"#/components/parameters/hyper"},{"$ref":"#/components/parameters/priority"},{"$ref":"#/components/parameters/city"},{"$ref":"#/components/parameters/postcode"},{"$ref":"#/components/parameters/pk__in"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":"string","description":"Next page URL","nullable":true},"previous":{"type":"string","description":"Previous page URL","nullable":true},"results":{"type":"array","items":{"$ref":"#/components/schemas/TownshipDetailed"}}}}}}},"401":{"$ref":"#/components/responses/401"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.akinon.com/omnitron-openapis/townships.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
