Skip to content

Formulary & Products

Formulary & Products

Manage your pharmacy’s product catalog — search medications, check stock levels, update pricing, and organize your formulary.

Search Formulary

Search your pharmacy’s available medications.

Terminal window
# Search your product catalog
fetchFormularyForProvider({
query: "Amoxicillin 500mg",
branchId: "BR-123",
category: "antibiotics",
inStockOnly: true
})

Parameters:

ParameterTypeRequiredDescription
querystringNoSearch by name or generic
branchIdstringNoFilter by branch location
categorystringNoFilter by category
inStockOnlybooleanNoOnly show in-stock items

Response:

{
"products": [
{
"id": "MED-123",
"name": "Amoxicillin 500mg Capsules",
"generic": "Amoxicillin",
"manufacturer": "Emzor Pharmaceuticals",
"category": "antibiotics",
"form": "Capsule",
"strength": "500mg",
"packSize": "24 capsules",
"price": 2500,
"stockQuantity": 45,
"branchId": "BR-123",
"requiresPrescription": true,
"storage": "Room temperature",
"expiryDate": "2027-03-15"
},
{
"id": "MED-124",
"name": "Amoxicillin 250mg Suspension",
"generic": "Amoxicillin",
"manufacturer": "Juhel Nigeria",
"category": "antibiotics",
"form": "Suspension",
"strength": "250mg/5ml",
"packSize": "100ml bottle",
"price": 1800,
"stockQuantity": 12,
"branchId": "BR-123",
"requiresPrescription": true,
"storage": "Refrigerate after opening",
"expiryDate": "2026-12-20"
}
],
"total": 23,
"categories": ["antibiotics", "analgesics", "antimalarial"]
}

Get Product Details

View comprehensive information about a specific product.

Terminal window
# Get detailed product info
getFormularyProductDetails({
productId: "MED-123"
})

Response:

{
"id": "MED-123",
"name": "Amoxicillin 500mg Capsules",
"generic": "Amoxicillin",
"manufacturer": "Emzor Pharmaceuticals",
"category": "antibiotics",
"subcategory": "Penicillins",
"form": "Capsule",
"strength": "500mg",
"packSize": "24 capsules",
"description": "Broad-spectrum antibiotic for bacterial infections",
"indications": ["Respiratory infections", "UTIs", "Skin infections"],
"contraindications": ["Penicillin allergy"],
"sideEffects": ["Nausea", "Diarrhea", "Rash"],
"dosage": "Adults: 500mg every 8 hours",
"storage": "Store below 25°C",
"price": 2500,
"costPrice": 1800,
"stockQuantity": 45,
"reorderLevel": 20,
"reorderQuantity": 50,
"requiresPrescription": true,
"controlled": false,
"branches": [
{ "branchId": "BR-123", "quantity": 45 },
{ "branchId": "BR-124", "quantity": 30 }
],
"expiryDate": "2027-03-15",
"lastRestocked": "2026-02-10T10:00:00Z"
}

Update Stock

Update stock quantity for a product.

Terminal window
# Update stock quantity
updateProductStock({
productId: "MED-123",
branchId: "BR-123",
quantity: 60,
operation: "set", // "set", "add", "subtract"
reason: "New stock received"
})

Update Price

Change the selling price of a product.

Terminal window
# Update product price
updateProductPrice({
productId: "MED-123",
newPrice: 2800,
effectiveDate: "2026-05-01"
})

Add New Product

Add a new medication to your formulary.

Terminal window
# Add new product to catalog
addFormularyProduct({
name: "Lisinopril 10mg Tablets",
generic: "Lisinopril",
manufacturer: "Swiss Pharma",
category: "cardiovascular",
form: "Tablet",
strength: "10mg",
packSize": "30 tablets",
price: 3500,
costPrice: 2500,
stockQuantity: 100,
reorderLevel: 30,
requiresPrescription: true,
storage: "Room temperature",
branches: ["BR-123", "BR-124"]
})

Check Low Stock

View products that need restocking.

Terminal window
# Get low stock alerts
getLowStockProducts({
branchId: "BR-123",
threshold: 10 // optional: override default threshold
})

Response:

{
"lowStock": [
{
"id": "MED-456",
"name": "Ibuprofen 400mg",
"currentStock": 8,
"reorderLevel": 20,
"suggestedOrder": 50
},
{
"id": "MED-457",
"name": "Paracetamol 500mg",
"currentStock": 5,
"reorderLevel": 30,
"suggestedOrder": 100
}
],
"totalLowStock": 12
}

Expiring Products

Track products nearing expiry.

Terminal window
# Get expiring products
getExpiringProducts({
days: 90, // products expiring in next 90 days
branchId: "BR-123"
})

Product Categories

Organize products by category:

Terminal window
# Get all categories
getProductCategories()
# Response:
{
"categories": [
{ "id": "CAT-1", "name": "Antibiotics", "productCount": 45 },
{ "id": "CAT-2", "name": "Analgesics", "productCount": 32 },
{ "id": "CAT-3", "name": "Antimalarial", "productCount": 18 },
{ "id": "CAT-4", "name": "Cardiovascular", "productCount": 27 }
]
}

Example: Inventory Management

Terminal window
# Step 1: Check low stock
getLowStockProducts({ branchId: "BR-123" })
# → Shows products below reorder level
# Step 2: Search for specific product
fetchFormularyForProvider({
query: "Amoxicillin",
branchId: "BR-123"
})
# → Shows current stock levels
# Step 3: Update after restocking
updateProductStock({
productId: "MED-123",
quantity: 100,
operation: "add",
reason: "New delivery from supplier"
})

Next steps

  • Orders — Create orders using formulary products
  • Customers — View customer medication needs
  • Analytics — View sales and inventory reports