Skip to main content

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


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:

GET /web-app/grades

Query Parameters:

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


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.