Skip to content

API Route Map Sprint 2

Morales Patty Jose Manuel edited this page Dec 1, 2024 · 2 revisions

Endpoints

Users

GET /api/users-jobs/users/{identityId} 🟒

  • Auth: Default Authentication
  • Description: Get User by Identity Id
  • Difficulty: Medium
  • Link to Clickup: Clickup

Route Params:

  • identityId: The Identity Id of the User (Clerk)

Response:

{
  "id": "user uuid",
  "role": "user role", // `Recruiter` | `Developer`
  "email": "user email",
  "doOnboarding": true, // (boolean) true if the user already to the onboarding
  "developerId": "developer uuid", // (Optional) possible null
  "recruiterId": "recruiter uuid" // (Optional) possible null
}

POST /api/users-jobs/users 🟒

  • Auth: Open
  • Description: Post a new user
  • Difficulty: Medium
  • Link to Clickup: Clickup

Data:

{
  "identityId": "user identity id",
  "role": "user role", // `Recruiter` | `Developer`
  "email": "user email"
}

Recruiters

GET /api/users-jobs/recruiters 🟒

  • Auth: Open
  • Description: Retrieve list of all Recruiters with pagination
  • Difficulty: Hard
  • Link to Clickup: Clickup

Query Params:

  • page: (Default 1) actual pagination page
  • pageSize: (Default 10) actual pagination page size

Response:

{
  "items": [
    {
       "id": "recruiter uuid",
       "name": "recruiter name",
       "location": "recruiter location", // string? | possible null
       "description": "recruiter description", // string? | possible null
       "profilePictureUrl": "recruiter profile picture Url", // string? | possible null
       "isVerified": true, // (boolean)
       "userId": "the user uuid",
       "createdAt": "2012-04-21T18:25:43-05:00", // Created at DateTime
       "updatedAt": "2012-04-21T18:25:43-05:00" // Updated at DateTime
    }
  ],
  "page": "selected page",
  "pageSize": "size of the selected page",
  "totalCount": "total number of jobs",
  "hasNextPage": true, // (boolean) | if there is a next page
  "hasPreviousPage": true // (boolean) | if there is a previous page
}

GET /api/users-jobs/recruiters/{recruiterId:guid}/jobs 🟒

  • Auth: Open
  • Description: Retrieve a list of jobs of a recruiter with pagination
  • Difficulty: Hard
  • Link to Clickup: Clickup

Route Params:

  • recruiterId: The recruiter id

Query Params:

  • page: (Default 1) actual pagination page
  • pageSize: (Default 10) actual pagination page size

Response:

{
  "items": [
    {
       "id": "job uuid",
       "title": "job title",
       "salaryPerHour": 0.00, // (double) | job salary per hour
       "schedule": "job schedule", // `Full Time` | `Part Time`
       "modality": "job modality", // `Remote` | `On Site`
       "status": "job status", // `Open` | `In Progress` | `For Review` | `Done`
       "description": "job description", // string? | possible null
       "location": "job location", // string? | possible null
       "recruiterId": "job recruiter uuid",
       "recruiterLogo": "job recruiter url logo", // string? | possible null
       "createdAt": "2012-04-21T18:25:43-05:00", // Created at DateTime
       "updatedAt": "2012-04-21T18:25:43-05:00" // Updated at DateTime
    }
  ],
  "page": "selected page",
  "pageSize": "size of the selected page",
  "totalCount": "total number of jobs",
  "hasNextPage": true, // (boolean) | if there is a next page
  "hasPreviousPage": true // (boolean) | if there is a previous page
}

GET /api/users-jobs/recruiters/{recruiterId:guid}/applicants/{jobId:guid} 🟒

  • Auth: Recruiters
  • Description: Retrieve list of all Jobs applicants of a recruiter with pagination
  • Difficulty: Very Hard
  • Link to Clickup: Clickup

Route Params:

  • recruiterId: The Id of the Recruiter
  • jobId: The Id of the job of the recruiter

Query Params:

  • status: "Published" | "Accepted" | "Rejected" | "Viewed" // (Default null) Optional
  • page: (Default 1) actual pagination page
  • pageSize: (Default 10) actual pagination page size

Response:

{
  "jobId": "uuid of job",
  "jobTitle": "Title of the job",
  "developers": {
    "items": [
      {
        "developerId": "uuid of the applicant developer",
        "developerProfileUrl": "link url of the profile picture of the developer",
        "developerName": "The name of the developer",
        "developerLastName": "The last name of the developer",
        "status": "Application status", // `Published`, `Viewed`, `Accepted`, `Rejected`
        "createdAt": "2012-04-21T18:25:43-05:00", // Created at DateTime
        "updatedAt": "2012-04-21T18:25:43-05:00" // Updated at DateTime
      }
    ],
    "page": "selected page",
    "pageSize": "size of the selected page",
    "totalCount": "total number of jobs",
    "hasNextPage": true, // (boolean) | if there is a next page
    "hasPreviousPage": true // (boolean) | if there is a previous page
  }
}

GET /api/users-jobs/recruiters/{recruiterId:guid}/applicants/{jobId:guid}/stats 🟒

  • Auth: Recruiters
  • Description: Stats of the recruiter applicants in a specific job
  • Difficulty: Medium
  • Link to Clickup: Clickup

Route Params:

  • recruiterId: The Id of the recruiter
  • jobId: The Id of the job

Response:

{
  "total": 45,
  "pending": 20,
  "accepted": 15,
  "rejected": 8,
  "viewed": 2
}

POST /api/users-jobs/recruiters 🟒

  • Auth: Default authentication
  • Description: Post a new recruiter
  • Difficulty: Medium
  • Link to Clickup: Clickup

Data:

{
  "userId": "uuid of the user",
  "name": "company name",
  "location": "company location",
  "profilePicture": "link"
}

PATCH /api/users-jobs/recruiters/{recruiterId:guid}/about 🟒

  • Auth: Recruiters
  • Description: Update recruiter description
  • Difficulty: Easy
  • Link to Clickup: Clickup

Route Params:

  • recruiterId: The Id of the recruiter

Data:

{
  "about": "Markdown About of Recruiter"
}

Developers

GET /api/users-jobs/developers/{developerId:guid}/applications 🟒

  • Auth: Developers
  • Description: Retrieve list of all Jobs applications of a developer with pagination
  • Difficulty: Very Hard
  • Link to Clickup: Clickup

Route Params:

  • developerId: The Id of the developer

Query Params:

  • status: "Published" | "Accepted" | "Rejected" | "Viewed" // (Default null) Optional
  • page: (Default 1) actual pagination page
  • pageSize: (Default 10) actual pagination page size

Response:

{
  "items": [
    {
      "status": "Application status", // `Published`, `Viewed`, `Accepted`, `Rejected`
      "jobId": "uuid of job",
      "jobTitle": "Title of the job",
      "recruiterId": "uuid of the recruiter of the job",
      "recruiterName": "Recruiter name",
      "recruiterProfileUrl": "link url of the profile picture of the recruiter",
      "createdAt": "2012-04-21T18:25:43-05:00", // Created at DateTime
      "updatedAt": "2012-04-21T18:25:43-05:00" // Updated at DateTime
    }
  ],
  "page": "selected page",
  "pageSize": "size of the selected page",
  "totalCount": "total number of jobs",
  "hasNextPage": true, // (boolean) | if there is a next page
  "hasPreviousPage": true // (boolean) | if there is a previous page
}

GET /api/users-jobs/developers/{developerId:guid}/applications/stats 🟒

  • Auth: Developers
  • Description: Stats of a developer by Id
  • Difficulty: Medium
  • Link to Clickup: Clickup

Route Params:

  • developerId: The Id of the developer

Response:

{
  "total": 45,
  "pending": 20,
  "accepted": 15,
  "rejected": 8,
  "viewed": 2
}

POST /api/users-jobs/developers 🟒

  • Auth: Default authentication
  • Description: Post a new developer
  • Difficulty: Very Hard
  • Link to Clickup: Clickup

Data:

{
  "userId": "uuid of user",
  "firstName": "firstName",
  "lastName": "LastName",
  "modality": "Developer modality preferred", // `Remote`, `Hybrid`, `On Site`
  "yearsOfExperience": 5, // max 20
  "salaryExpected": 10.50, // (double) `salary expected per hour`
  "location": "location of developer",
  "profilePicture": "developer profile picture url", // (Optional) possible null
  "portfolioUrl": "developer portfolio url", // (Optional) possible null
  "specializationId": "uuid specialization",
  "skills": [
    "uuid skill",
    "uuid skill"
  ],
  "spokenLanguages": [
    "uuid of language",
    "uuid of language"
  ]
}

PATCH /api/users-jobs/developers/{developerId:guid}/description 🟒

  • Auth: Developers
  • Description: Update developer description
  • Difficulty: Medium
  • Link to Clickup: Clickup

Route Params:

  • developerId: The id of the developer

Data:

{
  "description": "Markdown CV of Developer"
}

Jobs

GET /api/users-jobs/jobs 🟒

  • Auth: Open
  • Description: Retrieve list of all Jobs with pagination
  • Difficulty: Hard
  • Link to Clickup: Clickup

Query Params:

  • page: (Default 1) actual pagination page
  • pageSize: (Default 10) actual pagination page size

Response:

{
  "items": [
    {
       "id": "job uuid",
       "title": "job title",
       "salaryPerHour": 0.00, // (double) | job salary per hour
       "schedule": "job schedule", // `Full Time` | `Part Time`
       "modality": "job modality", // `Remote` | `On Site`
       "status": "job status", // `Open` | `In Progress` | `For Review` | `Done`
       "description": "job description", // string? | possible null
       "location": "job location", // string? | possible null
       "recruiterId": "job recruiter uuid",
       "recruiterLogo": "job recruiter url logo", // string? | possible null
       "createdAt": "2012-04-21T18:25:43-05:00", // Created at DateTime
       "updatedAt": "2012-04-21T18:25:43-05:00" // Updated at DateTime
    }
  ],
  "page": "selected page",
  "pageSize": "size of the selected page",
  "totalCount": "total number of jobs",
  "hasNextPage": true, // (boolean) | if there is a next page
  "hasPreviousPage": true // (boolean) | if there is a previous page
}

GET /api/users-jobs/jobs/{jobId:guid} 🟒

  • Auth: Open
  • Description: Retrieve a Job with Id
  • Difficulty: Medium
  • Link to Clickup: Clickup

Route Params:

  • jobId: The id of the Job

Response:

{
  "id": "job uuid",
  "title": "job title",
  "salaryPerHour": 0.00, // (double) | job salary per hour
  "schedule": "job schedule", // `Full Time` | `Part Time`
  "modality": "job modality", // `Remote` | `On Site`
  "status": "job status", // `Open` | `In Progress` | `For Review` | `Done`
  "description": "job description", // string? | possible null
  "location": "job location", // string? | possible null
  "recruiterId": "job recruiter uuid",
  "recruiterLogo": "job recruiter url logo", // string? | possible null
  "createdAt": "2012-04-21T18:25:43-05:00", // Created at DateTime
  "updatedAt": "2012-04-21T18:25:43-05:00" // Updated at DateTime
}

POST /api/users-jobs/jobs 🟒

  • Auth: Recruiter
  • Description: Post a new job
  • Difficulty: Hard
  • Link to Clickup: Clickup

Data:

{
  "title": "job title",
  "salaryPerHour": 75.0, // (double)
  "schedule": "job schedule", // `Full Time` | `Part Time`
  "modality": "job modality", // `Remote` | `On Site`
  "location": "job location here", // Optional possible null
  "description": "job description here", // Min 50 characters
  "skills": [
    "uuid skill",
    "uuid skill"
  ],
  "languages": ["uuid language", "uuid language"],
  "recruiterId": "Recruiter Id Job",
  "specializationId": "Specialization Id Job"
}

POST /api/users-jobs/jobs/apply/{jobId} 🟒

  • Auth: Developer
  • Description: Apply to an existing job
  • Difficulty: Medium
  • Link to Clickup: Clickup

Route Params:

  • jobId: The id of the Job

Data:

{
  "developerId": "uuid of developer"
}

Languages

GET /api/users-jobs/languages 🟒

  • Auth: Open
  • Description: Retrieve list of all languages
  • Difficulty: Easy
  • Link to Clickup: Clickup

Response:

[
  {
    "id": "uuid language",
    "name": "language name"
  }
]

Skills

GET /api/users-jobs/skills 🟒

  • Auth: Open
  • Description: Retrieve list of all skills
  • Difficulty: Easy
  • Link to Clickup: Clickup

Response:

[
  {
    "id": "uuid skill",
    "name": "skill name"
  }
]

Specializations

GET /api/users-jobs/specializations 🟒

  • Auth: Open
  • Description: Retrieve list of all specilizations
  • Difficulty: Easy
  • Link to Clickup: Clickup

Response:

[
    {
      "id": "uuid specialization",
      "name": "speclization name"
    }
]

Clone this wiki locally