The Applications API is the bridge between job seekers and employers on LWS Job Portal. When aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/iDevRanjan/lws-ra-b4-assignment-five/llms.txt
Use this file to discover all available pages before exploring further.
USER applies for a job, a new Application record is created that snapshots their current resumeUrl alongside the coverLetter they provide. The initial status is New. Employers (COMPANY) can then move an application through a defined lifecycle — New → Shortlisted → Interviewed → Hired (or Rejected at any stage). Users can monitor all their submissions with status and date filters, and withdraw any application they own. All applicant listings enforce company ownership so that one company cannot see another’s applicants.
Application Object
Unique application identifier.
ID of the job applied to.
ID of the applicant.
Application lifecycle state —
New, Shortlisted, Interviewed, Rejected, or Hired. Default is New.Cover letter submitted with the application.
Snapshot of the applicant’s résumé URL at the time of application.
Timestamp when the application was submitted.
Timestamp of the most recent status change.
Application Status Lifecycle
| Status | Set by | Meaning |
|---|---|---|
New | System | Application just submitted, not yet reviewed |
Shortlisted | Company | Candidate selected for further consideration |
Interviewed | Company | Candidate has been / is scheduled for an interview |
Rejected | Company | Application declined |
Hired | Company | Offer extended and accepted |
Endpoints
POST /api/applications/jobs/:jobId/apply
Submit a job application. Requires the user to have a résumé already uploaded to their profile. Prevents duplicate applications to the same job. Auth: Required — Bearer token (USER role)
The
resumeUrl is snapshotted from the user’s current profile at submission time. Updating the résumé later does not retroactively change the URL stored on an existing application.Request
The UUID of the job to apply for.
The applicant’s cover letter. Must be a non-empty string. Returns
400 if omitted.Response
true on successful submission.The newly created Application object, including
id, jobId, userId, status (New), coverLetter, resumeUrl, createdAt, and updatedAt.Example
GET /api/applications/my-applications
List all job applications submitted by the authenticated user. Supports filtering by status, applied-date window, and sort direction. Auth: Required — Bearer token (USER role)
Request
Comma-separated status values to filter by. Example:
status=New,Shortlisted. Possible values: New, Shortlisted, Interviewed, Rejected, Hired.Applied-date window. Accepted values:
last 7 dayslast 30 days3 months
Newest First (default) or Oldest First — sorts by createdAt.Response
true on success.Total number of applications returned.
Array of Application objects. Each entry includes a nested
job object with its full details, and within the job a nested company object (name, logoUrl, location).Example
GET /api/applications/jobs/:jobId/applicants
List all applicants for a specific job. Only the company that owns the job can call this endpoint. Returns Application records with nested user profile details. Auth: Required — Bearer token (COMPANY role, must own the job)
Request
The UUID of the job whose applicants to retrieve.
Response
true on success.Array of Application objects, each with a nested
user object containing id, name, email, title, location, and profilePictureUrl. Sorted by createdAt DESC.Example
PATCH /api/applications/:id/status
Update the status of a single application. The company must own the job the application belongs to. The allowed status values are validated server-side. Auth: Required — Bearer token (COMPANY role, must own the job)
Request
The UUID of the application to update.
The new status. Must be one of:
New, Shortlisted, Interviewed, Rejected, Hired. Any other value returns 400 Invalid status.Response
true on successful update.The updated Application object.
Example
- Shortlist
- Reject
- Hire
DELETE /api/applications/:id
Withdraw (permanently delete) an application. Only the user who submitted the application may withdraw it. Once withdrawn, the application is gone and cannot be restored — the user would need to re-apply. Auth: Required — Bearer token (USER role, must own the application)
Request
The UUID of the application to withdraw.
Response
true on successful withdrawal."Application withdrawn successfully"Example
Error Reference
| Status | Message | Cause |
|---|---|---|
400 | Cover letter is required | coverLetter field missing or empty in apply request |
400 | Please upload a resume to your profile first | User has no resumeUrl stored on their profile |
400 | You have already applied for this job | Duplicate application detected for the same jobId + userId |
400 | Invalid status | Status value not in the allowed enum |
401 | Not authorized, no token | Missing Authorization header |
403 | User role COMPANY is not authorized… | COMPANY token used on a USER-only route |
403 | Not authorized | Company does not own the job the application belongs to |
403 | Not authorized to withdraw this application | User does not own the application they are trying to delete |
404 | Job not found | No job with the given jobId |
404 | Application not found | No application with the given id |