{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zippedscript/json-schema/zippedscript-paginated-read-reference-check-serializer-schema.json",
  "title": "PaginatedReadReferenceCheckSerializer",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zippedscript-reference-checks-api-openapi.yml#/components/schemas/PaginatedReadReferenceCheckSerializer",
  "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/ReadReferenceCheck"
      }
    }
  },
  "$defs": {
    "Candidate": {
      "required": [
        "candidate_name"
      ],
      "type": "object",
      "properties": {
        "candidate_id": {
          "title": "Candidate id",
          "type": "string",
          "readOnly": true,
          "minLength": 1
        },
        "candidate_name": {
          "title": "Candidate name",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        "created_at": {
          "title": "Created at",
          "type": "string",
          "format": "date-time",
          "readOnly": true
        }
      }
    },
    "ReadReferenceCheck": {
      "description": "A list of the returned records",
      "required": [
        "request_id",
        "reference_name",
        "reference_email",
        "company"
      ],
      "type": "object",
      "properties": {
        "candidate": {
          "$ref": "#/$defs/Candidate"
        },
        "verified": {
          "title": "Verified",
          "type": "string",
          "readOnly": true
        },
        "current_status": {
          "title": "Current status",
          "description": "The most recent status of the reference check",
          "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
        },
        "created_at": {
          "title": "Created at",
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "request_id": {
          "title": "Request id",
          "type": "string",
          "maxLength": 256,
          "minLength": 1
        },
        "reference_check_id": {
          "title": "Reference check id",
          "type": "string",
          "readOnly": true,
          "minLength": 1
        },
        "reference_name": {
          "title": "Reference name",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        "reference_email": {
          "title": "Reference email",
          "description": "The email of the reference to send the check request to.",
          "type": "string",
          "format": "email",
          "maxLength": 254,
          "minLength": 1
        },
        "relationship": {
          "title": "Relationship",
          "description": "Relationship to the candidate",
          "type": [
            "string",
            "null"
          ],
          "maxLength": 255
        },
        "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"
        },
        "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"
        },
        "company": {
          "title": "Company",
          "type": "integer"
        }
      }
    }
  }
}