{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zippedscript/json-schema/zippedscript-create-employment-verification-schema.json",
  "title": "CreateEmploymentVerification",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zippedscript-employment-api-openapi.yml#/components/schemas/CreateEmploymentVerification",
  "required": [
    "employment",
    "positions",
    "verified_by",
    "verified_by_position"
  ],
  "type": "object",
  "properties": {
    "employment": {
      "title": "Employment",
      "type": "string"
    },
    "token": {
      "title": "Token",
      "type": "string",
      "minLength": 1
    },
    "positions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CreateEmploymentPositionVerification"
      }
    },
    "candidate_name": {
      "title": "Candidate name",
      "type": [
        "string",
        "null"
      ],
      "maxLength": 255
    },
    "employer_name": {
      "title": "Employer name",
      "type": [
        "string",
        "null"
      ],
      "maxLength": 255
    },
    "employer_country_code": {
      "title": "Employer country code",
      "type": [
        "string",
        "null"
      ],
      "maxLength": 3
    },
    "verified_by": {
      "title": "Verified by",
      "type": "string",
      "maxLength": 255,
      "minLength": 1
    },
    "verified_by_position": {
      "title": "Verified by position",
      "type": "string",
      "maxLength": 255,
      "minLength": 1
    },
    "verified_by_email": {
      "title": "Verified by email",
      "type": [
        "string",
        "null"
      ],
      "format": "email",
      "maxLength": 254
    },
    "contact_source": {
      "title": "Contact source",
      "description": "The source of verified_by_email: a previously-known contact for this employer, an automated search, or directly provided by the client. Null when verified_by_email wasn't set via a recognized contact email.",
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "client_provided",
        "database_contact",
        "sourced_contact",
        null
      ]
    },
    "additional_details": {
      "title": "Additional details",
      "type": [
        "object",
        "null"
      ]
    },
    "ip": {
      "title": "Ip",
      "description": "The IP address the verification was submitted from. Never returned by the API",
      "type": [
        "string",
        "null"
      ],
      "minLength": 1
    }
  },
  "$defs": {
    "CreateEmploymentPositionVerification": {
      "required": [
        "employment_position"
      ],
      "type": "object",
      "properties": {
        "employment_position": {
          "title": "Employment position",
          "type": "string"
        },
        "position": {
          "title": "Position",
          "type": [
            "string",
            "null"
          ],
          "maxLength": 255
        },
        "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",
            "null"
          ]
        },
        "employment_status": {
          "title": "Employment status",
          "type": [
            "string",
            "null"
          ],
          "maxLength": 255
        }
      }
    }
  }
}