Manage
Batches
Batch Management APIs
Base URL: http://192.168.100.250/
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /batches | List all batches |
| GET | /batches/{id} | Get single batch (includes students relation) |
| POST | /batches | Create new batch |
| PUT | /batches/{id} | Update batch |
| DELETE | /batches/{id} | Delete batch |
| POST | /batches/{id}/set-current | Set as current batch |
List
Get All
GET /batches
Accept: application/jsonView Single
GET /batches/{id}
Accept: application/jsonResponse includes students relation.
Create
POST /batches
Content-Type: application/jsonRequest Body:
{
"name": "2077",
"fiscal_year": "2081/82",
"batchNepali": "२०७७",
"start_date": "2024-01-01",
"end_date": "2025-12-31",
"is_current": true
}Update
PUT /batches/{id}
Content-Type: application/jsonRequest Body:
{
"name": "2078",
"fiscal_year": "2082/83",
"batchNepali": "२०७८",
"start_date": "2025-01-01",
"end_date": "2026-12-31",
"is_current": false
}Delete
DELETE /batches/{id}Set as Current
POST /batches/{id}/set-current