🔗
443+
API Endpoints
📡
REST
Architecture
📄
JSON
Data Format
🔐
OAuth 2.0
Authentication
99.9%
Uptime SLA

🔐 Authentication

All API requests must be authenticated using Bearer tokens (OAuth 2.0). First obtain an access token using your API credentials, then include it in the Authorization header of every request.

# Step 1: Get Access Token
POST /api/v1/auth/token
Content-Type: application/json

{
  "client_id": "your_client_id",
  "client_secret": "your_client_secret",
  "grant_type": "client_credentials"
}

# Step 2: Use Token in Requests
GET /api/v1/products
Authorization: Bearer your_access_token
Endpoints

API Endpoints by Module

🏭

Manufacturing

38 endpoints
GET /api/v1/batches
List all batches with filters
POST /api/v1/batches
Create a new batch record
GET /api/v1/bom/{id}
Get bill of materials
PUT /api/v1/batches/{id}/status
Update batch status
View all 38 endpoints →
🧪

Quality Control

42 endpoints
GET /api/v1/qc/samples
List QC samples
POST /api/v1/qc/tests
Submit test results
GET /api/v1/qc/coa/{batch}
Generate COA for batch
GET /api/v1/stability/studies
List stability studies
View all 42 endpoints →
📦

Inventory

35 endpoints
GET /api/v1/inventory
Get current stock levels
POST /api/v1/grn
Create goods receipt note
POST /api/v1/stock/transfer
Inter-warehouse transfer
GET /api/v1/stock/expiring
Get near-expiry items
View all 35 endpoints →
💰

Sales

40 endpoints
GET /api/v1/invoices
List all invoices
POST /api/v1/invoices
Create sales invoice
GET /api/v1/customers
List customers
POST /api/v1/einvoice/generate
Generate e-Invoice
View all 40 endpoints →
🛒

Purchase

32 endpoints
GET /api/v1/purchase-orders
List purchase orders
POST /api/v1/purchase-orders
Create purchase order
GET /api/v1/vendors
List approved vendors
GET /api/v1/vendors/{id}/rating
Get vendor rating
View all 32 endpoints →
👥

HR & Payroll

36 endpoints
GET /api/v1/employees
List all employees
POST /api/v1/attendance
Record attendance
GET /api/v1/payroll/run/{month}
Get payroll data
GET /api/v1/training/records
GMP training records
View all 36 endpoints →
Format

Response Format

✅ Success Response

{
  "success": true,
  "data": {
    "id": 1234,
    "batch_no": "BMR-2026-0847",
    "product": "Paracetamol 500mg",
    "status": "in_progress"
  },
  "meta": {
    "timestamp": "2026-02-18T10:30:00Z"
  }
}

❌ Error Response

{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Batch number required",
    "field": "batch_no"
  },
  "meta": {
    "timestamp": "2026-02-18T10:30:00Z"
  }
}
Get Started

Ready to Integrate?

API access is available on Enterprise plans. Contact our sales team to get your API credentials.

Ready to Transform Your Pharma Business?

Join 100+ pharmaceutical companies already using PharmaSoft ERP