Retrieve Profile Details
Retrieves the authenticated customer's profile information.
HTTP Request
Retrieve Profile:
GET/api/shop/customers/me
Authorization
Authorization
- Required: Yes
- Permission: Authenticated Customer
- Authentication: Token-based (`Authorization: Token <your_api_key>`)
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3# Get customer profile
4response = requests.get('http://www.example.com/api/shop/customers/me',
5 headers={'Authorization': 'Token <your_api_key>'}
6)
7print(response.json())1# Get customer profile
2curl "http://www.example.com/api/shop/customers/me" -H "Authorization: Token <your_api_key>"Status Codes
| Code | Description |
|---|---|
| 200 | Profile retrieved successfully |
| 401 | Unauthorized — authentication required |
| 400 | Bad request — validation errors |
| 500 | Internal server error |
Response Fields
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the customer |
| username | String | Customer's username |
| mobile_number | String | Customer's phone number (read-only) |
| String | Customer's email address (read-only) | |
| avatar | String | URL to customer's avatar image |
| first_name | String | Customer's first name |
| last_name | String | Customer's last name |
| full_name | String | Customer's full name (computed field) |
| gender | String | Customer's gender |
| is_profile_completed | Boolean | Whether the profile is completed |
Example Response
{
"id": 1,
"username": "behrooz3500",
"mobile_number": "09308744204",
"email": "behrooz21@hotmail.com",
"avatar": "http://127.0.0.1:8000/media/users/avatars/photo22132188258.jpg",
"first_name": "behrooz",
"last_name": "ghorbanie",
"full_name": "behrooz ghorbanie",
"gender": "male",
"is_profile_completed": true
}