Gradii Docs

GET
/v2/job-campaigns

Get all job campaigns

Retrieve a list of all job campaigns for your organization with optional filtering and sorting options.

Headers

Authorizationstring
required

Bearer token for authentication

text
Authorization: Bearer iai_your_token_here

Query Parameters

searchstringoptional

Search campaigns by name, job title, or description

statusenumoptional

Filter by campaign status: draft, active, paused, closed

departmentstringoptional

Filter by department

locationstringoptional

Filter by location

experienceLevelstringoptional

Filter by experience level

employeeTypestringoptional

Filter by employee type

sortByenumoptional

Sort field: campaignName, jobTitle, createdAt, updatedAt, applicationDeadline (default: createdAt)

sortOrderenumoptional

Sort order: asc, desc (default: desc)

Response Schema

200
Success
json
{
  "success": true,
  "data": [
    {
      "id": "string",
      "campaignName": "string",
      "jobTitle": "string",
      "department": "string",
      "location": "string",
      "experienceLevel": "string",
      "employeeType": "string",
      "salaryMin": "number",
      "salaryMax": "number",
      "salaryNegotiable": "boolean",
      "currency": "string",
      "numberOfOpenings": "number",
      "status": "draft | active | paused | closed",
      "campaignType": "string",
      "applicationDeadline": "string (ISO 8601)",
      "targetHireDate": "string (ISO 8601)",
      "isRemote": "boolean",
      "isHybrid": "boolean",
      "totalApplicants": "number",
      "activeApplicants": "number",
      "autoSchedulingEnabled": "boolean",
      "createdAt": "string (ISO 8601)",
      "updatedAt": "string (ISO 8601)"
    }
  ],
  "timestamp": "string (ISO 8601)",
  "version": "2.0"
}

Example Response

json
{
  "success": true,
  "data": [
    {
      "id": "c7a3b2e1-4f6d-4a5b-8c9e-1234567890ab",
      "campaignName": "Senior Developer Hiring Q1 2024",
      "jobTitle": "Senior Software Engineer",
      "department": "Engineering",
      "location": "San Francisco, CA",
      "experienceLevel": "Senior (5+ years)",
      "employeeType": "Full-time",
      "salaryMin": 120000,
      "salaryMax": 180000,
      "salaryNegotiable": true,
      "currency": "USD",
      "numberOfOpenings": 3,
      "status": "active",
      "campaignType": "standard",
      "applicationDeadline": "2024-03-31T23:59:59Z",
      "targetHireDate": "2024-04-01T00:00:00Z",
      "isRemote": false,
      "isHybrid": true,
      "totalApplicants": 45,
      "activeApplicants": 12,
      "autoSchedulingEnabled": true,
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-01-20T14:22:00Z"
    }
  ],
  "timestamp": "2024-01-20T15:30:00Z",
  "version": "2.0"
}

Error Responses

401
Unauthorized
json
{
  "success": false,
  "error": "Authentication failed",
  "code": "AUTH_FAILED",
  "timestamp": "2024-01-20T15:30:00Z",
  "version": "2.0"
}
403
Forbidden
json
{
  "success": false,
  "error": "Insufficient permissions",
  "code": "INSUFFICIENT_PERMISSIONS",
  "required_permissions": ["job-campaigns:read"],
  "timestamp": "2024-01-20T15:30:00Z",
  "version": "2.0"
}
500
Internal Server Error
json
{
  "success": false,
  "error": "Failed to fetch job campaigns",
  "code": "FETCH_ERROR",
  "timestamp": "2024-01-20T15:30:00Z",
  "version": "2.0"
}