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 Admin API provides a read-only view into the operational health of the entire Oasis Liquido platform. The stats endpoint aggregates counts and breakdowns across all resources in real time. The audit log endpoint exposes a chronological, immutable record of every significant action taken by any user, which is essential for compliance and incident investigation.
All endpoints in this section require the admin role. Requests from users with any other role will be rejected with 403 Forbidden, even if the Bearer token is otherwise valid. Ensure the JWT’s role claim is admin before calling these endpoints.

GET /api/v1/admin/stats

Return a snapshot of platform-wide statistics. Optionally scope results by clinic, pharmacy, or date range.

Query parameters

clinic_id
string
Scope statistics to a specific clinic UUID.
pharmacy_id
string
Scope statistics to a specific pharmacy UUID.
date_from
string
ISO 8601 lower bound for the reporting period.
date_to
string
ISO 8601 upper bound for the reporting period.

curl example

curl "http://localhost:8000/api/v1/admin/stats?date_from=2026-01-01&date_to=2026-05-31" \
  --header "Authorization: Bearer <access_token>"

AdminStats response fields

total_clinics
number
required
Total number of clinic records.
total_pharmacies
number
required
Total number of pharmacy records.
total_doctors
number
required
Total number of users with the doctor role.
total_patients
number
required
Total number of users with the patient role.
total_appointments
number
required
Total number of appointment records.
total_prescriptions
number
required
Total number of prescription records.
total_sales
number
required
Total number of sale transactions.
total_delivery_orders
number
required
Total number of delivery orders.
monthly_revenue
number
required
Aggregate revenue for the current calendar month.
appointments_by_status
object
required
Count of appointments grouped by status. Keys: scheduled, confirmed, in_progress, completed, cancelled.
prescriptions_by_status
object
required
Count of prescriptions grouped by status. Keys: active, partially_fulfilled, fulfilled, expired.
deliveries_by_status
object
required
Count of delivery orders grouped by status. Keys: pending, assigned, picked_up, in_transit, delivered, cancelled.

GET /api/v1/admin/audit-logs

Return a paginated list of audit log entries. Entries are immutable and sorted in descending chronological order. Use the filter parameters to narrow results for a specific user, action type, or resource.

Query parameters

user_id
string
Filter by the UUID of the user who performed the action.
action
string
Filter by action name, e.g. "CREATE_APPOINTMENT" or "FULFILL_PRESCRIPTION".
resource_type
string
Filter by the type of resource affected, e.g. "Appointment", "Prescription", "DeliveryOrder".
date_from
string
ISO 8601 lower bound on created_at.
page
number
default:"1"
Page number.
limit
number
default:"20"
Results per page.

curl example

curl "http://localhost:8000/api/v1/admin/audit-logs?resource_type=Prescription&page=1&limit=50" \
  --header "Authorization: Bearer <access_token>"

AuditLog response fields

id
string
required
UUID of the audit log entry.
user_id
string
required
UUID of the user who performed the action.
user_name
string
required
Display name of the user at the time of the action.
action
string
required
Name of the action performed, e.g. "CREATE_PRESCRIPTION".
resource_type
string
required
Type of the resource affected, e.g. "Prescription".
resource_id
string
required
UUID of the specific resource that was affected.
details
string
Optional JSON string or human-readable description with additional context about the action.
created_at
string
required
ISO 8601 timestamp of when the action occurred.

Build docs developers (and LLMs) love