Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Single Job Listing #470

Open
ghost opened this issue Aug 7, 2024 · 0 comments
Open

Get Single Job Listing #470

ghost opened this issue Aug 7, 2024 · 0 comments

Comments

@ghost
Copy link

ghost commented Aug 7, 2024

Title: Implement API Endpoint to Retrieve a Single Job Listing by ID

Description:
Implement an API endpoint that allows authenticated users to retrieve the details of a specific job listing by its ID. This will help users view the information related to a particular job posting.

Endpoint Details:

  • Endpoint: GET /api/v1/jobs/:id
  • Method: GET
  • Authentication: Required
  • Parameters:
    • Path Parameter: id (string) - The unique identifier of the job listing to be retrieved.

Expected Response:

  • 200 OK: When the job listing is successfully retrieved.
  • 404 Not Found: When the job listing with the specified ID does not exist.
  • 500 Internal Server Error: When an unexpected error occurs on the server.

Response Schema:

{
  "status": "success",
  "status_code": 200,
  "message": "Job listing retrieved successfully",
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "title": "Software Engineer",
    "description": "This is a job description",
    "location": "Remote",
    "deadline": "2023-07-21T19:58:00.000Z",
    "salary_range": "50k_to_70k",
    "job_type": "full-time",
    "job_mode": "remote",
    "company_name": "ABC Company"
  }
}

Acceptance Criteria:

  1. Success Response:

    • The endpoint should return a 200 OK status code when a job listing is successfully retrieved.
    • The response body should contain the details of the job listing as specified in the response schema.
    • Example:
      {
        "status": "success",
        "status_code": 200,
        "message": "Job listing retrieved successfully",
        "data": {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "title": "Software Engineer",
          "description": "This is a job description",
          "location": "Remote",
          "deadline": "2023-07-21T19:58:00.000Z",
          "salary_range": "50k_to_70k",
          "job_type": "full-time",
          "job_mode": "remote",
          "company_name": "ABC Company"
        }
      }
  2. Not Found Response:

    • The endpoint should return a 404 Not Found status code when a job listing with the specified ID does not exist.
    • The response body should contain an error message.
    • Example:
      {
        "status": "error",
        "status_code": 404,
        "message": "Job listing not found"
      }
  3. Internal Server Error Response:

    • The endpoint should return a 500 Internal Server Error status code when an unexpected error occurs.
    • The response body should contain an error message.
    • Example:
      {
        "status": "error",
        "status_code": 500,
        "message": "Internal server error"
      }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants