Skip to main content

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​

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())

Status Codes​

CodeDescription
200Profile retrieved successfully
401Unauthorized — authentication required
400Bad request — validation errors
500Internal server error

Response Fields​

FieldTypeDescription
idIntegerUnique ID of the customer
usernameStringCustomer's username
mobile_numberStringCustomer's phone number (read-only)
emailStringCustomer's email address (read-only)
is_email_verifiedBooleanCustomer's email verified or not (read-only)
avatarStringURL to customer's avatar image
first_nameStringCustomer's first name
last_nameStringCustomer's last name
full_nameStringCustomer's full name (computed field)
genderStringCustomer's gender
is_profile_completedBooleanWhether the profile is completed
invite_codeStringCustomer's invite code
invitees_countIntegerThe count of customers that invited by this customer
inviteesArray[Object]List of customers that invited by this customer

Invitees Object Structure

FieldTypeDescription
idIntegerUnique ID of the invited customer
usernameStringInvited customer's username
full_nameStringInvited customer's full name (computed field)

Example Response​

{
"id": 1,
"username": "behrooz3500",
"mobile_number": "09308744204",
"email": "behrooz21@hotmail.com",
"avatar": "http://example.com/media/users/avatars/photo22132188258.jpg",
"first_name": "behrooz",
"last_name": "ghorbanie",
"full_name": "behrooz ghorbanie",
"gender": "male",
"is_profile_completed": true,
"invite_code": "DLrNVOM",
"invitees_count": 2,
"invitees": [
{
"id": 12,
"username": "sara",
"full_name": "سارا حسن زاده",
},
{
"id": 54,
"username": "sina",
"full_name": "سینا خاشعی",
}
]
}