{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zippedscript/json-schema/zippedscript-read-employment-schema.json",
  "title": "ReadEmployment",
  "description": "A list of the returned records",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zippedscript-employment-api-openapi.yml#/components/schemas/ReadEmployment",
  "required": [
    "request_id",
    "candidate_name",
    "employer_name",
    "employer_email",
    "employer_country_code",
    "company"
  ],
  "type": "object",
  "properties": {
    "verified": {
      "title": "Verified",
      "type": "string",
      "readOnly": true
    },
    "current_status": {
      "title": "Current status",
      "description": "The most recent status of the employment verification",
      "type": "string",
      "readOnly": true
    },
    "end_user_consent_file_download_urls": {
      "title": "End user consent file download urls",
      "description": "URLs to download all end-user consent files",
      "type": "string",
      "readOnly": true
    },
    "email_sent_times": {
      "title": "Email sent times",
      "description": "The times that emails were sent out for this record",
      "type": "string",
      "readOnly": true
    },
    "requested_information": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/RequestedInformation"
      },
      "readOnly": true
    },
    "positions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EmploymentPosition"
      },
      "readOnly": true
    },
    "is_unlockable": {
      "title": "Is unlockable",
      "description": "Whether the employer submitted results after this verification went stale, which the client can unlock via POST /employment/<employment_id>/unlock",
      "type": "string",
      "readOnly": true
    },
    "created_at": {
      "title": "Created at",
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "request_id": {
      "title": "Request id",
      "type": "string",
      "maxLength": 256,
      "minLength": 1
    },
    "employment_id": {
      "title": "Employment id",
      "type": "string",
      "readOnly": true,
      "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": {
      "title": "Employer email",
      "description": "A list of employer emails to send the verification request to.",
      "type": "object"
    },
    "rocketreach_emails": {
      "title": "Rocketreach emails",
      "description": "A list of emails found via RocketReach that need to be validated.",
      "type": "object"
    },
    "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"
      ]
    },
    "end_user_consent_files": {
      "title": "End user consent files",
      "type": [
        "object",
        "null"
      ]
    },
    "lang": {
      "title": "Lang",
      "type": "string",
      "maxLength": 10
    },
    "initial_email_sent": {
      "title": "Initial email sent",
      "type": "boolean"
    },
    "poc_email_sent": {
      "title": "Poc email sent",
      "type": "boolean"
    },
    "cadence_emails_sent": {
      "title": "Cadence emails sent",
      "type": "integer",
      "maximum": 2147483647,
      "minimum": -2147483648
    },
    "last_cadence_email_sent": {
      "title": "Last cadence email sent",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "stale_extension_days": {
      "title": "Stale extension days",
      "type": "integer",
      "maximum": 2147483647,
      "minimum": -2147483648
    },
    "unlocked_at": {
      "title": "Unlocked at",
      "description": "When the client unlocked the results of this verification after it went stale. Null if it was never unlocked.",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "company": {
      "title": "Company",
      "type": "integer"
    }
  },
  "$defs": {
    "EmploymentPosition": {
      "required": [
        "start_date"
      ],
      "type": "object",
      "properties": {
        "position_id": {
          "title": "Position id",
          "type": "string",
          "readOnly": true,
          "minLength": 1
        },
        "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"
        },
        "created_at": {
          "title": "Created at",
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "verified": {
          "title": "Verified",
          "type": "string",
          "readOnly": true
        }
      }
    },
    "RequestedInformation": {
      "required": [
        "name",
        "label"
      ],
      "type": "object",
      "properties": {
        "id": {
          "title": "Id",
          "type": "integer",
          "readOnly": true
        },
        "name": {
          "title": "Name",
          "description": "Machine name of the requested item, e.g. 'employee_id'",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        "label": {
          "title": "Label",
          "description": "Human-readable label, e.g. 'Employee ID'",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        "type": {
          "title": "Type",
          "description": "The expected type of the requested information",
          "type": "string",
          "enum": [
            "text",
            "date",
            "number",
            "file"
          ]
        },
        "required": {
          "title": "Required",
          "description": "Whether the employer requires this to complete the verification",
          "type": "boolean"
        },
        "value": {
          "title": "Value",
          "description": "The client-submitted value",
          "type": [
            "string",
            "null"
          ]
        },
        "not_available": {
          "title": "Not available",
          "description": "Set by the client when the information cannot be provided",
          "type": "boolean"
        },
        "status": {
          "title": "Status",
          "description": "Derived state of the requested item",
          "type": "string",
          "readOnly": true
        },
        "file_download_urls": {
          "title": "File download urls",
          "description": "Presigned URLs for uploaded files",
          "type": "string",
          "readOnly": true
        },
        "created_at": {
          "title": "Created at",
          "type": "string",
          "format": "date-time",
          "readOnly": true
        }
      }
    }
  }
}