Skip to main content

EPIC-4 API Specification

Node.js APIs (NestJS)​

Fee Structures​

POST /api/v1/fee-structures
Content-Type: application/json

{
"name": "Class 5 General 2025-26",
"academicYear": "2025-2026",
"classId": "uuid",
"category": "GENERAL",
"feeHeads": [
{ "feeHeadId": "uuid", "amount": 8000, "frequency": "MONTHLY" }
]
}

Invoices​

POST /api/v1/invoices
Content-Type: application/json

{
"studentId": "uuid",
"academicYear": "2025-2026",
"periodFrom": "2025-04-01",
"periodTo": "2025-06-30",
"dueDate": "2025-04-10"
}

Bulk Invoice Generation​

POST /api/v1/invoices/bulk
Content-Type: application/json

{
"classId": "uuid",
"academicYear": "2025-2026",
"periodFrom": "2025-04-01",
"periodTo": "2025-06-30"
}

Go APIs (Gin)​

Create Payment Order​

POST /api/v1/payments/orders
Content-Type: application/json

{
"invoice_id": "uuid",
"amount": 25000.00,
"gateway": "razorpay"
}

Response:

{
"order_id": "order_xyz",
"amount": 25000.00,
"gateway_data": {
"key": "rzp_live_xxx",
"order_id": "order_xyz"
}
}

Webhooks​

POST /api/v1/webhooks/razorpay
X-Razorpay-Signature: <signature>

{
"event": "payment.captured",
"payload": { ... }
}

Reports​

GET /api/v1/reports/collection?from=2025-04-01&to=2025-04-30
GET /api/v1/reports/outstanding?classId=uuid
GET /api/v1/reports/defaulters?daysOverdue=30