1. API Purpose
The Admission Form API digitizes the enrollment process. It allows prospective parents to submit their data through a multi-step form, which then automatically populates the core student and parent registries.2. Endpoint Definition
| Method | Route | Auth | Description |
|---|---|---|---|
| POST | /web-app/admission-form | 🔓 Public | Submit full admission data |
| GET | /web-app/student-info | 🔓 Public | Lookup existing info by roll number |
| GET | /web-app/grades | 🔓 Public | List available grades for a school |
| PATCH | /web-app/update-student | 🔓 Public | Update specific admission sections |
3. Authentication Flow
Zero-Auth Flow: These endpoints are marked as@Public() and do not require a JWT. This allows new parents who are not yet in the system to submit their data. Security is maintained by requiring a valid skole_id in the request body to link data to the correct institution.
4. Request Structure
POST /web-app/admission-form
Request Body:GET /web-app/student-info
Query Parameters:| Field | Type | Required | Description |
|---|---|---|---|
| skole_id | string | Yes | School identifier. |
| roll_no | string | Yes | Student roll number. |
GET /web-app/grades
Query Parameters:| Field | Type | Required | Description |
|---|---|---|---|
| skole_id | string | Yes | School identifier. |
PATCH /web-app/update-student
Request Body:5. Response Structure
Success: Admission Submitted (201 Created)
Route:POST /web-app/admission-form
Success: Student Info Lookup (200 OK)
Route:GET /web-app/student-info
Success: Grade List (200 OK)
Route:GET /web-app/grades
Success: Admission Section Updated (200 OK)
Route:PATCH /web-app/update-student
6. Error Responses
| HTTP Code | Description |
|---|---|
| 400 | Missing required fields in one of the sections (student/parent/address) |
| 409 | Student with this roll number already exists |
7. Security Considerations
- Input Validation: Strict DTO (Data Transfer Object) validation ensures no malformed data enters the core registry.
- Tenant Isolation: Every submission MUST include a valid
skole_id.
8. Token Usage
N/A (Public endpoints).9. Token Refresh
N/A.10. Logout / Session Invalidation
N/A.11. Usage Example (cURL)
12. Notes / Special Behaviors
- Atomic Transactions: The admission process uses database transactions. If any section (e.g., Address) fails to save, the entire student and parent creation is rolled back.
- PIN Setup: Upon successful submission, a setup link is typically generated for the parent to configure their initial login PIN.