{
  "info": {
    "name": "Candidates API",
    "description": "Candidate management endpoints",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "List Candidates",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          }
        ],
        "url": {
          "raw": "{{base_url}}/candidates?per_page=15&page=1&status=active&sort=-created_at",
          "host": ["{{base_url}}"],
          "path": ["candidates"],
          "query": [
            {
              "key": "per_page",
              "value": "15"
            },
            {
              "key": "page",
              "value": "1"
            },
            {
              "key": "status",
              "value": "active"
            },
            {
              "key": "sort",
              "value": "-created_at"
            }
          ]
        }
      }
    },
    {
      "name": "Create Candidate",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"first_name\": \"Ahmed\",\n  \"last_name\": \"Mohammed\",\n  \"email\": \"ahmed@example.com\",\n  \"phone\": \"+966512345678\",\n  \"nationality\": \"Saudi\",\n  \"date_of_birth\": \"1990-05-15\",\n  \"qualification\": \"Bachelor in Computer Science\",\n  \"current_job_title\": \"Software Developer\",\n  \"current_company\": \"Tech Company XYZ\",\n  \"years_of_experience\": 3,\n  \"expected_salary\": 8000,\n  \"notice_period\": \"2 weeks\",\n  \"cv_url\": \"https://example.com/cv/ahmed.pdf\",\n  \"linkedin_profile\": \"https://linkedin.com/in/ahmed\",\n  \"status\": \"active\"\n}"
        },
        "url": {
          "raw": "{{base_url}}/candidates",
          "host": ["{{base_url}}"],
          "path": ["candidates"]
        }
      }
    },
    {
      "name": "Get Candidate",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          }
        ],
        "url": {
          "raw": "{{base_url}}/candidates/1",
          "host": ["{{base_url}}"],
          "path": ["candidates", "1"]
        }
      }
    },
    {
      "name": "Update Candidate",
      "request": {
        "method": "PATCH",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"phone\": \"+966512345679\",\n  \"expected_salary\": 9000,\n  \"notice_period\": \"1 month\",\n  \"status\": \"active\"\n}"
        },
        "url": {
          "raw": "{{base_url}}/candidates/1",
          "host": ["{{base_url}}"],
          "path": ["candidates", "1"]
        }
      }
    },
    {
      "name": "Delete Candidate",
      "request": {
        "method": "DELETE",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          }
        ],
        "url": {
          "raw": "{{base_url}}/candidates/1",
          "host": ["{{base_url}}"],
          "path": ["candidates", "1"]
        }
      }
    },
    {
      "name": "Apply to Job",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"job_opening_id\": 1,\n  \"cover_letter\": \"I am interested in this position...\",\n  \"applied_date\": \"2026-01-15\"\n}"
        },
        "url": {
          "raw": "{{base_url}}/candidates/1/apply",
          "host": ["{{base_url}}"],
          "path": ["candidates", "1", "apply"]
        }
      }
    },
    {
      "name": "Move to Next Stage",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"job_opening_id\": 1,\n  \"next_stage_id\": 2,\n  \"notes\": \"Passed initial screening\"\n}"
        },
        "url": {
          "raw": "{{base_url}}/candidates/1/move-next-stage",
          "host": ["{{base_url}}"],
          "path": ["candidates", "1", "move-next-stage"]
        }
      }
    },
    {
      "name": "Accept Candidate",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"job_opening_id\": 1,\n  \"acceptance_notes\": \"Candidate has been accepted for the position\"\n}"
        },
        "url": {
          "raw": "{{base_url}}/candidates/1/accept",
          "host": ["{{base_url}}"],
          "path": ["candidates", "1", "accept"]
        }
      }
    },
    {
      "name": "Reject Candidate",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"job_opening_id\": 1,\n  \"rejection_reason\": \"Did not meet the required experience level\"\n}"
        },
        "url": {
          "raw": "{{base_url}}/candidates/1/reject",
          "host": ["{{base_url}}"],
          "path": ["candidates", "1", "reject"]
        }
      }
    },
    {
      "name": "Hold Candidate",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"hold_reason\": \"Candidate is on hold for future consideration\"\n}"
        },
        "url": {
          "raw": "{{base_url}}/candidates/1/hold",
          "host": ["{{base_url}}"],
          "path": ["candidates", "1", "hold"]
        }
      }
    },
    {
      "name": "Get Top Candidates",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          }
        ],
        "url": {
          "raw": "{{base_url}}/candidates/top-candidates?limit=10",
          "host": ["{{base_url}}"],
          "path": ["candidates", "top-candidates"],
          "query": [
            {
              "key": "limit",
              "value": "10"
            }
          ]
        }
      }
    }
  ]
}
