Skip to main content

GET /api/jobs

Retrieve a list of all job opportunities in Dzaleka Refugee Camp.

Query Parameters

This endpoint does not require any query parameters.

Response Format

status
string
required
Status of the API response (“success” or “error”)
count
number
required
Total number of jobs returned
data
object
required
Container for the jobs data
jobs
array
required
Array of job objects
id
string
Unique identifier for the job
collection
string
Collection name (“jobs”)
title
string
Job title
organization
string
Hiring organization name
location
string
Job location (e.g., “Remote”, “Dzaleka”, “Remote / Dzaleka”)
type
string
Job type (e.g., “full-time”, “part-time”, “contract”, “internship”)
category
string
Job category (e.g., “business”, “technology”, “education”)
posted
string
Date posted (YYYY-MM-DD)
deadline
string
Application deadline (YYYY-MM-DD)
status
string
Job status (“open”, “closed”, “filled”)
Whether the job is featured
description
string
Job description summary
skills
array
Array of required skills
contact
object
Contact information
email
string
Application email
website
string
Organization website
phone
string
Contact phone number

Error Responses

status
string
“error”
message
string
Error message description
error
string
Detailed error information
Status Codes:
  • 200 - Success
  • 429 - Rate limit exceeded (60 requests per minute)
  • 500 - Internal server error

Rate Limiting

All API endpoints are rate-limited to 60 requests per minute per IP address. Rate limit headers are included in responses:
  • X-RateLimit-Limit: Maximum requests per window
  • X-RateLimit-Remaining: Remaining requests in current window
  • X-RateLimit-Reset: Timestamp when the rate limit resets
  • Retry-After: Seconds to wait before retrying (only on 429 responses)

Example Request

curl -X GET "https://services.dzaleka.com/api/jobs" \
  -H "Content-Type: application/json"

Example Response

{
  "status": "success",
  "count": 1,
  "data": {
    "jobs": [
      {
        "id": "Content-Curator-and-Editor",
        "collection": "jobs",
        "title": "Content Curator & Editor",
        "organization": "Dzaleka Digital Heritage",
        "location": "Remote / Dzaleka",
        "type": "part-time",
        "category": "business",
        "posted": "2025-03-12",
        "deadline": "2025-05-12",
        "status": "open",
        "featured": true,
        "description": "Join Dzaleka Digital Heritage as a Content Curator & Editor to help shape and refine the digital narratives that showcase the stories of Dzaleka's community. Bring your creativity to the forefront by managing and curating multimedia content for our platform.",
        "skills": [
          "Content creation",
          "Editing & proofreading",
          "Digital storytelling",
          "Multimedia curation",
          "Content management systems (CMS)",
          "Photography & video editing",
          "Collaborative Teamwork"
        ],
        "contact": {
          "email": "dzalekaconnect@gmail.com",
          "website": "https://services.dzaleka.com",
          "phone": ""
        }
      }
    ]
  }
}

POST /api/jobs

Retrieve jobs data with optional metadata and statistics.

Request Body

options
object
Optional configuration for the response
includeMetadata
boolean
Include export metadata in response
includeStats
boolean
Include statistics in response

Response Format

Same as GET endpoint, with optional additional fields:
metadata
object
Export metadata (only if includeMetadata: true)
exportDate
string
ISO 8601 timestamp of export
collection
string
Collection name
stats
object
Statistics (only if includeStats: true)
totalItems
number
Total number of items
collection
string
Collection name

Example Request

curl -X POST "https://services.dzaleka.com/api/jobs" \
  -H "Content-Type: application/json" \
  -d '{
    "options": {
      "includeMetadata": true,
      "includeStats": true
    }
  }'

Example Response

{
  "status": "success",
  "count": 15,
  "data": {
    "jobs": [
      {
        "id": "Content-Curator-and-Editor",
        "title": "Content Curator & Editor",
        "organization": "Dzaleka Digital Heritage",
        "type": "part-time",
        "status": "open"
      }
    ]
  },
  "metadata": {
    "exportDate": "2025-03-09T12:00:00.000Z",
    "collection": "jobs"
  },
  "stats": {
    "totalItems": 15,
    "collection": "jobs"
  }
}

Implementation

The Jobs API is implemented using the createGetHandler and createPostHandler utility functions from src/utils/api-utils.ts:118. Source code: src/pages/api/jobs.ts:5