{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/greenhouse/json-schema/greenhouse-application-schema.json",
  "title": "Application",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/greenhouse-applications-api-openapi.yml#/components/schemas/Application",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "candidate_id": {
      "type": "integer"
    },
    "prospect": {
      "type": "boolean"
    },
    "applied_at": {
      "type": "string",
      "format": "date-time"
    },
    "rejected_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "last_activity_at": {
      "type": "string",
      "format": "date-time"
    },
    "location": {
      "type": "object",
      "properties": {
        "address": {
          "type": "string"
        }
      }
    },
    "source": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "public_name": {
          "type": "string"
        }
      }
    },
    "credited_to": {
      "$ref": "#/$defs/UserRef"
    },
    "rejection_reason": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "rejection_details": {
      "type": [
        "object",
        "null"
      ]
    },
    "jobs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          }
        }
      }
    },
    "job_post_id": {
      "type": [
        "integer",
        "null"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "rejected",
        "hired",
        "converted"
      ]
    },
    "current_stage": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "answers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "question": {
            "type": "string"
          },
          "answer": {
            "type": "string"
          }
        }
      }
    },
    "custom_fields": {
      "type": "object",
      "additionalProperties": true
    }
  },
  "$defs": {
    "UserRef": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "integer"
        },
        "first_name": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "employee_id": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}