Get User By ID
Get a specific user by their ID. Requires authentication.
Endpoint
Authentication
Required
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
integer | Yes | User ID |
Response
Success (200 OK)
{
"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"
}
Error Responses
User Not Found (404)
Missing ID Parameter (400)
Example Request
curl -X GET "https://api.luxmart.site/v1/accounts/user/get-by/?id=1" \
-H "Authorization: Token your_access_token"
Notes
- Only returns non-deleted users
- Returns user information without sensitive data (password, OTP)