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 Medicines API manages the platform-wide medicine catalog and per-pharmacy inventory. Catalog records describe a medicine’s properties — name, dosage form, active ingredient, and whether a prescription is required. Inventory endpoints are scoped to individual pharmacies and allow stock and price adjustments, which are reflected immediately in the Aura Pharmacy Map.

GET /api/v1/medicines

Return the full medicine catalog. Supports a name search to narrow results.

Query parameters

name
string
Partial or full medicine name to search. Case-insensitive.
page
number
default:"1"
Page number.
limit
number
default:"20"
Results per page.

curl example

curl "http://localhost:8000/api/v1/medicines?name=amoxicillin" \
  --header "Authorization: Bearer <access_token>"

POST /api/v1/medicines

Add a new medicine to the catalog. Requires the admin role.

Request body

name
string
required
The medicine’s commercial or generic name.
description
string
Optional description of the medicine’s purpose or composition.
dosage_form
string
Physical form of the medicine. One of: tablet, syrup, injection, capsule, cream, drops, inhaler.
active_ingredient
string
Primary active pharmaceutical ingredient.
strength
string
Concentration or strength, e.g. "500mg" or "10mg/ml".
requires_prescription
boolean
default:"false"
When true, pharmacies require a valid prescription before dispensing.
barcode
string
Optional barcode or SKU for scanning at the counter.

curl example

curl --request POST http://localhost:8000/api/v1/medicines \
  --header "Authorization: Bearer <access_token>" \
  --header "Content-Type: application/json" \
  --data '{
    "name": "Amoxicillin",
    "description": "Broad-spectrum penicillin antibiotic",
    "dosage_form": "capsule",
    "active_ingredient": "Amoxicillin trihydrate",
    "strength": "500mg",
    "requires_prescription": true
  }'

GET /api/v1/pharmacies/:id/inventory

Return the full inventory list for a specific pharmacy. Each item includes the medicine details, current stock, and unit price.

Path parameters

id
string
required
UUID of the pharmacy.

curl example

curl http://localhost:8000/api/v1/pharmacies/pharm-uuid-001/inventory \
  --header "Authorization: Bearer <access_token>"

POST /api/v1/pharmacies/:id/inventory/adjust

Adjust the stock level (and optionally the price) of a medicine in a specific pharmacy’s inventory. Use a positive quantity_change to add stock and a negative value to remove it.

Path parameters

id
string
required
UUID of the pharmacy whose inventory is being adjusted.

Request body

medicine_id
string
required
UUID of the medicine to adjust.
quantity_change
number
required
Units to add (positive) or remove (negative) from current stock.
price
number
New unit price. Omit to keep the existing price.

curl example

curl --request POST http://localhost:8000/api/v1/pharmacies/pharm-uuid-001/inventory/adjust \
  --header "Authorization: Bearer <access_token>" \
  --header "Content-Type: application/json" \
  --data '{
    "medicine_id": "med-uuid-001",
    "quantity_change": 100,
    "price": 12.50
  }'

GET /api/v1/pharmacies/:id/inventory/movements

Return the inventory movement history (Kardex) for a specific pharmacy. Each entry records a stock change with its type, quantity, and timestamp.

Path parameters

id
string
required
UUID of the pharmacy.

curl example

curl http://localhost:8000/api/v1/pharmacies/pharm-uuid-001/inventory/movements \
  --header "Authorization: Bearer <access_token>"

Movement type values

TypeDescription
restockStock added during a reorder or supplier delivery
saleUnits deducted when a sale is processed
adjustmentManual quantity correction by a pharmacy manager
inGeneric inbound stock movement
outGeneric outbound stock movement

Dosage form values

ValueDescription
tabletSolid oral tablet
syrupLiquid oral suspension
injectionInjectable solution or powder
capsuleHard or soft gelatin capsule
creamTopical cream or ointment
dropsOphthalmic, otic, or nasal drops
inhalerPressurized metered-dose or dry-powder inhaler

Build docs developers (and LLMs) love