LogoLogo
  • Welcome to Akinon Documentation
  • Products
    • ACC
    • Omnitron
    • Commerce
    • Order Management System (OMS)
    • Instore
    • Integrator
    • Marketplace Dashboard (MPD)
    • Project Zero (PZ)
    • Seller Center
    • Akifast
    • App Maker
  • API Reference
    • Welcome to Akinon API Reference
  • Omnitron
    • Getting Started
    • Integration
      • Product
        • Product
        • Pre-Product
        • Attribute
        • Attribute Value
        • Attribute Set
        • Product Image
      • Price
        • Price List
        • Product Price
        • Currency Unit Table
      • Stock
        • Stock List
        • Product Stock
      • Order
        • Get Orders
        • Search Order
        • Get Order Detail by Order Number
        • Get Order Item Detail
        • Orders ID Detail Integration
        • Orders Waiting to Send to ERP
        • Update Order and Order Item
        • Stock Reservation Release
        • Order Cancellation
        • Cancellation & Refund Pending Orders
        • Order Discount Items
        • Order Status Codes & Cancellation Statuses
      • Migration
        • Getting Started
        • User Migration
        • Address Migration
        • Old Order Migration
        • Old Order Item Migration
        • View Migration Progress
        • Currency Options
    • PIM
      • Attributes & Sets
      • Mapping
      • Localization
      • Media
    • Catalogue
      • Introduction
      • Price List
      • Stock List
      • Catalogue Item
      • Category Trees
      • Product Collection
      • Product Sorting
    • Channels
      • Introduction
      • Payments
      • Customers
    • Order
      • Getting Started
      • Fulfillment
      • Cancellations & Refunds
    • Retail Stores
      • Retail Stores
    • User Management
      • Roles & Permissions
      • Add & Remove
    • Whippy Ware
      • Introduction
      • Stock
      • Stock Lists
      • Stock List Rules
      • Stock Providers
      • Stock Locations
  • Omnitron OpenAPIs
    • Without Server
      • Customers
      • Reporting
      • Deleted Items
      • Pos
      • AttributeValues
      • Attribute Values
      • Providers
      • LDAPProviders
      • Healthcheck
      • LoyaltyTransactions
      • Policies
      • Exports
      • Dashboard
      • AuthTOTP
      • Price Lists
      • ProductPrices
      • Districts
      • Cities
      • Countries
      • Townships
      • PrometheusMetrics
      • Language
      • Content Types
      • Mappings
      • Applications
      • ApplicationPermissions
      • Error Reports
      • MailTemplates
      • UploadLogo
      • SalesChannelMarketPlaceAttributeSetConfig
      • SalesChannelCancellationRequestImage
      • SalesChannelCities
      • SalesChannelCancellationReasons
      • SalesChannelCargoCompany
      • SalesChannelProductImage
      • SalesChannelAttributeConfig
      • SalesChannelAttributeValueConfig
      • SalesChannelTownships
      • SalesChannelCustomers
      • SalesChannelFailedIntegrations
      • SalesChannelGetStockList
      • SalesChannelRetailStore
      • IntegrationActions
      • SalesChannelOrderShippingInfo
      • SalesChannelBatchRequests
      • SalesChannelAddresses
      • SalesChannelMarketPlaceAttributeSet
      • SalesChannelErrorReports
      • SalesChannelCategoryNodes
      • SalesChannelDistricts
      • SalesChannelProductStock
      • SalesChannelExtraProductStock
      • SalesChannelOrders
      • SalesChannelCancellationPlans
      • SalesChannelExtraProductPrices
      • SalesChannelProduct
      • SalesChannelAttributeSchemas
      • SalesChannelProductCategories
      • SalesChannelCancellationRequests
      • SalesChannelMarketPlaceAttributeValue
      • SalesChannelMappedProduct
      • SalesChannelMarketPlaceAttribute
      • SalesChannelOrderItem
      • SalesChannelProductPrice
      • SalesChannelCreateOrder
      • GetPriceList
      • SalesChannelCountries
      • SalesChannelGetPriceList
      • SalesChannelCategoryTree
    • With Server
      • Customers
      • Reporting
      • Deleted Items
      • Pos
      • AttributeValues
      • Attribute Values
      • Providers
      • LDAPProviders
      • Healthcheck
      • LoyaltyTransactions
      • Policies
      • Exports
      • Dashboard
      • AuthTOTP
      • Price Lists
      • ProductPrices
      • Districts
      • Cities
      • Countries
      • Townships
      • PrometheusMetrics
      • Language
      • Mappings
      • Content Types
      • Applications
      • ApplicationPermissions
      • Error Reports
      • MailTemplates
      • UploadLogo
      • SalesChannelMarketPlaceAttributeSetConfig
      • SalesChannelCancellationRequestImage
      • SalesChannelCities
      • SalesChannelCancellationReasons
      • SalesChannelCargoCompany
      • SalesChannelProductImage
      • SalesChannelAttributeConfig
      • SalesChannelAttributeValueConfig
      • SalesChannelTownships
      • SalesChannelCustomers
      • SalesChannelFailedIntegrations
      • SalesChannelGetStockList
      • IntegrationActions
      • SalesChannelRetailStore
      • SalesChannelOrderShippingInfo
      • SalesChannelBatchRequests
      • SalesChannelAddresses
      • SalesChannelMarketPlaceAttributeSet
      • SalesChannelErrorReports
      • SalesChannelDistricts
      • SalesChannelCategoryNodes
      • SalesChannelProductStock
      • SalesChannelExtraProductStock
      • SalesChannelCountries
      • SalesChannelOrders
      • SalesChannelProduct
      • SalesChannelCancellationPlans
      • SalesChannelExtraProductPrices
      • SalesChannelProductCategories
      • SalesChannelAttributeSchemas
      • SalesChannelCancellationRequests
      • SalesChannelMarketPlaceAttributeValue
      • SalesChannelMappedProduct
      • SalesChannelMarketPlaceAttribute
      • SalesChannelOrderItem
      • SalesChannelProductPrice
      • SalesChannelCreateOrder
      • GetPriceList
      • SalesChannelGetPriceList
      • SalesChannelCategoryTree
  • Commerce
    • Users
      • Getting Started
      • User Management & Authentication
      • Password & OTP Operations
      • User Profile & Segment Management
      • User Payment & Card Management
      • User Orders & Cancellations
      • Anonymous User Orders & Cancellations
      • User Support & Conversation
      • Captcha Validation
      • Currency & Akifast Operations
    • Checkout
      • Payment Related
      • Payment Strategy Related
      • Shipping Related
      • Independent Pages
    • Product
    • User Collections
    • Basket
    • Discount
    • Autocomplete
    • Breadcrumb
    • Pretty URLs
    • Menu
    • Widgets
    • Loyalty Accounts
    • Address Migration
    • Index Configuration
    • Favourite Products
    • User Address
    • Data Warehouse
    • Introduction
      • Filtering Parameters
    • Data Warehouse
    • Default
  • OMS
    • Package Services
    • Package Item Services
    • Package Denial Reason Services
    • Order Services
    • Order Item Services
    • Transfer Order Services
    • Transfer Item Services
    • Channel Services
    • Cancellation Plan Services
    • Cancellation Reason Services
    • Address Setup Services
    • City Services
    • District Services
    • Township Services
    • Stock Location Address Services
    • Webhook Setup Services
    • Webhook Event Services
    • Omnitron Order Webhooks
    • Undelivered Webhook Event Services
    • Inventory Discrepancy Services
    • OMS Setup Services
    • UI Settings Services
    • OMS Audit Events Service
    • Customer Address Services
    • Application Settings Services
    • Content Type Services
    • Customer Services
    • Channel Setup Services
    • Demo Data Service
    • Order Execution Plan Services
    • Invoice Services
    • Localization Services
    • Action Log Services
    • Order Log Services
    • Celery Metrics Service
    • Stock Location Services
    • Stock Location Address Services
    • Stock Location Sender Address Services
    • Stock Location Sender Address Setup Services
    • Cargo Company Condition Services
    • Permission Group Services
  • Instore
    • Password Reset Services
  • Integrator
    • Projects
    • Flows
    • Logs
  • Seller Center
    • Languages
    • Categories
    • Introduction
    • Products
    • Packages
    • Orders
    • Claims
    • Shipping Methods
  • Akifast
    • Authentication
  • B2B
    • Quotation
    • Basket
    • Division
    • User
    • Staff User
    • Groups
    • Notification
    • Notification Template
  • Flows
    • Shipment Flows
    • Payment Flows
    • SMS Flows
    • Basket Offer Flows
Powered by GitBook

© 2025 Akinon. All rights reserved.

On this page
  • POST Create User Address
  • GET User Address List
  • GET Single User Address
  • GET Single User Address Detailed
  • PUT Update User Address
  • PATCH Partial Update User Address
  • DELETE Delete User Address
  • GET Address Country
  • GET Address City
  • GET Address Township
  • GET Address District

Was this helpful?

  1. Commerce

User Address

The User Address APIs provide a set of endpoints to manage the addresses associated with a user. This includes creating, retrieving, updating, and deleting addresses. Each operation is authenticated through an authorization token, ensuring that only authorized users can manage their address data.

This documentation provides examples of how to use these endpoints with sample requests and responses, making it easier for developers to integrate user address management into their applications.

POST Create User Address

Creates a new address for the user authenticated by the provided Authorization token.

Path: https://{storefront_url}/address/

Headers:

  • Authorization: Token <token>

Body Parameters

Property
Data Type
Required
Descriptions

title

string

true

Title of the address.

first_name

string

true

The first name of the user.

last_name

string

true

The last name of the user.

phone_number

string

true

The phone number of the user.

country

integer

true

The ID of the selected country.

city

integer

true

The ID of the selected city.

township

integer

true

The ID of the selected township.

district

integer

false

The ID of the selected district.

postcode

string

false

Postcode of the address.

line

string

true

Address details.

notes

string

false

User's notes about the address.

identity_number

string

false

The user's identity number.

primary

boolean

false

Indicates if this is the primary address.

is_corporate

boolean

false

Indicates if this is a corporate address.

company_name

string

false

Company name if it is a corporate address.

tax_no

string

false

Tax number if it is a corporate address.

tax_office

string

false

Tax office if it is a corporate address.

e_bill_taxpayer

boolean

false

Indicates if it is an e-bill taxpayer address.

Example Request

import requests

url = "https://{storefront_url}/address/"

payload = {
	"country": "1",
	"is_corporate": "true",
	"type": "company",
	"title": "test",
	"first_name": "test",
	"last_name": "test",
	"phone_number": "05555555555",
	"city": "5",
	"township": "28",
	"district": "977",
	"line": "test test test test test test",
	"postcode": "34100",
	"company_name": "test",
	"tax_no": "13213213213",
	"tax_office": "321321321321",
	"e_bill_taxpayer": "true",
	"identity_number": "231321321321",
	"primary": True,
	"notes": "1232321",
}

headers = {"Content-Type": "application/json"}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Example Response (201 Created)

{
	"pk": 1,
	"email": "akinon@akinon.com",
	"phone_number": "05555555555",
	"first_name": "test",
	"last_name": "test",
	"country": 1,
	"city": 5,
	"line": "test test test test test test",
	"title": "test",
	"township": 28,
	"district": 977,
	"postcode": "34100",
	"notes": "1232321",
	"company_name": "test",
	"tax_office": "321321321321",
	"tax_no": "13213213213",
	"e_bill_taxpayer": true,
	"hash_data": "7bbe2ebdd6891cfc7a26d4b9fa2cfff2",
	"address_type": "customer",
	"retail_store": null,
	"remote_id": null,
	"identity_number": "231321321321",
	"extra_field": null,
	"user": 1,
	"is_corporate": true,
	"primary": true
}

Response Status Codes

  • 201 Created: The address was successfully created.

  • 400 Bad Request: The request was malformed or missing required parameters.

  • 401 Unauthorized: The user is not authorized to perform this action.

  • 429 Too Many Requests: The request limit has been exceeded.

  • 500 Internal Server Error: An unexpected error occurred on the server.


GET User Address List

Retrieves a list of all addresses associated with the authenticated user.

Path: https://{storefront_url}/address/detailed/

Headers:

  • Authorization: Token <token>

Example Request

import requests

url = "https://{storefront_url}/address/detailed/"

headers = {
  'Authorization': 'Token <token>'
}

response = requests.get(url, headers=headers)

print(response.text)

Example Response (200 OK)

{
   "count": 17,
   "next": null,
   "previous": null,
   "results": [
       {
           "pk": 1,
           "email": "akinon@akinon.com",
           "phone_number": "05555555555",
           "first_name": "John",
           "last_name": "Doe",
           "country": {
               "pk": 1,
               "is_active": true,
               "name": "Türkiye",
               "code": "tr",
               "translations": null
           },
           "city": {
               "pk": 5,
               "is_active": true,
               "name": "ADIYAMAN",
               "country": 1,
               "translations": null,
               "priority": null,
               "postcode": null
           },
           "line": "test test test test",
           "title": "test",
           "township": {
               "pk": 28,
               "is_active": true,
               "name": "BESNİ",
               "city": 5,
               "postcode": null
           },
           "district": {
               "pk": 977,
               "is_active": true,
               "name": "ABIMISTIK MAH (ÇAKIRHÜYÜK BELDESİ)",
               "city": 5,
               "township": 28,
               "postcode": null
           },
           "postcode": "34100",
           "notes": "1232321",
           "company_name": "test",
           "tax_office": "321321321321",
           "tax_no": "13213213213",
           "e_bill_taxpayer": true,
           "hash_data": "7bbe2ebdd6891cfc7a26d4b9fa2cfff2",
           "address_type": "customer",
           "retail_store": null,
           "remote_id": null,
           "identity_number": "231321321321",
           "extra_field": null,
           "user": {
               "pk": 3138,
               "username": "58aae3c747a342ae4684b08b05d750ebe6fb1bfa126056dcf2862db1aa398ff4",
               "first_name": "John",
               "last_name": "Doe",
               "email": "akinon@akinon.com",
               "is_active": true,
               "date_joined": "2022-07-25T15:06:33.969798Z",
               "last_login": "2024-05-26T23:43:04.439476Z",
               "email_allowed": false,
               "sms_allowed": false,
               "call_allowed": null,
               "gender": null,
               "attributes": {
                   "register_client_type": "default",
                   "logged_ip": "127.0.0.1",
                   "confirm": true
               },
               "phone": "05555555555",
               "date_of_birth": null,
               "attributes_kwargs": {},
               "user_type": "registered",
               "modified_date": "2024-04-30T08:28:19.030191Z"
           },
           "is_corporate": true,
           "primary": true
       }

   ]
}

Response Status Codes

  • 200 OK: The list of addresses was successfully retrieved.

  • 400 Bad Request: The request was malformed or missing required parameters.

  • 401 Unauthorized: The user is not authorized to perform this action.

  • 429 Too Many Requests: The request limit has been exceeded.

  • 500 Internal Server Error: An unexpected error occurred on the server.


GET Single User Address

Retrieves information about a specific address associated with the authenticated user.

Path: https://{storefront_url}/address/<address-id>/

Headers:

  • Authorization: Token <token>

Example Request

import requests

url = "https://{storefront_url}/address/<address-id>/"

headers = {
  'Authorization': 'Token <key>'
}

response = requests.get(url, headers=headers)

print(response.text)

Example Response (200 OK)

{
	"pk": 1,
	"email": "akinon@akinon.com",
	"phone_number": "05555555555",
	"first_name": "John",
	"last_name": "Doe",
	"country": 1,
	"city": 5,
	"line": "test",
	"title": "test",
	"township": 28,
	"district": 977,
	"postcode": "34100",
	"notes": "test notes",
	"company_name": "test",
	"tax_office": "321321321321",
	"tax_no": "13213213213",
	"e_bill_taxpayer": true,
	"hash_data": "7bbe2ebdd6891cfc7a26d4b9fa2cfff2",
	"address_type": "customer",
	"retail_store": null,
	"remote_id": null,
	"identity_number": "231321321321",
	"extra_field": null,
	"user": 1,
	"is_corporate": true,
	"primary": true
}

Response Status Codes

  • 200 OK: The address details were successfully retrieved.

  • 400 Bad Request: The request was malformed or missing required parameters.

  • 401 Unauthorized: The user is not authorized to perform this action.

  • 429 Too Many Requests: The request limit has been exceeded.

  • 500 Internal Server Error: An unexpected error occurred on the server.


GET Single User Address Detailed

Retrieves detailed information about a specific address associated with the authenticated user.

Path: https://{storefront_url}/address/<address-id>/detailed/

Headers:

  • Authorization: Token <token>

Example Request

import requests

url = "https://{storefront_url}/address/<address-id>/detailed/"

headers = {
  'Authorization': 'Token <key>'
}

response = requests.get(url, headers=headers)

print(response.text)

Example Response (200 OK)

{
   "pk": 1,
   "email": "akinon@akinon.com",
   "phone_number": "05555555555",
   "first_name": "John",
   "last_name": "Doe",
   "country": {
       "pk": 1,
       "is_active": true,
       "name": "Türkiye",
       "code": "tr",
       "translations": null
   },
   "city": {
       "pk": 5,
       "is_active": true,
       "name": "ADIYAMAN",
       "country": 1,
       "translations": null,
       "priority": null,
       "postcode": null
   },
   "line": "test",
   "title": "test",
   "township": {
       "pk": 28,
       "is_active": true,
       "name": "BESNİ",
       "city": 5,
       "postcode": null
   },
   "district": {
       "pk": 977,
       "is_active": true,
       "name": "ABIMISTIK MAH (ÇAKIRHÜYÜK BELDESİ)",
       "city": 5,
       "township": 28,
       "postcode": null
   },
   "postcode": "34100",
   "notes": "1232321",
   "company_name": "test",
   "tax_office": "321321321321",
   "tax_no": "13213213213",
   "e_bill_taxpayer": true,
   "hash_data": "7bbe2ebdd6891cfc7a26d4b9fa2cfff2",
   "address_type": "customer",
   "retail_store": null,
   "remote_id": null,
   "identity_number": "231321321321",
   "extra_field": null,
   "user": {
       "pk": 3138,
       "username": "58aae3c747a342ae4684b08b05d750ebe6fb1bfa126056dcf2862db1aa398ff4",
       "first_name": "John",
       "last_name": "Doe",
       "email": "ibrahim.onder@akinon.com",
       "is_active": true,
       "date_joined": "2022-07-25T15:06:33.969798Z",
       "last_login": "2024-05-26T23:43:04.439476Z",
       "email_allowed": false,
       "sms_allowed": false,
       "call_allowed": null,
       "gender": null,
       "attributes": {
           "register_client_type": "default",
           "logged_ip": "127.0.0.1",
           "confirm": true
       },
       "phone": "05555555555",
       "date_of_birth": null,
       "attributes_kwargs": {},
       "user_type": "registered",
       "modified_date": "2024-04-30T08:28:19.030191Z"
   },
   "is_corporate": true,
   "primary": true
}

Response Status Codes

  • 200 OK: The address details were successfully retrieved.

  • 400 Bad Request: The request was malformed or missing required parameters.

  • 401 Unauthorized: The user is not authorized to perform this action.

  • 429 Too Many Requests: The request limit has been exceeded.

  • 500 Internal Server Error: An unexpected error occurred on the server.


PUT Update User Address

Updates a specific address associated with the authenticated user.

Path: https://{storefront_url}/address/<address-id>/

Headers:

  • Authorization: Token <token>

Body Parameters

Property
Data Type
Required
Descriptions

title

string

true

Title of the address.

first_name

string

true

The first name of the user.

last_name

string

true

The last name of the user.

phone_number

string

true

The phone number of the user.

country

integer

true

The ID of the selected country.

city

integer

true

The ID of the selected city.

township

integer

true

The ID of the selected township.

district

integer

false

The ID of the selected district.

postcode

string

false

Postcode of the address.

line

string

true

Address details.

notes

string

false

User's notes about the address.

identity_number

string

false

The user's identity number.

primary

boolean

false

Indicates if this is the primary address.

is_corporate

boolean

false

Indicates if this is a corporate address.

company_name

string

false

Company name if it is a corporate address.

tax_no

string

false

Tax number if it is a corporate address.

tax_office

string

false

Tax office if it is a corporate address.

e_bill_taxpayer

boolean

false

Indicates if it is an e-bill taxpayer address.

Example Request

import requests

url = "https://{storefront_url}/address/<address-id>/"

payload = {
	"country": "1",
	"is_corporate": "true",
	"type": "company",
	"title": "test",
	"first_name": "test",
	"last_name": "test",
	"phone_number": "05555555555",
	"city": "5",
	"township": "28",
	"district": "977",
	"line": "new address line",
	"postcode": "34100",
	"company_name": "test",
	"tax_no": "13213213213",
	"tax_office": "321321321321",
	"e_bill_taxpayer": "true",
	"identity_number": "231321321321",
	"primary": True,
	"notes": "1232321",
}

headers = {"Content-Type": "application/json"}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.text)

Example Response (200 OK)

{
	"pk": 1,
	"email": "akinon@akinon.com",
	"phone_number": "05555555555",
	"first_name": "test",
	"last_name": "test",
	"country": 1,
	"city": 5,
	"line": "test test test test test test",
	"title": "test",
	"township": 28,
	"district": 977,
	"postcode": "34100",
	"notes": "1232321",
	"company_name": "test",
	"tax_office": "321321321321",
	"tax_no": "13213213213",
	"e_bill_taxpayer": true,
	"hash_data": "7bbe2ebdd6891cfc7a26d4b9fa2cfff2",
	"address_type": "customer",
	"retail_store": null,
	"remote_id": null,
	"identity_number": "231321321321",
	"extra_field": null,
	"user": 1,
	"is_corporate": true,
	"primary": true
}

Response Status Codes

  • 200 OK: The address was successfully updated.

  • 400 Bad Request: The request was malformed or missing required parameters.

  • 401 Unauthorized: The user is not authorized to perform this action.

  • 429 Too Many Requests: The request limit has been exceeded.

  • 500 Internal Server Error: An unexpected error occurred on the server.


PATCH Partial Update User Address

Partially updates a specific address associated with the authenticated user.

Path: https://{storefront_url}/address/<address-id>/

Headers:Authorization: Token <token>

Body Parameters

Property
Data Type
Required
Descriptions

title

string

true

Title of the address.

first_name

string

true

The first name of the user.

last_name

string

true

The last name of the user.

phone_number

string

true

The phone number of the user.

country

integer

true

The ID of the selected country.

city

integer

true

The ID of the selected city.

township

integer

true

The ID of the selected township.

district

integer

false

The ID of the selected district.

postcode

string

false

Postcode of the address.

line

string

true

Address details.

notes

string

false

User's notes about the address.

identity_number

string

false

The user's identity number.

primary

boolean

false

Indicates if this is the primary address.

is_corporate

boolean

false

Indicates if this is a corporate address.

company_name

string

false

Company name if it is a corporate address.

tax_no

string

false

Tax number if it is a corporate address.

tax_office

string

false

Tax office if it is a corporate address.

e_bill_taxpayer

boolean

false

Indicates if it is an e-bill taxpayer address.

Example Request

import requests

url = "https://{storefront_url}/address/<address-id>/"

payload = {
	"primary": True,
}

headers = {"Content-Type": "application/json"}

response = requests.request("PATCH", url, headers=headers, data=payload)

print(response.text)

Example Response (200 OK)

{
	"pk": 1,
	"email": "akinon@akinon.com",
	"phone_number": "05555555555",
	"first_name": "test",
	"last_name": "test",
	"country": 1,
	"city": 5,
	"line": "test test test test test test",
	"title": "test",
	"township": 28,
	"district": 977,
	"postcode": "34100",
	"notes": "1232321",
	"company_name": "test",
	"tax_office": "321321321321",
	"tax_no": "13213213213",
	"e_bill_taxpayer": true,
	"hash_data": "7bbe2ebdd6891cfc7a26d4b9fa2cfff2",
	"address_type": "customer",
	"retail_store": null,
	"remote_id": null,
	"identity_number": "231321321321",
	"extra_field": null,
	"user": 1,
	"is_corporate": true,
	"primary": true
}

Response Status Codes

  • 200 OK: The address was successfully updated.

  • 400 Bad Request: The request was malformed or missing required parameters.

  • 401 Unauthorized: The user is not authorized to perform this action.

  • 429 Too Many Requests: The request limit has been exceeded.

  • 500 Internal Server Error: An unexpected error occurred on the server.


DELETE Delete User Address

Deletes a specific address associated with the authenticated user.

Path: https://{storefront_url}/address/<address-id>/

Headers:Authorization: Token <token>

Example Request

import requests

url = "https://{storefront_url}/address/<address-id>/"

headers = {
  'Authorization': 'Token <key>'
}

response = requests.request("DELETE", url, headers=headers)

print(response.text)

Example Response (204 No Content)

If the request is processed successfully, the response is shown with code 204 and the address is deleted. If the request fails, an appropriate error code along with an error message is returned.

Response Status Codes

  • 204 No Content: The address was successfully deleted.

  • 400 Bad Request: The request was malformed or missing required parameters.

  • 401 Unauthorized: The user is not authorized to perform this action.

  • 429 Too Many Requests: The request limit has been exceeded.

  • 500 Internal Server Error: An unexpected error occurred on the server.


GET Address Country

This endpoint is used to list all available countries.

Path: https://{storefront_url}/address/country/

Example Request

import requests

url = "https://{storefront_url}/address/country/"

response = requests.get(url)

print(response.text)

Example Response (200 OK)

{
	"count": 2,
	"next": null,
	"previous": null,
	"results": [
    	{
        	"pk": 100,
        	"is_active": true,
        	"name": "romania",
        	"code": "RO",
        	"translations": null
    	},
    	{
        	"pk": 1,
        	"is_active": true,
        	"name": "Türkiye",
        	"code": "tr",
        	"translations": null
    	}
	]
}

Response Status Codes

  • 200 OK: The request was successful, and the requested resource is returned in the response.

  • 400 Bad Request: The request was malformed or contained invalid parameters.

  • 401 Unauthorized: The user is not authorized to access the requested resource.

  • 429 Too Many Requests: The request rate limit has been exceeded.

  • 500 Internal Server Error: An unexpected error occurred on the server.


GET Address City

This endpoint is used to list all cities for a specified country.

Path: https://{storefront_url}/address/address/city/

Request Parameters

Property
Data Type
Descriptions

country

id

The ID of the country.

Example Request

import requests

url = "https://{storefront_url}/address/city/?country=<country-id>"

response = requests.get(url)

print(response.text)

Example Response (200 OK)

{
	"count": 83,
	"next": null,
	"previous": null,
	"results": [
    	{
        	"pk": 5,
        	"is_active": true,
        	"name": "ADIYAMAN",
        	"country": 1,
        	"translations": null,
        	"priority": null,
        	"postcode": null
    	}
	]
}

Response Status Codes

  • 200 OK: The request was successful, and the requested resource is returned in the response.

  • 400 Bad Request: The request was malformed or contained invalid parameters.

  • 401 Unauthorized: The user is not authorized to access the requested resource.

  • 429 Too Many Requests: The request rate limit has been exceeded.

  • 500 Internal Server Error: An unexpected error occurred on the server.


GET Address Township

This endpoint is used to list all townships for a specified city.

Path: https://{storefront_url}/address/address/township/

Request Parameters

Property
Data Type
Descriptions

city

id

The ID of the city.

Example Request

import requests

url = "https://{storefront_url}/address/township/?city=<city-id>"

response = requests.get(url)

print(response.text)

Example Response (200 OK)

{
	"count": 9,
	"next": null,
	"previous": null,
	"results": [
    	{
        	"pk": 20,
        	"is_active": true,
        	"name": "TUT",
        	"city": 5,
        	"postcode": null
    	}
	]
}

Response Status Codes

  • 200 OK: The request was successful, and the requested resource is returned in the response.

  • 400 Bad Request: The request was malformed or contained invalid parameters.

  • 401 Unauthorized: The user is not authorized to access the requested resource.

  • 429 Too Many Requests: The request rate limit has been exceeded.

  • 500 Internal Server Error: An unexpected error occurred on the server.


GET Address District

This endpoint is used to list all districts for a specified township.

Path: https://{storefront_url}/address/address/district/

Request Parameters

Property
Data Type
Descriptions

township

id

The ID of the township.

Example Request

import requests

url = "https://{storefront_url}/address/district/?township=<township-id>"

response = requests.get(url)

print(response.text)

Example Response (200 OK)

{
	"count": 154,
	"next": null,
	"previous": null,
	"results": [
    	{
        	"pk": 872,
        	"is_active": true,
        	"name": "ZORMAĞARA MAH (YENİKÖY KÖYÜ)",
        	"city": 5,
        	"township": 28,
        	"postcode": null
    	}
	]
}

Response Status Codes

  • 200 OK: The request was successful, and the requested resource is returned in the response.

  • 400 Bad Request: The request was malformed or contained invalid parameters.

  • 401 Unauthorized: The user is not authorized to access the requested resource.

  • 429 Too Many Requests: The request rate limit has been exceeded.

  • 500 Internal Server Error: An unexpected error occurred on the server.

PreviousFavourite ProductsNextData Warehouse

Was this helpful?