{
	"info": {
		"name": "School Management System API",
		"description": "Comprehensive API collection for the SMS platform, covering Academics, Finance (Pocket Money & Fees), Facilities, and Vendors.",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"variable": [
		{
			"key": "base_url",
			"value": "http://localhost:8000/school/api/v1",
			"type": "string"
		},
		{
			"key": "auth_url",
			"value": "http://localhost:8000/school/api/v1auth",
			"type": "string"
		},
		{
			"key": "token",
			"value": "PASTE_YOUR_JWT_TOKEN_HERE",
			"type": "string"
		}
	],
	"auth": {
		"type": "bearer",
		"bearer": [
			{
				"key": "token",
				"value": "{{token}}",
				"type": "string"
			}
		]
	},
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		}
	],
	"item": [
		{
			"name": "1. Authentication (Public)",
			"item": [
				{
					"name": "Login",
					"request": {
						"auth": {
							"type": "noauth"
						},
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"email\": \"admin@school.com\",\n    \"password\": \"password123\"\n}"
						},
						"url": {
							"raw": "{{auth_url}}/login",
							"host": [
								"{{auth_url}}"
							],
							"path": [
								"login"
							]
						}
					}
				},
				{
					"name": "Register User",
					"request": {
						"auth": {
							"type": "noauth"
						},
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"John Doe\",\n    \"email\": \"johndoe@example.com\",\n    \"password\": \"securepassword\",\n    \"confirmPassword\": \"securepassword\",\n    \"phoneNumber\": \"0712345678\",\n    \"termsAndCondition\": \"accept\"\n}"
						},
						"url": {
							"raw": "{{auth_url}}/register",
							"host": [
								"{{auth_url}}"
							],
							"path": [
								"register"
							]
						}
					}
				}
			]
		},
		{
			"name": "2. Pocket Money & Wallets",
			"item": [
				{
					"name": "Get Student Balance",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/pocketmoney/balance/STU-1001",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"pocketmoney",
								"balance",
								"STU-1001"
							]
						}
					}
				},
				{
					"name": "Get Student Ledger (Transactions)",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/pocketmoney/transactions/STU-1001",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"pocketmoney",
								"transactions",
								"STU-1001"
							]
						}
					}
				},
				{
					"name": "Withdraw Funds (Student)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"studentid\": \"STU-1001\",\n    \"pin\": \"1234\",\n    \"amount\": 200\n}"
						},
						"url": {
							"raw": "{{base_url}}/pocketmoney/withdraw",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"pocketmoney",
								"withdraw"
							]
						}
					}
				},
				{
					"name": "Update PIN",
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"studentid\": \"STU-1001\",\n    \"old_pin\": \"1234\",\n    \"new_pin\": \"5678\"\n}"
						},
						"url": {
							"raw": "{{base_url}}/pocketmoney/update-pin",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"pocketmoney",
								"update-pin"
							]
						}
					}
				}
			]
		},
		{
			"name": "3. Vendor & Point of Sale",
			"item": [
				{
					"name": "Register Vendor",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"userid\": \"USR-VND-01\",\n    \"vendorname\": \"Main Canteen\"\n}"
						},
						"url": {
							"raw": "{{base_url}}/vendors/register",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"vendors",
								"register"
							]
						}
					}
				},
				{
					"name": "View Vendor Balance",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/vendors/balance/VND-001",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"vendors",
								"balance",
								"VND-001"
							]
						}
					}
				},
				{
					"name": "POS Purchase (Student buys from Vendor)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"vendorid\": \"VND-001\",\n    \"studentid\": \"STU-1001\",\n    \"pin\": \"1234\",\n    \"amount\": 150,\n    \"description\": \"Lunch Meal\"\n}"
						},
						"url": {
							"raw": "{{base_url}}/vendor-transactions/purchase",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"vendor-transactions",
								"purchase"
							]
						}
					}
				}
			]
		},
		{
			"name": "4. Fee Structures & Billing",
			"item": [
				{
					"name": "View All Fee Structures",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/fee-structures/feestructure",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"fee-structures",
								"feestructure"
							]
						}
					}
				},
				{
					"name": "Apply Fees to Students (Bill a Class)",
					"request": {
						"method": "POST",
						"header": [],
						"url": {
							"raw": "{{base_url}}/fee-structures/apply-fees/FEE-2026-T1",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"fee-structures",
								"apply-fees",
								"FEE-2026-T1"
							]
						}
					}
				},
				{
					"name": "Get Student Fee Ledger",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/feequeries/balance/STU-1001",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"feequeries",
								"balance",
								"STU-1001"
							]
						}
					}
				},
				{
					"name": "View Fee Defaulters (Negative Balance)",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/feequeries/balances/negative",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"feequeries",
								"balances",
								"negative"
							]
						}
					}
				}
			]
		},
		{
			"name": "5. Academics (Classes, Subjects, Assignments)",
			"item": [
				{
					"name": "Get All Subjects",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/subjects/subjects",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"subjects",
								"subjects"
							]
						}
					}
				},
				{
					"name": "Add Subject",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"subjectname\": \"Computer Science\"\n}"
						},
						"url": {
							"raw": "{{base_url}}/subjects/add",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"subjects",
								"add"
							]
						}
					}
				},
				{
					"name": "Get All Classes",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/classes/classes",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"classes",
								"classes"
							]
						}
					}
				},
				{
					"name": "Get Mapped Timetable (Allocations)",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/allocations/class-subject-teacher/allocations",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"allocations",
								"class-subject-teacher",
								"allocations"
							]
						}
					}
				},
				{
					"name": "Get Active Assignments",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/assignments/active",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"assignments",
								"active"
							]
						}
					}
				},
				{
					"name": "Post New Assignment Slot",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"uniquesubteach\": \"CST-MAT-F1A\"\n}"
						},
						"url": {
							"raw": "{{base_url}}/assignments/add",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"assignments",
								"add"
							]
						}
					}
				},
				{
					"name": "Upload Assignment Document (Requires FormData)",
					"request": {
						"method": "POST",
						"header": [],
						"body": {
							"mode": "formdata",
							"formdata": [
								{
									"key": "file",
									"type": "file",
									"src": []
								}
							]
						},
						"url": {
							"raw": "{{base_url}}/../assignments/upload-link/ASSG-MAT-001",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"..",
								"assignments",
								"upload-link",
								"ASSG-MAT-001"
							]
						}
					}
				}
			]
		},
		{
			"name": "6. Exams & Grading",
			"item": [
				{
					"name": "Get All Exam Sessions",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/exams/exams",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"exams",
								"exams"
							]
						}
					}
				},
				{
					"name": "Post Exam Marks",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"uniquestudentclasssection\": \"SCS-JOH-MAT\",\n    \"uniqueidexam\": \"EXM-T1-MID\",\n    \"marks\": 88.5\n}"
						},
						"url": {
							"raw": "{{base_url}}/class-exams/add",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"class-exams",
								"add"
							]
						}
					}
				}
			]
		},
		{
			"name": "7. Facilities (Hostels & Transport)",
			"item": [
				{
					"name": "View Active Hostels",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/hostels/active",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"hostels",
								"active"
							]
						}
					}
				},
				{
					"name": "Allocate Student to Hostel",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"hostelid\": \"HST-LION\",\n    \"studentid\": \"STU-1002\"\n}"
						},
						"url": {
							"raw": "{{base_url}}/hostel-allocations/allocate",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"hostel-allocations",
								"allocate"
							]
						}
					}
				},
				{
					"name": "Update Bus Pickup Status (Driver App)",
					"request": {
						"method": "PATCH",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"pickup_status\": \"PICKED\"\n}"
						},
						"url": {
							"raw": "{{base_url}}/student-bus/pickup/SBS-001",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"student-bus",
								"pickup",
								"SBS-001"
							]
						}
					}
				}
			]
		},
		{
			"name": "8. Offline Bank Payments (Slips)",
			"item": [
				{
					"name": "Submit Bank Slip (Parent)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"userid\": \"USR-PAR-01\",\n    \"studentid\": \"STU-1001\",\n    \"bankcode\": \"01\",\n    \"bankname\": \"Equity Bank\",\n    \"amount\": 15000,\n    \"code\": \"REF-123456789\"\n}"
						},
						"url": {
							"raw": "{{base_url}}/offline-payments/add",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"offline-payments",
								"add"
							]
						}
					}
				},
				{
					"name": "View Pending Slips (Admin)",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/offline-payments/pending",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"offline-payments",
								"pending"
							]
						}
					}
				},
				{
					"name": "Verify & Complete Payment (Admin)",
					"request": {
						"method": "PATCH",
						"header": [],
						"url": {
							"raw": "{{base_url}}/offline-payments/complete/1",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"offline-payments",
								"complete",
								"1"
							]
						}
					}
				}
			]
		}
	]
}