{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/karmacheck/json-schema/karmacheck-testimony-employment-schema.json",
  "title": "TestimonyEmployment",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/karmacheck-candidate-onboarding-api-openapi.yml#/components/schemas/TestimonyEmployment",
  "type": "object",
  "required": [
    "id",
    "employer",
    "city",
    "state",
    "country",
    "current",
    "position",
    "monthBegin",
    "yearBegin",
    "monthEnd",
    "yearEnd"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "The unique identifier of the testimony record.",
      "readOnly": true
    },
    "employer": {
      "type": "string",
      "description": "The name of the candidate's current or former employer. Must be less than or equal to 100 characters."
    },
    "city": {
      "type": "string",
      "description": "The city of employment."
    },
    "state": {
      "type": "string",
      "description": "The two-letter state code."
    },
    "country": {
      "type": "string",
      "description": "The ISO 3166 (2 or 3 letter) code."
    },
    "nameIfDifferent": {
      "type": "string",
      "description": "The candidate's name that's on record with the employer."
    },
    "current": {
      "type": "boolean",
      "default": false,
      "description": "True if the candidate is currently employed with the employer; false otherwise. (Required true if `monthEnd` and `yearEnd` are not provided)"
    },
    "okToContact": {
      "type": "boolean",
      "description": "True if the employer can be contacted about the candidate; false otherwise."
    },
    "position": {
      "type": "string",
      "description": "The candidate's position with the employer."
    },
    "incomeAmount": {
      "type": "string",
      "description": "The amount earned. This is applicable to Employment Income Verification."
    },
    "incomeCurrency": {
      "type": "string",
      "description": "The currency of the income earned. This is applicable to Employment Income Verification."
    },
    "incomeFrequency": {
      "type": "string",
      "description": "The frequency of the amount earned. This is applicable to Employment Income Verification."
    },
    "monthBegin": {
      "type": "string",
      "description": "The month in which the candidate began their employment."
    },
    "yearBegin": {
      "type": "string",
      "description": "The year in which the candidate began their employment."
    },
    "monthEnd": {
      "type": "string",
      "description": "The month in which the candidate ended their employment. Not applicable if `current` is true. (Required if `current` is false or not provided)"
    },
    "yearEnd": {
      "type": "string",
      "description": "The year in which the candidate ended their employment. Not applicable if `current` is true. (Required if `current` is false or not provided)"
    },
    "additionalInfo": {
      "type": "string"
    },
    "contact": {
      "$ref": "#/$defs/TestimonyContact",
      "description": "The employer's contact information."
    },
    "staffingAgency": {
      "type": "string",
      "description": "The Staffing Agency that the candidate is working for the employer through. (If applicable)",
      "maxLength": 100
    }
  },
  "$defs": {
    "TestimonyContact": {
      "title": "TestimonyContact",
      "type": "object",
      "properties": {
        "phone": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "website": {
          "type": "string"
        }
      }
    }
  }
}