{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/popp/json-schema/popp-create-analysis-candidate-input-schema.json",
  "title": "CreateAnalysisCandidateInput",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/popp-analysis-api-openapi.yml#/components/schemas/CreateAnalysisCandidateInput",
  "type": "object",
  "properties": {
    "analysisId": {
      "type": "string",
      "title": "Analysis ID",
      "description": "The unique identifier for the analysis."
    },
    "externalAnalysisId": {
      "type": "string",
      "title": "External Analysis ID",
      "description": "The unique identifier for the analysis in the external system. Surrounding whitespace is removed before the analysis is resolved."
    },
    "documentUrl": {
      "type": "string",
      "format": "uri",
      "title": "Document URL",
      "description": "The URL of the document to analyze. Must be a valid URL."
    },
    "documentBase64": {
      "type": "string",
      "title": "Document Base64",
      "description": "The base64-encoded content of the document to analyze."
    },
    "firstName": {
      "type": "string",
      "title": "First Name",
      "description": "The first name of the candidate."
    },
    "lastName": {
      "type": "string",
      "title": "Last Name",
      "description": "The last name of the candidate."
    },
    "phoneNumber": {
      "type": "string",
      "title": "Phone Number",
      "description": "The phone number of the candidate in E.164 format."
    },
    "emailAddress": {
      "type": "string",
      "format": "email",
      "title": "Email Address",
      "description": "The email address of the candidate."
    },
    "externalId": {
      "type": "string",
      "title": "External ID",
      "description": "The unique identifier for the candidate in the external system."
    },
    "documentType": {
      "type": "string",
      "enum": [
        "cv",
        "questionnaire"
      ],
      "default": "cv",
      "title": "Document Type",
      "description": "The type of document being uploaded. Defaults to 'cv'."
    }
  },
  "oneOf": [
    {
      "title": "Analysis ID Required",
      "description": "Either analysisId or externalAnalysisId is required.",
      "required": [
        "analysisId"
      ]
    },
    {
      "title": "External Analysis ID Required",
      "description": "Either externalAnalysisId or analysisId is required.",
      "required": [
        "externalAnalysisId"
      ]
    }
  ],
  "additionalProperties": false
}