{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zippedscript/json-schema/zippedscript-paginated-read-verification-serializer-schema.json",
  "title": "PaginatedReadVerificationSerializer",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zippedscript-verification-api-openapi.yml#/components/schemas/PaginatedReadVerificationSerializer",
  "required": [
    "count",
    "next",
    "previous",
    "results"
  ],
  "type": "object",
  "properties": {
    "count": {
      "title": "Count",
      "description": "Total number of records able to be retrieved",
      "type": "integer"
    },
    "next": {
      "title": "Next",
      "description": "A link to the next page of records",
      "type": [
        "string",
        "null"
      ]
    },
    "previous": {
      "title": "Previous",
      "description": "A link to the previous page of records",
      "type": [
        "string",
        "null"
      ]
    },
    "results": {
      "description": "A list of the returned records",
      "type": "array",
      "items": {
        "$ref": "#/$defs/ReadVerification"
      }
    }
  },
  "$defs": {
    "FieldDataItem": {
      "required": [
        "label",
        "element",
        "name"
      ],
      "type": "object",
      "properties": {
        "label": {
          "title": "Label",
          "description": "The label of the field",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        "placeholder": {
          "title": "Placeholder",
          "description": "The placeholder of the field",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        "type": {
          "title": "Type",
          "description": "The type of the input field. This is only provided if the HTML element is an input",
          "type": "string",
          "enum": [
            "text",
            "password",
            "select",
            "email",
            "number",
            "textarea",
            "date",
            "datetime-local",
            "url",
            "checkbox",
            "radio",
            "file"
          ]
        },
        "element": {
          "title": "Element",
          "description": "The type of HTML element",
          "type": "string",
          "enum": [
            "input",
            "select"
          ]
        },
        "required": {
          "title": "Required",
          "description": "Whether the field is required or not",
          "type": "boolean",
          "default": true
        },
        "name": {
          "title": "Name",
          "description": "The name of the field",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        "choices": {
          "description": "The choices of the field. This is only provided if the HTML element is a select",
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1
          }
        },
        "allowed_files": {
          "description": "The allowed file extensions of the field. This is only provided if the input type is file",
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1
          }
        },
        "value": {
          "title": "Value",
          "description": "The initial value of the field",
          "type": "string",
          "minLength": 1
        }
      }
    },
    "FormData": {
      "description": "The information that is required to be submitted in order to verify the candidates education. Null when complete",
      "required": [
        "header",
        "field_data"
      ],
      "type": "object",
      "properties": {
        "header": {
          "title": "Header",
          "description": "The header of the form",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        "description": {
          "title": "Description",
          "description": "The description/sub-header of the form",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        "error": {
          "title": "Error",
          "description": "A descriptive error message to be displayed with the form",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        "field_data": {
          "description": "Details about the HTML input elements that will pass the required information",
          "type": "array",
          "items": {
            "$ref": "#/$defs/FieldDataItem"
          }
        },
        "forgot_password_label": {
          "title": "Forgot password label",
          "description": "The forgot password label to be displayed with the form",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        "forgot_password": {
          "title": "Forgot password",
          "description": "The forgot password link to be stored underneath the forgot password label",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        }
      }
    },
    "ReadDegree": {
      "required": [
        "degree",
        "student_name",
        "graduated"
      ],
      "type": "object",
      "properties": {
        "id": {
          "title": "Id",
          "type": "integer",
          "readOnly": true
        },
        "level": {
          "title": "Level",
          "description": "The level (bachelor, master, etc) of the degree",
          "type": [
            "string",
            "null"
          ],
          "maxLength": 255
        },
        "degree": {
          "title": "Degree",
          "description": "The name of the degree",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        "school_name": {
          "title": "School name",
          "description": "The name of the school. If null, it is the same as the requested institution name",
          "type": [
            "string",
            "null"
          ],
          "maxLength": 255
        },
        "student_name": {
          "title": "Student name",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        "graduated": {
          "title": "Graduated",
          "type": "boolean"
        },
        "major": {
          "title": "Major",
          "type": [
            "string",
            "null"
          ],
          "maxLength": 255
        },
        "minor": {
          "title": "Minor",
          "type": [
            "string",
            "null"
          ],
          "maxLength": 255
        },
        "student_id": {
          "title": "Student id",
          "description": "The student ID/number of the user",
          "type": [
            "string",
            "null"
          ],
          "maxLength": 255
        },
        "graduation_date": {
          "title": "Graduation date",
          "type": [
            "string",
            "null"
          ],
          "maxLength": 255
        },
        "last_semester_date": {
          "title": "Last semester date",
          "type": [
            "string",
            "null"
          ],
          "maxLength": 255
        },
        "award_number": {
          "title": "Award number",
          "type": [
            "string",
            "null"
          ],
          "maxLength": 255
        },
        "created_at": {
          "title": "Created at",
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "additional_information": {
          "title": "Additional information",
          "description": "Any additional information about the degree will be return in a json object",
          "type": [
            "object",
            "null"
          ]
        },
        "sources": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "readOnly": true,
          "uniqueItems": true
        }
      }
    },
    "ReadInstitution": {
      "required": [
        "name",
        "country"
      ],
      "type": "object",
      "properties": {
        "id": {
          "title": "Id",
          "description": "ID of the institution to be used in verification requests",
          "type": "integer",
          "readOnly": true
        },
        "name": {
          "title": "Name",
          "description": "The name of the institution",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        "native_name": {
          "title": "Native name",
          "description": "The native name of the institution",
          "type": [
            "string",
            "null"
          ],
          "maxLength": 255
        },
        "country": {
          "title": "Country",
          "description": "ISO Country Code",
          "type": "string",
          "maxLength": 3,
          "minLength": 1
        },
        "city": {
          "title": "City",
          "type": [
            "string",
            "null"
          ],
          "maxLength": 255
        },
        "state": {
          "title": "State",
          "description": "This can also be a province, territory, etc.",
          "type": [
            "string",
            "null"
          ],
          "maxLength": 255
        },
        "logo": {
          "title": "Logo",
          "description": "URL of the institution's logo",
          "type": [
            "string",
            "null"
          ],
          "maxLength": 255
        },
        "year_limits": {
          "title": "Year limits",
          "type": [
            "array",
            "null"
          ],
          "description": "Valid graduation year ranges for this institution. A null start or end leaves that side open.",
          "items": {
            "type": "object",
            "properties": {
              "start": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "end": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            }
          }
        },
        "is_working": {
          "title": "Is working",
          "type": "boolean"
        }
      }
    },
    "ReadVerification": {
      "description": "A list of the returned records",
      "required": [
        "request_id"
      ],
      "type": "object",
      "properties": {
        "created_at": {
          "title": "Created at",
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "verification_id": {
          "title": "Verification id",
          "type": "string",
          "readOnly": true,
          "minLength": 1
        },
        "request_id": {
          "title": "Request id",
          "description": "A unique ID, used to help search for verifications",
          "type": "string",
          "maxLength": 64,
          "minLength": 1
        },
        "email": {
          "title": "Email",
          "description": "The email of the candidate whose education is being verified",
          "type": [
            "string",
            "null"
          ],
          "format": "email",
          "maxLength": 254
        },
        "graduated": {
          "title": "Graduated",
          "description": "Whether the candidate has graduated or not",
          "type": [
            "boolean",
            "null"
          ]
        },
        "degree_level": {
          "title": "Degree level",
          "description": "The level of degree that is being verified",
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "Certificate / Diploma or Equivalent",
            "Associate / Technical or Equivalent",
            "Bachelor's or equivalent",
            "Master's or equivalent",
            "Doctorate or equivalent",
            null
          ]
        },
        "graduation_year": {
          "title": "Graduation year",
          "description": "The year the candidate graduated",
          "type": [
            "integer",
            "null"
          ],
          "maximum": 2036,
          "minimum": 1900
        },
        "institution": {
          "$ref": "#/$defs/ReadInstitution"
        },
        "current_status": {
          "$ref": "#/$defs/Status"
        },
        "form_data": {
          "$ref": "#/$defs/FormData"
        },
        "degrees": {
          "description": "The degrees that are returned back when the verification is completed, if any",
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReadDegree"
          },
          "readOnly": true
        },
        "company_id": {
          "title": "Company id",
          "type": "string",
          "readOnly": true
        },
        "phone_number": {
          "title": "Phone number",
          "description": "The phone number of the end user",
          "type": [
            "string",
            "null"
          ],
          "maxLength": 16
        },
        "phone_country_code": {
          "title": "Phone country code",
          "description": "The country code of the phone number",
          "type": [
            "string",
            "null"
          ],
          "maxLength": 7
        },
        "client_name": {
          "title": "Client name",
          "description": "The name of the client the verification is being performed on behalf of",
          "type": [
            "string",
            "null"
          ],
          "maxLength": 255
        }
      }
    },
    "Status": {
      "description": "The most recent status of the verification",
      "required": [
        "status"
      ],
      "type": "object",
      "properties": {
        "status": {
          "title": "Status",
          "description": "The current status of the verification",
          "type": "string",
          "enum": [
            "Awaiting credentials",
            "Processing",
            "Institution unreachable",
            "Temporary outage",
            "False positive",
            "Credentials received",
            "Credentials valid",
            "Credentials invalid",
            "Further input required",
            "Login complete",
            "Completed",
            "Unable to verify",
            "Validation in progress",
            "Resubmitted credentials",
            "Restarted",
            "Not delivered",
            "Stale",
            "Legacy",
            "Cancelled"
          ]
        },
        "created_at": {
          "title": "Created at",
          "type": "string",
          "format": "date-time",
          "readOnly": true
        }
      }
    }
  }
}