Skip to main content

API Endpoints Reference

This page documents all HTTP endpoints available in the Duit application, organized by controller.

Public Endpoints

PublicController

Handles publicly accessible pages without authentication.
MethodPathDescriptionController Method
GET/, /indexMain landing pageshowMainPage()
GET/loginLogin page with error/logout handlingshowLoginPage()
GET/termsTerms and conditions pageshowTermsPage()
GET/privacyPrivacy policy pageshowPrivacyPage()
GET/helpHelp and support pageshowHelpPage()
GET/signupUser registration formshowRegistrationForm()
POST/registerProcess user registrationprocessUserRegistration()

Dashboard

DashboardController

Manages the main dashboard page for authenticated users.
MethodPathDescriptionController Method
GET/homeMain dashboard pagemostrarPaginaInicio()

User Profile Management

ProfileController

Handles profile editing and viewing for both regular users and professionals. Base Path: /profile
MethodPathDescriptionController Method
GET/profile/editShow user profile edit formedit()
POST/profile/editUpdate user profileupdateProfile()
GET/profile/professional, /profile/profesionalShow professional profileprofessional()
POST/profile/professional, /profile/profesionalUpdate professional profileupdateProfessionalProfile()
POST/profile/delete-accountDeactivate user accountdeleteAccount()

Service Requests

RequestFormController

Manages creation and editing of service requests. Base Path: /requests
MethodPathDescriptionController Method
GET/requests/requestShow request form (create or edit)showRequestForm()
POST/requests/requestSubmit request formsubmitRequestForm()

MyRequestsController

Handles user’s own service requests and jobs. Base Path: /requests
MethodPathDescriptionController Method
GET/requests/my-requestsShow user’s requests and jobsshowMyRequests()
POST/requests/publish/{id}Publish a draft requestpublishRequest()
POST/requests/unpublish/{id}Unpublish a requestunpublishRequest()
POST/requests/cancel/{id}Cancel a requestcancelRequest()
POST/requests/reactivate/{id}Reactivate a cancelled requestreactivateRequest()
POST/requests/delete/{id}Delete a requestdeleteRequest()
POST/requests/complete/{jobId}Mark job as completedcompleteJob()
POST/requests/pause/{jobId}Pause a jobpauseJob()
POST/requests/cancel-job/{jobId}Cancel a jobcancelJob()
POST/requests/complete-request/{id}Complete a requestcompleteRequest()
POST/requests/accept-applicationAccept an applicationacceptApplicationWithParams()
POST/requests/reject-applicationReject an applicationrejectApplicationWithParams()
GET/requests/applications/{requestId}View applications for a requestviewApplications()

Professional Features

ProfessionalController

Handles professional search, applications, and job management. Base Path: /professional
MethodPathDescriptionController Method
GET/professional/searchSearch for service requestssearchJobs()
POST/professional/searchSearch with filterssearchJobsWithForm()
GET/professional/applicationsView professional’s applicationsverPostulaciones()
POST/professional/postular/{ofertaId}Apply to a service requestpostularse()
POST/professional/applications/edit/{postulacionId}Edit an applicationeditarPostulacion()
POST/professional/applications/withdraw/{postulacionId}Withdraw an applicationretirarPostulacion()

PostulacionesController

Manages applications and job state transitions. Base Path: /jobs/applications
MethodPathDescriptionController Method
GET/jobs/applications/{id}View applications for a requestverPostulacionesSolicitud()
POST/jobs/applications/aceptar/{postulacionId}Accept an applicationaceptarPostulacionEspecifica()
POST/jobs/applications/rechazar/{postulacionId}Reject an applicationrechazarPostulacionEspecifica()
POST/jobs/applications/finalizar/{jobId}Finalize a completed jobfinalizarTrabajoCompletado()
POST/jobs/applications/pausar/{jobId}Pause a jobpausarTrabajoEnProgreso()
POST/jobs/applications/reanudar/{jobId}Resume a paused jobreanudarTrabajoPausado()
POST/jobs/applications/iniciar/{jobId}Start a jobiniciarTrabajoCreado()
POST/jobs/applications/cancelar/{jobId}Cancel a jobcancelarTrabajo()

Ratings

RatingsController

Manages rating creation for completed jobs. Base Path: /ratings
MethodPathDescriptionController Method
POST/ratings/crearCreate a new ratingcrearNuevaValoracion()

Shared Features

SharedController

Handles pages accessible by all authenticated users. Base Path: /shared
MethodPathDescriptionController Method
GET/shared/historyView job historymostrarHistorial()
GET/shared/ratingsView ratings pagemostrarValoraciones()

Administration

AdminController

Manages administrative pages. Base Path: /admin
MethodPathDescriptionController Method
GET/admin/usersUser management pagemostrarGestionUsuarios()
GET/admin/statsStatistics pagemostrarEstadisticas()

CategoryController

Handles category management (CRUD operations). Base Path: /admin
MethodPathDescriptionController Method
GET/admin/categoriesCategory management pagecategoriesPage()
POST/admin/categoriesCreate or update categorycategorySave()
GET/admin/edit/{id}Load category for editingcategoryForEdit()
GET/admin/delete/{id}Delete a categorydeleteCategory()
GET/admin/toggle/{id}Toggle category active statustoggleCategoryStatus()

Error Handling

CustomErrorController

Handles custom error pages.
MethodPathDescriptionController Method
GET/error/403Forbidden access pageforbidden()
ALL/errorGeneral error handler (404, 500)handleError()

Controller Advice

UserControllerAdvice

Global controller advice that adds the authenticated user to all views. Model Attribute: Adds usuario (current authenticated user) to all view models automatically.

Notes

  • All endpoints under /admin/** require ADMIN role
  • All endpoints under /professional/** require PROFESSIONAL role
  • All endpoints under /user/** and /shared/** require authentication
  • Most POST endpoints redirect with flash attributes for success/error messages
  • Path variables are denoted with {variableName} syntax
  • Query parameters are handled via @RequestParam annotations

Build docs developers (and LLMs) love