Skip to content
PharmaFlow Knowledgebase
Esc
↑↓navigate↵open⌘Jpreview

Read a user

Any signed in user. Returns one user record together with its branch name. A pharmacist may only read their own record, and an admin may read anyone.

GET/api/v1/users/{userId}
Authorization
AuthorizationBearer token (JWT) · headerrequired

JWT from POST /api/v1/auth/login sent as Authorization Bearer.

Path parameters
userIdstringrequired

The user id.

Responses
200

The user

idstringrequired
branch_idstringrequired
emailstringrequired
full_namestringrequired
phonestringrequired
rolestringrequired
is_activebooleanrequired
last_login_atstring | nullrequired
created_atstringrequired
updated_atstringrequired
branch_namestring | nullrequired
401

Not authenticated

detailstringrequired
403

Access forbidden

detailstringrequired
404

User not found

detailstringrequired
Try it
Server
Authorization
Parameters
Request
curl -X GET 'http://localhost:8000/api/v1/users/string' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "id": "string",
  "branch_id": "string",
  "email": "string",
  "full_name": "string",
  "phone": "string",
  "role": "string",
  "is_active": true,
  "last_login_at": "string",
  "created_at": "string",
  "updated_at": "string",
  "branch_name": "string"
}