Skip to content

Master API Endpoint Map

Master API Endpoint Map

Overview

This document provides a comprehensive reference map of all REST API endpoints provided by the NestJS backend server (server/src). All endpoints require Bearer JWT authentication via JwtAuthGuard unless explicitly marked public (@Public()).


🔐 1. Authentication & User Management (/auth, /users)

MethodEndpointAccess LevelDescription
POST/auth/registerPublicRegister new user (Student, Instructor, Consultant).
POST/auth/loginPublicAuthenticate user credentials and issue JWT pair.
POST/auth/refreshPublicRefresh expired access token using refresh token.
POST/auth/logoutAuthenticatedRevoke active refresh token.
POST/auth/forgot-passwordPublicRequest password reset code via email.
POST/auth/reset-passwordPublicReset password using verified code.
GET/users/meAuthenticatedRetrieve current user profile details.
PATCH/users/meAuthenticatedUpdate user profile, avatar, and notification settings.

📚 2. Course Engine (/course, /category)

MethodEndpointAccess LevelDescription
GET/coursePublicList published courses with pagination and category filters.
GET/course/slug/:slugPublicGet full course details by unique slug.
POST/courseInstructor / AdminCreate a new draft course.
PATCH/course/:idInstructor / AdminUpdate course metadata, pricing, and level.
POST/course/:id/sectionsInstructor / AdminAdd section to course curriculum.
POST/course/sections/:id/subsectionsInstructor / AdminAdd subsection to course section.
POST/course/subsections/:id/itemsInstructor / AdminAdd video/quiz/document item to subsection.
POST/course/:id/progressStudentUpdate student section/video playback progress.
GET/categoryPublicList top-level categories and subcategories.

🗓 3. Consultation Booking & Sessions (/consultation, /consultant)

MethodEndpointAccess LevelDescription
GET/consultationPublicList active consultations with filter criteria.
GET/consultation/slug/:slugPublicRetrieve consultation profile by slug.
POST/consultationConsultantCreate new one-off or recurring consultation offer.
POST/consultation/:id/availabilityConsultantSet weekly availability slots and buffer times.
GET/consultation/:id/availabilityPublicQuery available booking time slots for dates.
POST/consultation/:id/bookingStudentCreate booking reservation for selected slot.
POST/consultation/booking/:id/rescheduleStudent / ConsultantPropose alternative session time slot.
POST/consultation/booking/:id/completeConsultantMark session completed to trigger payment release.

💳 4. Wallet & Withdrawal System (/wallet, /withdrawals)

MethodEndpointAccess LevelDescription
GET/wallet/balanceAuthenticatedGet provider wallet balance (available, pending hold).
GET/wallet/revenue-chartAuthenticatedRetrieve earnings history broken down by period.
GET/withdrawals/methodsAuthenticatedList configured payout bank accounts / recipient IDs.
POST/withdrawals/methodsAuthenticatedAdd new withdrawal method (OTP verification required).
POST/withdrawals/requestAuthenticatedInitiate withdrawal request from available balance.
POST/withdrawals/:id/verifyAuthenticatedVerify pending withdrawal using approval OTP.
PATCH/withdrawals/:id/approveAdmin OnlyAdministrative approval and execution of bank payout.

🔍 5. Quality Validation Queue (/validation, /admin)

MethodEndpointAccess LevelDescription
GET/validation/queueAdmin OnlyFetch list of courses and consultations pending review.
POST/validation/course/:id/submitInstructorSubmit course for admin validation.
POST/product/:id/approveAdmin OnlyApprove course/consultation for public marketplace.
POST/product/:id/rejectAdmin OnlyReject product submission with feedback notes.

⚡ 6. Real-Time & Analytics Endpoints (/instant, /analytics)

MethodEndpointAccess LevelDescription
GET/instant/session-roomAuthenticatedObtain InstantDB room token and presence credentials.
POST/analytics/beaconAuthenticatedIngest student active time, video heartbeats, and engagement.
GET/analytics/platform-overviewAdmin OnlyView system-wide metrics (GMV, active users, course counts).