{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/popp/json-schema/popp-get-candidate-response-schema.json",
  "title": "GetCandidateResponse",
  "description": "Response to a candidate read.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/popp-candidates-api-openapi.yml#/components/schemas/GetCandidateResponse",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "True when the candidate was found and returned."
    },
    "candidate": {
      "type": "object",
      "description": "Candidate profile — the canonical record of a candidate within Popp. Profiles can be enrolled into workflows. Canonical fields hold the current value, whichever source last set it; the `fromCv` block holds what CV parsing extracted and is read-only. Optional fields are always present and null when unset, and array fields are always present and empty when unset, so the response shape does not vary between candidates.",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Candidate Profile ID",
          "description": "Unique identifier for the candidate profile."
        },
        "externalId": {
          "type": [
            "string",
            "null"
          ],
          "title": "External ID",
          "description": "Caller-supplied identifier in the format ^[\\w.-]+$."
        },
        "externalUrl": {
          "type": [
            "string",
            "null"
          ],
          "title": "External URL",
          "description": "Link back to this candidate in the caller's own system."
        },
        "organizationGroupId": {
          "type": "string",
          "format": "uuid",
          "title": "Organization Group ID",
          "description": "Identifier of the organization group that owns the candidate profile. Profiles are scoped to an organization group, not a single organization."
        },
        "organizationIds": {
          "type": "array",
          "title": "Organization IDs",
          "description": "Organizations within the group that the candidate has been associated with.",
          "items": {
            "type": "string",
            "format": "uuid"
          }
        },
        "firstName": {
          "type": [
            "string",
            "null"
          ],
          "title": "First Name",
          "description": "Candidate's first name."
        },
        "lastName": {
          "type": [
            "string",
            "null"
          ],
          "title": "Last Name",
          "description": "Candidate's last name."
        },
        "email": {
          "type": [
            "string",
            "null"
          ],
          "title": "Email",
          "description": "Candidate's email address."
        },
        "phoneNumber": {
          "type": [
            "string",
            "null"
          ],
          "title": "Phone Number",
          "description": "Candidate's phone number in E.164 format."
        },
        "linkedInProfileUrl": {
          "type": [
            "string",
            "null"
          ],
          "title": "LinkedIn Profile URL",
          "description": "Candidate's LinkedIn profile."
        },
        "title": {
          "type": [
            "string",
            "null"
          ],
          "title": "Job Title",
          "description": "Candidate's current job title."
        },
        "company": {
          "type": [
            "string",
            "null"
          ],
          "title": "Company",
          "description": "Candidate's current employer."
        },
        "location": {
          "type": [
            "object",
            "null"
          ],
          "title": "Location",
          "description": "Candidate's location. `geoCoordinates` is filled asynchronously by processing, so a candidate read shortly after a create may carry a location whose coordinates are still null.",
          "required": [
            "name",
            "city",
            "region",
            "countryCode",
            "geoCoordinates"
          ],
          "additionalProperties": false,
          "properties": {
            "name": {
              "type": [
                "string",
                "null"
              ],
              "description": "Full location as a single string, e.g. \"London, UK\"."
            },
            "city": {
              "type": [
                "string",
                "null"
              ],
              "description": "City."
            },
            "region": {
              "type": [
                "string",
                "null"
              ],
              "description": "Region, state or county."
            },
            "countryCode": {
              "type": [
                "string",
                "null"
              ],
              "description": "ISO 3166-1 alpha-2 country code."
            },
            "geoCoordinates": {
              "type": [
                "object",
                "null"
              ],
              "description": "Coordinates resolved by geocoding. Null until processing has geocoded the location.",
              "required": [
                "latitude",
                "longitude"
              ],
              "additionalProperties": false,
              "properties": {
                "latitude": {
                  "type": "number"
                },
                "longitude": {
                  "type": "number"
                }
              }
            }
          }
        },
        "skills": {
          "type": "array",
          "title": "Skills",
          "description": "Taxonomized skills. Empty when the candidate has none.",
          "items": {
            "type": "string"
          }
        },
        "qualifications": {
          "type": "array",
          "title": "Qualifications",
          "description": "Taxonomized qualifications. Empty when the candidate has none.",
          "items": {
            "type": "string"
          }
        },
        "tags": {
          "type": "array",
          "title": "Tags",
          "description": "Tags on the candidate. Empty when the candidate has none.",
          "items": {
            "type": "string"
          }
        },
        "customFields": {
          "type": "object",
          "title": "Custom Fields",
          "description": "Values for the custom fields your organization has defined, keyed by fieldKey. Empty when the candidate has none. The stored map is returned as written, so a key belonging to a custom field that has since been retired is still present until it is overwritten. Same shape the create and update endpoints accept.",
          "additionalProperties": {
            "description": "Value for one custom field, in the shape configured for that field: string for TEXT, array of strings for TEXT_ARRAY, number for NUMBER, boolean for BOOLEAN, and a date string for DATE.",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          }
        },
        "totalExperienceInYears": {
          "type": [
            "number",
            "null"
          ],
          "title": "Total Experience In Years",
          "description": "Total years of experience, captured from the CV."
        },
        "originalSource": {
          "type": [
            "string",
            "null"
          ],
          "title": "Original Source",
          "description": "How the candidate first entered Popp, e.g. an ATS sync, a bulk CV upload or the API."
        },
        "status": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "IN_PROGRESS",
            "COMPLETED",
            "FAILED"
          ],
          "title": "Processing Status",
          "description": "Processing status of the candidate. IN_PROGRESS while CV parsing and vectorization run, COMPLETED once they finish, and FAILED when processing did not complete successfully. Null on a candidate that has never been processed."
        },
        "statusChangedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "title": "Status Changed At",
          "description": "When the processing status last changed."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "title": "Created At",
          "description": "When the candidate profile was created."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "title": "Updated At",
          "description": "When the candidate profile was last updated."
        },
        "fromCv": {
          "type": "object",
          "title": "Extracted From CV",
          "description": "What CV parsing extracted, kept separate from the canonical fields so a caller can see the parser's reading even where its own supplied value took precedence. Read-only: these cannot be set through the API.",
          "properties": {
            "firstName": {
              "type": [
                "string",
                "null"
              ]
            },
            "lastName": {
              "type": [
                "string",
                "null"
              ]
            },
            "email": {
              "type": [
                "string",
                "null"
              ]
            },
            "phoneNumber": {
              "type": [
                "string",
                "null"
              ]
            },
            "linkedInProfileUrl": {
              "type": [
                "string",
                "null"
              ]
            },
            "location": {
              "type": [
                "string",
                "null"
              ],
              "description": "Location as written in the CV, before geocoding."
            },
            "links": {
              "type": "array",
              "description": "Links found in the CV.",
              "items": {
                "type": "string"
              }
            },
            "skills": {
              "type": "array",
              "description": "Skills as written in the CV, before taxonomization.",
              "items": {
                "type": "string"
              }
            },
            "qualifications": {
              "type": "array",
              "description": "Qualifications as written in the CV, before taxonomization.",
              "items": {
                "type": "string"
              }
            },
            "professionalSummary": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "firstName",
            "lastName",
            "email",
            "phoneNumber",
            "linkedInProfileUrl",
            "location",
            "links",
            "skills",
            "qualifications",
            "professionalSummary"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "id",
        "externalId",
        "externalUrl",
        "organizationGroupId",
        "organizationIds",
        "firstName",
        "lastName",
        "email",
        "phoneNumber",
        "linkedInProfileUrl",
        "title",
        "company",
        "location",
        "skills",
        "qualifications",
        "tags",
        "customFields",
        "totalExperienceInYears",
        "originalSource",
        "status",
        "statusChangedAt",
        "createdAt",
        "updatedAt",
        "fromCv"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "ok",
    "candidate"
  ]
}