Get All Addresses
Get a paginated list of all addresses for the authenticated user.
Endpoint
Authentication
Required (User role)
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page |
integer | Yes | Page number (starts at 1) |
count |
integer | Yes | Items per page (max 100) |
search |
string | No | Search by zip code, address, or phone (case-insensitive) |
Response
Success (200 OK)
{
"count": 5,
"data": [
{
"id": 1,
"user_id": 1,
"user": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone": "+994501234567",
"profile_photo": "",
"preferred_language": "AZERBAIJANI",
"role": "1",
"created": "2025-01-15T10:30:00Z"
},
"city_id": 1,
"city": {
"id": 1,
"name": "Baku",
"country_id": 1,
"country": {
"id": 1,
"name": "Azerbaijan",
"created": "2025-01-15T10:30:00Z"
},
"created": "2025-01-15T10:30:00Z"
},
"zip_code": "AZ1000",
"address": "123 Main Street",
"phone": "+994501234567",
"created": "2025-01-15T10:30:00Z"
}
]
}
Error Responses
Unauthorized (401)
Pagination Error (400)
Example Request
curl -X GET "https://api.luxmart.site/v1/accounts/address/?page=1&count=20&search=baku" \
-H "Authorization: Token your_access_token"
Notes
- Only returns addresses for the authenticated user
- Only returns non-deleted addresses
- Search matches against zip_code, address, or phone
- Results are ordered by ID descending (newest first)