Batches
Base URL: http://192.168.100.250/
Endpoints
Section titled “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 |
Get All
Section titled “Get All”GET /batchesAccept: application/jsonView Single
Section titled “View Single”GET /batches/{id}Accept: application/jsonCreate
Section titled “Create”POST /batchesContent-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
Section titled “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
Section titled “Delete”DELETE /batches/{id}Set as Current
Section titled “Set as Current”POST /batches/{id}/set-current