Skip to content

Get User By ID

Get a specific user by their ID. Requires authentication.

Endpoint

GET /v1/accounts/user/get-by/?id={user_id}

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)

{
  "error": "User not found"
}

Missing ID Parameter (400)

{
  "message": "Param not send!"
}

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)