Skip to content

Get Own Profile

Get the authenticated user's own profile information.

Endpoint

GET /v1/accounts/user/site/

Authentication

Required (User role)

Request Body

No body required.

Response

Success (200 OK)

{
  "id": 1,
  "first_name": "John",
  "last_name": "Doe",
  "email": "john.doe@example.com",
  "phone": "+994501234567",
  "profile_photo": "https://...",
  "preferred_language": "AZERBAIJANI",
  "role": "1",
  "created": "2025-01-15T10:30:00Z"
}

Error Responses

User Not Found (404)

{
  "error": "User not found"
}

Unauthorized (401)

{
  "error": "Missing token on header!"
}

Example Request

curl -X GET "https://api.luxmart.site/v1/accounts/user/site/" \
  -H "Authorization: Token your_access_token"

Notes

  • Returns the profile of the authenticated user
  • User ID is extracted from the authentication token
  • Only returns non-deleted users