{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zippedscript/json-schema/zippedscript-create-employment-schema.json",
  "title": "CreateEmployment",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zippedscript-employment-api-openapi.yml#/components/schemas/CreateEmployment",
  "required": [
    "request_id",
    "candidate_name",
    "employer_name",
    "employer_country_code"
  ],
  "type": "object",
  "properties": {
    "request_id": {
      "title": "Request id",
      "type": "string",
      "maxLength": 256,
      "minLength": 1
    },
    "candidate_name": {
      "title": "Candidate name",
      "type": "string",
      "maxLength": 255,
      "minLength": 1
    },
    "employer_name": {
      "title": "Employer name",
      "type": "string",
      "maxLength": 255,
      "minLength": 1
    },
    "employer_email": {
      "description": "A list of employer emails to send the verification request to.",
      "type": "array",
      "items": {
        "type": "string",
        "format": "email",
        "minLength": 1
      },
      "default": []
    },
    "employer_country_code": {
      "title": "Employer country code",
      "type": "string",
      "maxLength": 3,
      "minLength": 1
    },
    "employee_id": {
      "title": "Employee id",
      "type": [
        "string",
        "null"
      ],
      "maxLength": 255
    },
    "phone_country_code": {
      "title": "Phone country code",
      "description": "The country code of the phone number",
      "type": [
        "string",
        "null"
      ],
      "maxLength": 7
    },
    "phone_number": {
      "title": "Phone number",
      "description": "The phone number of the employer contact",
      "type": [
        "string",
        "null"
      ],
      "maxLength": 16
    },
    "manual_phone_verification": {
      "title": "Manual phone verification",
      "description": "The manual phone verification is enabled",
      "type": "boolean"
    },
    "additional_details": {
      "title": "Additional details",
      "type": [
        "object",
        "null"
      ]
    },
    "lang": {
      "title": "Lang",
      "type": "string",
      "maxLength": 10
    },
    "company_name": {
      "title": "Company name",
      "type": "string",
      "minLength": 1
    },
    "company_domain": {
      "title": "Company domain",
      "type": "string",
      "minLength": 1
    },
    "country_code": {
      "title": "Country code",
      "type": "string",
      "minLength": 1
    },
    "positions": {
      "description": "The positions the candidate is claimed to have held at this employer. Multiple positions at the same company can be verified in one request.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/CreateEmploymentPosition"
      }
    },
    "position": {
      "title": "Position",
      "type": [
        "string",
        "null"
      ],
      "minLength": 1
    },
    "employment_status": {
      "title": "Employment status",
      "type": [
        "string",
        "null"
      ],
      "minLength": 1
    },
    "start_date": {
      "title": "Start date",
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "end_date": {
      "title": "End date",
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "current": {
      "title": "Current",
      "type": [
        "boolean",
        "null"
      ]
    },
    "eligible_for_rehire": {
      "title": "Eligible for rehire",
      "type": "boolean"
    }
  },
  "$defs": {
    "CreateEmploymentPosition": {
      "description": "The positions the candidate is claimed to have held at this employer. Multiple positions at the same company can be verified in one request.",
      "required": [
        "start_date"
      ],
      "type": "object",
      "properties": {
        "position": {
          "title": "Position",
          "type": [
            "string",
            "null"
          ],
          "maxLength": 255
        },
        "employment_status": {
          "title": "Employment status",
          "type": [
            "string",
            "null"
          ],
          "maxLength": 255
        },
        "start_date": {
          "title": "Start date",
          "type": "string",
          "format": "date"
        },
        "end_date": {
          "title": "End date",
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        },
        "current": {
          "title": "Current",
          "type": [
            "boolean",
            "null"
          ]
        },
        "eligible_for_rehire": {
          "title": "Eligible for rehire",
          "type": "boolean"
        }
      }
    }
  }
}