{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getsmileapi/json-schema/getsmileapi-employment-get-response-schema.json",
  "title": "Employment Get Response",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/getsmileapi-employments-api-openapi.yml#/components/schemas/EmploymentGetResponse",
  "type": "object",
  "properties": {
    "code": {
      "$ref": "#/$defs/ObjectMetadataRefCode"
    },
    "message": {
      "$ref": "#/$defs/ObjectMetadataRefMessage"
    },
    "requestId": {
      "$ref": "#/$defs/ObjectMetadataRefRequestID"
    },
    "data": {
      "$ref": "#/$defs/Employment"
    }
  },
  "$defs": {
    "Employment": {
      "title": "Employment",
      "type": "object",
      "x-internal": false,
      "description": "The stored employment information of the user from an employment data provider.",
      "x-tags": [
        "Employments"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/EmploymentPayload"
        },
        {
          "properties": {
            "metadata": {
              "$ref": "#/$defs/ObjectReferenceMetadata"
            }
          }
        }
      ],
      "required": [
        "id",
        "startDate",
        "metadata"
      ]
    },
    "EmploymentPayload": {
      "type": "object",
      "required": [
        "id",
        "startDate"
      ],
      "properties": {
        "id": {
          "$ref": "#/$defs/RefObjectID"
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Work performed"
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Description of work performed"
        },
        "jobTitle": {
          "type": [
            "string",
            "null"
          ],
          "description": "Job title"
        },
        "department": {
          "type": [
            "string",
            "null"
          ],
          "description": "Department or organization in place of employment"
        },
        "employeeNumber": {
          "type": [
            "string",
            "null"
          ],
          "description": "Employee number in the employment data provider"
        },
        "employerNumber": {
          "type": [
            "string",
            "null"
          ],
          "description": "Employer number in the employment data provider"
        },
        "employer": {
          "$ref": "#/$defs/RefEmployer"
        },
        "status": {
          "type": [
            "string",
            "null"
          ],
          "description": "Status of employment"
        },
        "startDate": {
          "type": "string",
          "description": "Start date",
          "format": "date"
        },
        "endDate": {
          "type": [
            "string",
            "null"
          ],
          "description": "End date",
          "format": "date"
        },
        "reportedDate": {
          "type": [
            "string",
            "null"
          ],
          "description": "Reported date",
          "format": "date"
        }
      }
    },
    "ObjectMetadataRefCode": {
      "type": "string",
      "title": "ObjectMetadataRefCode",
      "description": "Request status code",
      "enum": [
        "OK",
        "CREATED",
        "INVALID_CREDENTIALS",
        "INVALID_PARAMETERS",
        "INVALID_TOKEN",
        "UNAUTHORIZED_ACCESS",
        "MISSING_RESOURCE",
        "REQUEST_LIMIT_EXCEEDED",
        "SERVER_ERROR",
        "UNSUPPORTED_METHOD",
        "SERVER_UNAVAILABLE",
        "TIME_LIMIT_EXCEEDED"
      ],
      "x-internal": false
    },
    "ObjectMetadataRefMessage": {
      "type": "string",
      "title": "ObjectMetadataRefMessage",
      "description": "Message response to the request",
      "x-internal": false
    },
    "ObjectMetadataRefRequestID": {
      "type": "string",
      "title": "ObjectMetadataRefRequestID",
      "description": "Unique ID that is added to the body of every response for easy traceability of the request in our logs.",
      "x-internal": false
    },
    "ObjectReferenceMetadata": {
      "title": "Reference Metadata",
      "type": "object",
      "description": "Metadata related to account-specific data",
      "properties": {
        "itemCreatedAt": {
          "$ref": "#/$defs/RefDateTime"
        },
        "createdAt": {
          "$ref": "#/$defs/RefDateTime"
        },
        "accountId": {
          "type": "string",
          "deprecated": true,
          "description": "The accountId of this object"
        },
        "sourceId": {
          "type": "string",
          "description": "The ACCOUNT or ARCHIVE ID associated with this object"
        },
        "sourceType": {
          "$ref": "#/$defs/RefSourceType"
        },
        "userId": {
          "type": "string",
          "description": "The user ID associated with this object"
        },
        "providerId": {
          "type": "string",
          "description": "The provider ID associated with this object"
        }
      },
      "required": [
        "createdAt",
        "itemCreatedAt",
        "sourceId",
        "sourceType",
        "userId",
        "providerId"
      ]
    },
    "RefDateTime": {
      "type": "string",
      "title": "Date and Time string",
      "format": "date-time",
      "description": "Date and time"
    },
    "RefEmployer": {
      "type": [
        "string",
        "null"
      ],
      "title": "Employer",
      "description": "Employer name"
    },
    "RefObjectID": {
      "type": "string",
      "title": "Object ID",
      "description": "Unique ID of this object"
    },
    "RefSourceType": {
      "type": [
        "string",
        "null"
      ],
      "title": "Ref-Source-Type",
      "enum": [
        "ACCOUNT",
        "UPLOAD",
        "ARCHIVE",
        "SOCIAL_SECURITY"
      ],
      "description": "Source Type"
    }
  }
}