# Models

## The Address object

```json
{"openapi":"3.0.3","info":{"title":"Address API","version":"1.0.0"},"components":{"schemas":{"Address":{"type":"object","properties":{"pk":{"type":"integer","description":"Address ID"},"email":{"type":"string","format":"email","nullable":true},"phone_number":{"type":"string","description":"International format (e.g., +905551234567)"},"first_name":{"type":"string"},"last_name":{"type":"string"},"country":{"type":"integer","description":"Country ID"},"city":{"type":"integer","description":"City ID"},"line":{"type":"string","description":"Street address, building, apartment"},"title":{"type":"string","description":"Address nickname (e.g., \"Ev\", \"İş\")"},"township":{"type":"integer","description":"Township ID"},"district":{"type":"integer","nullable":true,"description":"District ID"},"postcode":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"company_name":{"type":"string","nullable":true},"tax_office":{"type":"string","nullable":true},"tax_no":{"type":"string","nullable":true},"e_bill_taxpayer":{"type":"boolean","nullable":true,"description":"E-invoice taxpayer?"},"hash_data":{"type":"string","readOnly":true,"description":"Address hash for duplicate detection"},"address_type":{"type":"string","readOnly":true},"retail_store":{"type":"integer","nullable":true,"description":"Retail store ID for click-and-collect"},"remote_id":{"type":"string","nullable":true,"description":"External provider address ID"},"identity_number":{"type":"string","nullable":true},"extra_field":{"type":"object","readOnly":true,"description":"Country-specific extra fields"},"user":{"type":"integer","readOnly":true,"description":"User ID"},"is_corporate":{"type":"boolean","readOnly":true,"description":"Is this a corporate address?"},"primary":{"type":"boolean","description":"Is this the default address?"}}}}}}
```

## The AddressInput object

```json
{"openapi":"3.0.3","info":{"title":"Address API","version":"1.0.0"},"components":{"schemas":{"AddressInput":{"type":"object","description":"Input schema for creating/updating addresses","required":["first_name","last_name","phone_number","country","city","township","line","title"],"properties":{"email":{"type":"string","format":"email"},"phone_number":{"type":"string","description":"International format, min 11 chars (e.g., +905551234567)","minLength":11},"first_name":{"type":"string","minLength":2,"maxLength":30},"last_name":{"type":"string","minLength":2,"maxLength":30},"country":{"type":"integer","description":"Country ID"},"city":{"type":"integer","description":"City ID"},"line":{"type":"string","minLength":10,"maxLength":512,"description":"Street address"},"title":{"type":"string","minLength":2,"maxLength":128,"description":"Address nickname (e.g., \"Ev\", \"İş\")"},"township":{"type":"integer","description":"Township ID"},"district":{"type":"integer","description":"District ID (optional unless ADDRESS_DISTRICT_REQUIRED=True)"},"postcode":{"type":"string"},"notes":{"type":"string"},"company_name":{"type":"string","maxLength":255},"tax_office":{"type":"string","maxLength":255},"tax_no":{"type":"string","maxLength":50},"e_bill_taxpayer":{"type":"boolean","description":"Registered for e-invoicing?"},"retail_store":{"type":"integer","description":"Retail store ID for click-and-collect orders"},"identity_number":{"type":"string","description":"National ID (may be required for large orders)"},"primary":{"type":"boolean","description":"Set as default address?"}}}}}}
```

## The Country object

```json
{"openapi":"3.0.3","info":{"title":"Address API","version":"1.0.0"},"components":{"schemas":{"Country":{"type":"object","properties":{"pk":{"type":"integer"},"is_active":{"type":"boolean"},"name":{"type":"string"},"code":{"type":"string","description":"ISO 3166-1 alpha-2 code"},"translations":{"type":"object","nullable":true}}}}}}
```

## The City object

```json
{"openapi":"3.0.3","info":{"title":"Address API","version":"1.0.0"},"components":{"schemas":{"City":{"type":"object","properties":{"pk":{"type":"integer"},"is_active":{"type":"boolean"},"name":{"type":"string"},"country":{"type":"integer","description":"Country ID"},"translations":{"type":"object","nullable":true},"priority":{"type":"integer"},"postcode":{"type":"string","nullable":true}}}}}}
```

## The Township object

```json
{"openapi":"3.0.3","info":{"title":"Address API","version":"1.0.0"},"components":{"schemas":{"Township":{"type":"object","properties":{"pk":{"type":"integer"},"is_active":{"type":"boolean"},"name":{"type":"string"},"city":{"type":"integer","description":"City ID"},"postcode":{"type":"string","nullable":true},"translations":{"type":"object","nullable":true}}}}}}
```

## The District object

```json
{"openapi":"3.0.3","info":{"title":"Address API","version":"1.0.0"},"components":{"schemas":{"District":{"type":"object","properties":{"pk":{"type":"integer"},"is_active":{"type":"boolean"},"name":{"type":"string"},"city":{"type":"integer","description":"City ID"},"township":{"type":"integer","description":"Township ID"},"postcode":{"type":"string","nullable":true},"translations":{"type":"object","nullable":true}}}}}}
```

## The RetailStore object

```json
{"openapi":"3.0.3","info":{"title":"Address API","version":"1.0.0"},"components":{"schemas":{"RetailStore":{"type":"object","properties":{"pk":{"type":"integer"},"name":{"type":"string"},"township":{"type":"integer"},"district":{"type":"integer","nullable":true},"address":{"type":"string"},"phone_number":{"type":"string"},"fax_phone_number":{"type":"string","nullable":true},"image":{"type":"string","nullable":true,"description":"Image URL"},"image_path":{"type":"string","nullable":true},"erp_code":{"type":"string","nullable":true},"store_hours":{"type":"array","description":"Weekly store hours (7 days, each with [open, close] times)","items":{"type":"array","items":{"type":"string","format":"time","nullable":true}}},"latitude":{"type":"number","format":"float","nullable":true},"longitude":{"type":"number","format":"float","nullable":true},"is_active":{"type":"boolean"},"click_and_collect":{"type":"boolean","description":"Available for pickup orders?"},"store_type":{"type":"integer","nullable":true},"kapida_enabled":{"type":"boolean"},"fast_delivery":{"type":"boolean"},"config":{"type":"object"},"group":{"type":"integer","nullable":true},"sort_order":{"type":"integer"},"translations":{"type":"object"},"related_retail_stores":{"type":"array","items":{"type":"integer"}},"created_date":{"type":"string","format":"date-time"},"modified_date":{"type":"string","format":"date-time"}}}}}}
```

## The PickupLocation object

```json
{"openapi":"3.0.3","info":{"title":"Address API","version":"1.0.0"},"components":{"schemas":{"PickupLocation":{"type":"object","description":"Cargo pickup point (e.g., PTT, cargo office)","properties":{"id":{"type":"string","description":"Pickup location ID from provider"},"name":{"type":"string","description":"Pickup location name"},"type":{"type":"string","description":"Location type"},"supply_chain_company":{"type":"object","nullable":true,"properties":{"name":{"type":"string"}}},"country":{"type":"string","description":"Country code"},"city":{"type":"string","description":"City name"},"township":{"type":"string","nullable":true,"description":"Township name"},"district":{"type":"string","nullable":true,"description":"District name"},"address_text":{"type":"string","description":"Full address text"},"working_hours":{"type":"array","description":"Weekly working hours","items":{"type":"object","properties":{"day_of_week":{"type":"string","description":"Day of week (MONDAY, TUESDAY, etc.)"},"hour_ranges":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","format":"time"},"end":{"type":"string","format":"time"},"service_cost":{"type":"number","format":"decimal"}}}}}}},"currency":{"type":"string","nullable":true},"contact":{"type":"object","nullable":true,"properties":{"related_staff_name":{"type":"string"},"phone_number":{"type":"string"},"email":{"type":"string"}}},"note":{"type":"string","nullable":true}}}}}}
```

## The ExtensionPickupLocation object

```json
{"openapi":"3.0.3","info":{"title":"Address API","version":"1.0.0"},"components":{"schemas":{"ExtensionPickupLocation":{"type":"object","description":"Cargo pickup point from ExtensionPickupLocationProvider (with coordinates and postcode)","properties":{"id":{"type":"string","description":"Pickup location ID from provider"},"name":{"type":"string","description":"Pickup location name"},"type":{"type":"string","description":"Location type"},"country":{"type":"string","description":"Country code"},"city":{"type":"string","description":"City name"},"township":{"type":"string","nullable":true,"description":"Township name"},"district":{"type":"string","nullable":true,"description":"District name"},"address_text":{"type":"string","description":"Full address text"},"coordinates":{"type":"object","description":"Geographic coordinates","properties":{"latitude":{"type":"number","format":"float"},"longitude":{"type":"number","format":"float"}}},"working_hours":{"type":"array","description":"Weekly working hours","items":{"type":"object","properties":{"day_of_week":{"type":"string","description":"Day of week (MONDAY, TUESDAY, etc.)"},"hour_ranges":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","format":"time"},"end":{"type":"string","format":"time"},"service_cost":{"type":"number","format":"decimal"}}}}}}},"contact":{"type":"object","nullable":true,"properties":{"phone_number":{"type":"string"},"email":{"type":"string"}}},"postcode":{"type":"string","nullable":true}}}}}}
```

## The AddressDetailed object

```json
{"openapi":"3.0.3","info":{"title":"Address API","version":"1.0.0"},"components":{"schemas":{"AddressDetailed":{"type":"object","description":"Address with expanded geographic data (full country, city, township, district, user, retail store objects)","properties":{"pk":{"type":"integer","description":"Address ID"},"email":{"type":"string","format":"email","nullable":true},"phone_number":{"type":"string","description":"International format (e.g., +905551234567)"},"first_name":{"type":"string"},"last_name":{"type":"string"},"country":{"$ref":"#/components/schemas/Country"},"city":{"$ref":"#/components/schemas/City"},"line":{"type":"string","description":"Street address, building, apartment"},"title":{"type":"string","description":"Address nickname (e.g., \"Ev\", \"İş\")"},"township":{"$ref":"#/components/schemas/Township"},"district":{"allOf":[{"$ref":"#/components/schemas/District"}],"nullable":true},"postcode":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true},"company_name":{"type":"string","nullable":true},"tax_office":{"type":"string","nullable":true},"tax_no":{"type":"string","nullable":true},"e_bill_taxpayer":{"type":"boolean","nullable":true,"description":"E-invoice taxpayer?"},"hash_data":{"type":"string","readOnly":true,"description":"Address hash for duplicate detection"},"address_type":{"type":"string","readOnly":true},"retail_store":{"allOf":[{"$ref":"#/components/schemas/RetailStore"}],"nullable":true,"description":"Retail store for click-and-collect"},"remote_id":{"type":"string","nullable":true,"description":"External provider address ID"},"identity_number":{"type":"string","nullable":true},"extra_field":{"type":"object","readOnly":true,"description":"Country-specific extra fields"},"user":{"type":"object","readOnly":true,"description":"User object with id, email, first_name, last_name","properties":{"pk":{"type":"integer"},"email":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"}}},"is_corporate":{"type":"boolean","readOnly":true,"description":"Is this a corporate address?"},"primary":{"type":"boolean","description":"Is this the default address?"}}},"Country":{"type":"object","properties":{"pk":{"type":"integer"},"is_active":{"type":"boolean"},"name":{"type":"string"},"code":{"type":"string","description":"ISO 3166-1 alpha-2 code"},"translations":{"type":"object","nullable":true}}},"City":{"type":"object","properties":{"pk":{"type":"integer"},"is_active":{"type":"boolean"},"name":{"type":"string"},"country":{"type":"integer","description":"Country ID"},"translations":{"type":"object","nullable":true},"priority":{"type":"integer"},"postcode":{"type":"string","nullable":true}}},"Township":{"type":"object","properties":{"pk":{"type":"integer"},"is_active":{"type":"boolean"},"name":{"type":"string"},"city":{"type":"integer","description":"City ID"},"postcode":{"type":"string","nullable":true},"translations":{"type":"object","nullable":true}}},"District":{"type":"object","properties":{"pk":{"type":"integer"},"is_active":{"type":"boolean"},"name":{"type":"string"},"city":{"type":"integer","description":"City ID"},"township":{"type":"integer","description":"Township ID"},"postcode":{"type":"string","nullable":true},"translations":{"type":"object","nullable":true}}},"RetailStore":{"type":"object","properties":{"pk":{"type":"integer"},"name":{"type":"string"},"township":{"type":"integer"},"district":{"type":"integer","nullable":true},"address":{"type":"string"},"phone_number":{"type":"string"},"fax_phone_number":{"type":"string","nullable":true},"image":{"type":"string","nullable":true,"description":"Image URL"},"image_path":{"type":"string","nullable":true},"erp_code":{"type":"string","nullable":true},"store_hours":{"type":"array","description":"Weekly store hours (7 days, each with [open, close] times)","items":{"type":"array","items":{"type":"string","format":"time","nullable":true}}},"latitude":{"type":"number","format":"float","nullable":true},"longitude":{"type":"number","format":"float","nullable":true},"is_active":{"type":"boolean"},"click_and_collect":{"type":"boolean","description":"Available for pickup orders?"},"store_type":{"type":"integer","nullable":true},"kapida_enabled":{"type":"boolean"},"fast_delivery":{"type":"boolean"},"config":{"type":"object"},"group":{"type":"integer","nullable":true},"sort_order":{"type":"integer"},"translations":{"type":"object"},"related_retail_stores":{"type":"array","items":{"type":"integer"}},"created_date":{"type":"string","format":"date-time"},"modified_date":{"type":"string","format":"date-time"}}}}}}
```


---

# 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/commerce-openapis/address/models.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.
