Skip to main content

Retrieve Customer Address

Retrieves detailed information about a specific customer address.

HTTP Request

GET/api/customers/:customer_pk/addresses/:id

Authorization

Authorization

  • Required: Yes
  • Permission: Staff or Admin
  • Authentication: Token-based (Authorization: Token <your_api_key>)

Path Parameters

ParameterTypeRequiredDescription
customer_pkIntegerYesUnique ID of the customer
idIntegerYesUnique ID of the address

Example Requests

1import requests
2
3response = requests.get('http://www.example.com/api/customers/123/addresses/456', 
4  headers={'Authorization': 'Token <your_api_key>'}
5)
6print(response.json())

Status Codes

CodeDescription
200Customer address retrieved successfully
401Unauthorized — authentication required
403Forbidden — insufficient permissions
404Customer or address not found
500Internal server error

Response Fields

FieldTypeDescription
idIntegerUnique ID of the address
defaultBooleanWhether this is the customer's default address
country_dataObjectCountry information with id, name, etc.
state_dataObjectState information with id, name, etc.
city_dataObjectCity information with id, name, etc.
addressStringStreet address
postal_codeStringPostal/ZIP code
first_nameStringFirst name on the address
last_nameStringLast name on the address
national_codeStringNational identification code
mobile_numberStringMobile phone number for this address
textStringAdditional text/notes for the address
created_atString (ISO 8601)Timestamp when address was created
updated_atString (ISO 8601)Timestamp when address was last updated

Country Data Structure

FieldTypeDescription
idIntegerUnique ID of the country
nameStringName of the country
codeStringISO country code (e.g., US, CA)

State Data Structure

FieldTypeDescription
idIntegerUnique ID of the state
nameStringName of the state
codeStringState code (if applicable)

City Data Structure

FieldTypeDescription
idIntegerUnique ID of the city
nameStringName of the city