API Endpoints Dashboard

Available API Endpoints

NameEndpointMethodDescriptionExample
Register User/api/auth/registerPOSTRegister a new user (UNIVERSITY, AGENT, or TRAINER)curl -X POST -H "Content-Type: application/json" -d '{"username":"user1","email":"user1@example.com","password":"password123","userType":"TRAINER","additionalInfo":{"expertise":["Math","Science"],"certification":"Certified Teacher","availableHours":20,"hourlyRate":50}}' http://localhost:3000/api/auth/register
Login User/api/auth/loginPOSTLogin a user and receive a JWT tokencurl -X POST -H "Content-Type: application/json" -d '{"email":"user1@example.com","password":"password123"}' http://localhost:3000/api/auth/login
Create Job/api/jobsPOSTCreate a new job posting (requires authentication)curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_JWT_TOKEN" -d '{"jobTitle":"Math Teacher","vacancies":2,"location":"New York","durationHours":40,"remuneration":5000,"contact":"jobs@example.com"}' http://localhost:3000/api/jobs
Get All Jobs/api/jobsGETRetrieve all job postingscurl http://localhost:3000/api/jobs
Update Job/api/jobsPUTUpdate an existing job posting (requires authentication)curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_JWT_TOKEN" -d '{"id":"job_id_here","jobTitle":"Updated Math Teacher","vacancies":3}' http://localhost:3000/api/jobs
Delete Job/api/jobsDELETEDelete a job posting (requires authentication)curl -X DELETE -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_JWT_TOKEN" -d '{"id":"job_id_here"}' http://localhost:3000/api/jobs