{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://recruitly.dev/backup-schema/v1/candidates.schema.json",
  "title": "Candidates",
  "description": "Your candidates, with contact details, work history, education, skills and custom fields. CV text and National Insurance numbers are not in this file.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "tenantId": {
      "type": [
        "string",
        "null"
      ]
    },
    "reference": {
      "type": [
        "string",
        "null"
      ]
    },
    "owner": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "createdOn": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "modifiedOn": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "archived": {
      "type": "boolean"
    },
    "title": {
      "type": [
        "string",
        "null"
      ]
    },
    "firstName": {
      "type": [
        "string",
        "null"
      ]
    },
    "surname": {
      "type": [
        "string",
        "null"
      ]
    },
    "headline": {
      "type": [
        "string",
        "null"
      ]
    },
    "email": {
      "type": [
        "string",
        "null"
      ]
    },
    "alternateEmail": {
      "type": [
        "string",
        "null"
      ]
    },
    "mobile": {
      "type": [
        "string",
        "null"
      ]
    },
    "homePhone": {
      "type": [
        "string",
        "null"
      ]
    },
    "workPhone": {
      "type": [
        "string",
        "null"
      ]
    },
    "linkedIn": {
      "type": [
        "string",
        "null"
      ]
    },
    "doNotContact": {
      "type": "boolean"
    },
    "optoutEmails": {
      "type": "boolean"
    },
    "optoutSMS": {
      "type": "boolean"
    },
    "address": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "line": {
          "type": [
            "string",
            "null"
          ]
        },
        "city": {
          "type": [
            "string",
            "null"
          ]
        },
        "region": {
          "type": [
            "string",
            "null"
          ]
        },
        "postCode": {
          "type": [
            "string",
            "null"
          ]
        },
        "country": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "gender": {
      "type": [
        "string",
        "null"
      ]
    },
    "nationalities": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "status": {
      "type": [
        "string",
        "null"
      ]
    },
    "source": {
      "type": [
        "string",
        "null"
      ]
    },
    "rating": {
      "type": [
        "number",
        "null"
      ]
    },
    "hot": {
      "type": "boolean"
    },
    "skills": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "yearsOfExperience": {
      "type": [
        "number",
        "null"
      ]
    },
    "overview": {
      "type": [
        "string",
        "null"
      ]
    },
    "currentEmployer": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "companyName": {
          "type": [
            "string",
            "number",
            "boolean",
            "null"
          ]
        },
        "jobTitle": {
          "type": [
            "string",
            "number",
            "boolean",
            "null"
          ]
        },
        "startDate": {
          "type": [
            "string",
            "number",
            "boolean",
            "null"
          ]
        },
        "endDate": {
          "type": [
            "string",
            "number",
            "boolean",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "employmentHistory": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "companyName": {
            "type": [
              "string",
              "number",
              "boolean",
              "null"
            ]
          },
          "jobTitle": {
            "type": [
              "string",
              "number",
              "boolean",
              "null"
            ]
          },
          "startDate": {
            "type": [
              "string",
              "number",
              "boolean",
              "null"
            ]
          },
          "endDate": {
            "type": [
              "string",
              "number",
              "boolean",
              "null"
            ]
          }
        },
        "additionalProperties": false
      }
    },
    "educationHistory": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "organisation": {
            "type": [
              "string",
              "number",
              "boolean",
              "null"
            ]
          },
          "major": {
            "type": [
              "string",
              "number",
              "boolean",
              "null"
            ]
          },
          "startYear": {
            "type": [
              "string",
              "number",
              "boolean",
              "null"
            ]
          },
          "endYear": {
            "type": [
              "string",
              "number",
              "boolean",
              "null"
            ]
          }
        },
        "additionalProperties": false
      }
    },
    "placed": {
      "type": "boolean"
    },
    "customFields": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": [
              "string",
              "null"
            ]
          },
          "value": {
            "type": [
              "string",
              "number",
              "boolean",
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      }
    }
  },
  "required": [
    "id",
    "tenantId",
    "reference",
    "owner",
    "createdOn",
    "modifiedOn",
    "archived",
    "title",
    "firstName",
    "surname",
    "headline",
    "email",
    "alternateEmail",
    "mobile",
    "homePhone",
    "workPhone",
    "linkedIn",
    "doNotContact",
    "optoutEmails",
    "optoutSMS",
    "address",
    "gender",
    "nationalities",
    "status",
    "source",
    "rating",
    "hot",
    "skills",
    "yearsOfExperience",
    "overview",
    "currentEmployer",
    "employmentHistory",
    "educationHistory",
    "placed",
    "customFields"
  ],
  "additionalProperties": false
}
