Skip to content

Batches

Base URL: http://192.168.100.250/


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 /batches
Accept: application/json
GET /batches/{id}
Accept: application/json

POST /batches
Content-Type: application/json

Request Body:

{
"name": "2077",
"fiscal_year": "2081/82",
"batchNepali": "२०७७",
"start_date": "2024-01-01",
"end_date": "2025-12-31",
"is_current": true
}

PUT /batches/{id}
Content-Type: application/json

Request Body:

{
"name": "2078",
"fiscal_year": "2082/83",
"batchNepali": "२०७८",
"start_date": "2025-01-01",
"end_date": "2026-12-31",
"is_current": false
}

DELETE /batches/{id}

POST /batches/{id}/set-current