Student Login
POST /api/auth/login
Request Body
{ "phone": "9840842566", "password": "your-password" }
Response
{ "status": "success", "token": "eyJh...Gwi" }
Welcome to the HamroMaster Mobile API documentation.
https://your-api-domain.com
POST /api/auth/login
{ "phone": "9840842566", "password": "your-password" }
{ "status": "success", "token": "eyJh...Gwi" }
POST /api/auth/register
{ "name": "Test Student", "email": "...", "phone": "...", "password": "..." }
Used for registration verification and password resets.
POST /api/auth/send-otp
POST /api/auth/verify-otp
POST /api/auth/reset-password
[AUTH] GET /api/users/profile
Returns details of the currently logged-in user.
[AUTH] PUT /api/users/profile
Update name, email, password, or upload a profile picture.
Note: If uploading an image, use multipart/form-data.
name (Text, Optional)email (Text, Optional)password (Text, Optional - to change password)profileImage (File, Optional - JPG/PNG){ "message": "Profile updated successfully.", "user": { ... } }
GET /api/categories/public
GET /api/courses/public
category, q, pageGET /api/courses/public/:id
GET /api/bundles/public
GET /api/search/live?q=python
GET /api/users/public/instructors
Requires header: Authorization: Bearer <token>
[AUTH] GET /api/student/my-courses?status=active
{
"success": true,
"data": [
{
"course": {
"courseTitle": "Physics 101",
"enrolledStudents": 150 // <-- Real Count Included
}
}
]
}
[AUTH] GET /api/student/my-bundles
Returns distinct bundle purchases separately from course list.
{
"success": true,
"data": [
{
"bundle": {
"bundleTitle": "Mega Pack",
"enrolledStudents": 45 // <-- Real Count Included
}
}
]
}
[AUTH] GET /api/student/my-courses/:slug
Returns full content including Playable URLs.
[AUTH] GET /api/student/assignments
[AUTH] POST /api/student/assignments/:id/submit
[AUTH] GET /api/student/exams
[AUTH] POST /api/student/exams/:id/start
Use `attemptId` query param to trigger Review Mode.
attemptId: Optional. If present, no new timer is started.{ "data": { "attemptId": "...", "questions": [...] } } // Answers hidden
[AUTH] POST /api/student/exams/:id/submit
Returns Result Page immediately (Score + Answers + Explanations).
{ "data": { "totalMarks": 100, "answers": [ { "correctAnswer": "...", "explanation": "..." } ] } }
[AUTH] GET /api/student/exams/:id/result
Returns enriched history (Question Text + Options + Correct Answers populated).
[AUTH] POST /api/student/reviews
[AUTH] GET /api/student/my-reviews
[AUTH] GET /api/student/notices
[AUTH] POST /api/student/progress/lesson/:lessonId
[AUTH] GET /api/orders/myorders
Get a list of all orders placed by the student with their status.
[ { "_id": "...", "totalPrice": 5000, "status": "Completed", "orderItems": [...] } ]
[AUTH] POST /api/orders/manual
[AUTH] POST /api/orders/esewa/init
[AUTH] POST /api/orders/esewa/verify
[AUTH] GET /api/bunny/stream/:videoId
[AUTH] GET /api/bunny/video/:videoId/download