The Jobs API is the core of LWS Job Portal. Public visitors can browse and search the full catalogue of active listings with rich filtering — by employment type, work mode, experience level, salary range, and skills — or look up a specific posting by its human-readable slug. Authenticated job seekers (Documentation 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) unlock a personalised recommendation feed scored against their profile’s skills and experience level. Authenticated employers (COMPANY) can create, edit, and delete their own postings. Every job carries an auto-generated slug derived from its title, a status lifecycle (Active, Closed, Archived), and a JSON skills array used for both filtering and recommendations.
All list endpoints that return job arrays also include a nested
company object (id, name, logoUrl, location) and an applicants count derived from the associated applications. The raw applications array is stripped from the response automatically.Job Object
Unique job identifier.
ID of the owning company.
Job title.
URL-safe unique slug auto-generated from the title (e.g.
senior-react-developer-1).Employment type —
Full-time, Part-time, Contract, Freelance, or Internship.Work arrangement —
Remote, On-site, or Hybrid.City or region of the role.
Lower bound of the salary range.
Upper bound of the salary range.
Hourly, Daily, Weekly, Monthly, or Yearly.Full job description.
Engineering, Design, Product, Marketing, Sales, HR, Finance, or Other.Entry, Mid, Senior, Expert, or Lead.Requirements and qualifications.
Benefits and perks offered.
Application deadline.
Number of open seats (default
1).Active (default), Closed, or Archived.JSON array of required skills (e.g.
["React", "Node.js"]).Count of submitted applications (computed, not stored).
Record creation timestamp.
Last-updated timestamp.
Endpoints
GET /api/jobs
Retrieve a paginated list of active job listings. Supports full-text search across titles and skills, multi-value enum filters, and salary range constraints. Auth: NoneRequest
Page number for pagination.
Number of results per page.
Case-insensitive full-text search. Matched against
title and the skills JSON array (cast to text). Example: search=react developer.Comma-separated employment types. Case-insensitive. Allowed values:
Full-time, Part-time, Contract, Freelance, Internship. Example: type=full-time,contract.Comma-separated experience levels. Case-insensitive. Allowed values:
Entry, Mid, Senior, Expert, Lead. Example: experienceLevel=mid,senior.Comma-separated skill names. A job matches if any of the requested skills appear in its
skills array. Example: skills=React,TypeScript.Filter to jobs where
salaryMin is at or above this value. Example: minSalary=50000.Filter to jobs where
salaryMax is at or below this value. Example: maxSalary=120000.Sort order. Options:
recent(default) — newest first bycreatedAtsalary_high— highestsalaryMaxfirstsalary_low— lowestsalaryMinfirst
Response
true on success.Total number of jobs matching the filters (used for pagination math).
Total number of pages given the current
limit.The page number returned.
Array of job objects, each with a nested
company object and an applicants count.Example
GET /api/jobs/recommendations
Return a personalised list of active jobs scored against the authenticated user’sskills and experienceLevel. Each skill match contributes 2 points; an exact experienceLevel match contributes 5 points. Jobs with a score of 0 are excluded. Results are sorted by descending score.
Auth: Required — Bearer token (USER role)
Request
No query parameters. The user’s profile is read from the JWT-resolvedreq.user.
Response
true on success.Scored and sorted array of active job objects, each with a nested
company object (name, logoUrl, location). Returns [] if the user has no skills and no experience level set.Example
GET /api/jobs/:slug
Fetch a single job by its URL slug. Returns the full job object including the full company profile (password excluded) and anapplicants count.
Auth: None
Request
The unique URL-safe slug of the job (e.g.
senior-react-developer).Response
true when the job is found.Full job object with a nested
company object (all fields, password excluded) and applicants count.Example
GET /api/jobs/:id/similar
Return up to 5 active jobs similar to the specified job, matched by sharedcategory or overlapping skills. The current job is excluded from results.
Auth: None
This endpoint takes the job’s UUID (
:id), not its slug. Route ordering in Express means /:id/similar is registered before /:slug, so numeric or UUID-like values resolve here first.Request
The UUID of the reference job.
Response
true on success.Number of similar jobs returned (0–5).
Array of similar job objects, each with a nested
company object (name, logoUrl, location).Example
POST /api/jobs
Create a new job listing under the authenticated company’s account. Theslug is auto-generated from the title and deduplicated with a numeric suffix if needed.
Auth: Required — Bearer token (COMPANY role)
Request
Job title (e.g.
"Senior React Developer"). Used to generate the slug.Employment type. Must be one of:
Full-time, Part-time, Contract, Freelance, Internship.Work arrangement. Must be one of:
Remote, On-site, Hybrid.City or region for the role.
Full job description (plain text or markdown).
Job category. One of:
Engineering, Design, Product, Marketing, Sales, HR, Finance, Other.Required seniority. One of:
Entry, Mid, Senior, Expert, Lead.Minimum salary value.
Maximum salary value.
Pay frequency. One of:
Hourly, Daily, Weekly, Monthly, Yearly.Qualifications and requirements (plain text).
Benefits and perks (plain text).
Required skills array (e.g.
["React", "Node.js"]). Used in recommendations and filtering.Number of open positions.
Application deadline.
Response
true on successful creation.The newly created job object including the generated
slug and id.Example
PUT /api/jobs/:id
Update an existing job listing. Only the company that owns the job may update it. Pass only the fields you want to change — the entirereq.body is diffed against the existing record.
Auth: Required — Bearer token (COMPANY role, must own the job)
Request
UUID of the job to update.
Updated job title.
Updated employment type.
Updated work arrangement.
Updated location.
Updated description.
Updated category.
Updated experience level.
Updated minimum salary.
Updated maximum salary.
Updated pay period.
Updated requirements.
Updated benefits.
Updated skills array.
Updated vacancy count.
Updated deadline.
Lifecycle status —
Active, Closed, or Archived.Response
true on successful update.The updated job object.
Example
DELETE /api/jobs/:id
Permanently delete a job listing and all associated data. Only the owning company may delete it. Auth: Required — Bearer token (COMPANY role, must own the job)
Request
UUID of the job to delete.
Response
true on successful deletion."Job removed"Example
Error Reference
| Status | Message | Cause |
|---|---|---|
401 | Not authorized, no token | Missing Authorization header on protected route |
403 | User role USER is not authorized… | USER token used on a COMPANY-only route |
403 | Not authorized to update this job | Company token does not own the specified job |
403 | Not authorized to delete this job | Company token does not own the specified job |
404 | Job not found | No job exists with the given slug or UUID |