Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/FlasheyEstudi/Oasis-Liquido/llms.txt

Use this file to discover all available pages before exploring further.

The Users API lets authenticated users view and update their own profiles, and provides admin-level endpoints to list all platform users. Profile data is split between a shared base (name, phone) and role-specific sub-profiles such as the patient’s medical history or the delivery driver’s availability flag. Each endpoint returns the full User object including any applicable nested profile.

GET /api/v1/users/me

Return the full profile of the currently authenticated user. This is equivalent to GET /api/v1/auth/me.

curl example

curl http://localhost:8000/api/v1/users/me \
  --header "Authorization: Bearer <access_token>"

PATCH /api/v1/users/me

Update the base profile fields for the authenticated user.

Request body

name
string
Updated full display name.
phone
string
Updated phone number.

curl example

curl --request PATCH http://localhost:8000/api/v1/users/me \
  --header "Authorization: Bearer <access_token>" \
  --header "Content-Type: application/json" \
  --data '{
    "name": "Ana García López",
    "phone": "+52 55 9999 0000"
  }'

PATCH /api/v1/users/me/patient-profile

Update the patient-specific profile for the authenticated user. Requires the patient role.

Request body

date_of_birth
string
ISO 8601 date of birth, e.g. "1990-04-15".
blood_type
string
Blood type, e.g. "O+", "AB-".
allergies
string[]
List of known allergen names.
medical_notes
string
Free-form notes visible to treating doctors.

curl example

curl --request PATCH http://localhost:8000/api/v1/users/me/patient-profile \
  --header "Authorization: Bearer <access_token>" \
  --header "Content-Type: application/json" \
  --data '{
    "date_of_birth": "1990-04-15",
    "blood_type": "O+",
    "allergies": ["penicillin", "ibuprofen"],
    "medical_notes": "Asthma, mild"
  }'

GET /api/v1/users

Return a paginated list of all users on the platform. Requires the admin role.

Query parameters

role
string
Filter by user role.
page
number
default:"1"
Page number.
limit
number
default:"20"
Results per page.

curl example

curl "http://localhost:8000/api/v1/users?role=doctor&page=1&limit=20" \
  --header "Authorization: Bearer <access_token>"

POST /api/v1/users/me/change-password

Change the password for the authenticated user. Any role can call this endpoint for their own account.

Request body

current_password
string
required
The user’s current password, used to verify identity before the change.
new_password
string
required
The new password to set.

curl example

curl --request POST http://localhost:8000/api/v1/users/me/change-password \
  --header "Authorization: Bearer <access_token>" \
  --header "Content-Type: application/json" \
  --data '{
    "current_password": "oldpass123",
    "new_password": "newpass456"
  }'

PATCH /api/v1/users/:id/availability

Toggle the availability status of a delivery driver. The authenticated user must have the delivery_driver role and can only update their own record.

Path parameters

id
string
required
UUID of the delivery driver user.

Request body

is_available
boolean
required
Set to true to mark the driver as available for assignment, or false to go off-duty.

curl example

curl --request PATCH http://localhost:8000/api/v1/users/driver-uuid-001/availability \
  --header "Authorization: Bearer <access_token>" \
  --header "Content-Type: application/json" \
  --data '{"is_available": true}'

User response fields

id
string
required
UUID of the user.
email
string
required
User’s email address.
name
string
required
User’s full name.
role
string
required
User’s role. One of: admin, doctor, receptionist, patient, pharmacy_manager, delivery_driver.
phone
string
Optional phone number.
is_active
boolean
required
Whether the account is active.
patient_profile
object
Included when role is patient.
delivery_driver_profile
object
Included when role is delivery_driver.

Build docs developers (and LLMs) love