{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "$schema": {
      "type": "string",
      "description": "Absolute URL"
    },
    "schema_version": {
      "type": "number",
      "const": 1
    },
    "generated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Instant, ISO 8601"
    },
    "publisher": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "description": "Absolute URL"
        }
      },
      "required": ["name", "url"],
      "additionalProperties": false
    },
    "licence": {
      "type": "object",
      "properties": {
        "structure": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "const": "MIT"
            },
            "url": {
              "type": "string",
              "description": "Absolute URL"
            },
            "notice": {
              "type": "string"
            }
          },
          "required": ["name", "url", "notice"],
          "additionalProperties": false,
          "description": "The export's structure and our own compilation"
        },
        "public_sector_information": {
          "type": "object",
          "properties": {
            "attribution": {
              "type": "string",
              "const": "Contains public sector information licensed under the Open Government Licence v3.0."
            },
            "url": {
              "type": "string",
              "description": "Absolute URL"
            },
            "applies_to": {
              "type": "string"
            }
          },
          "required": ["attribution", "url", "applies_to"],
          "additionalProperties": false,
          "description": "Open Government Licence v3.0, for records derived from the DfE service"
        },
        "employer_facts": {
          "type": "string",
          "description": "How employer facts are sourced and cited"
        },
        "trade_marks": {
          "type": "string"
        }
      },
      "required": ["structure", "public_sector_information", "employer_facts", "trade_marks"],
      "additionalProperties": false
    },
    "counts": {
      "type": "object",
      "properties": {
        "employers": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "programmes": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "windows": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "opening_history": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "required": ["employers", "programmes", "windows", "opening_history"],
      "additionalProperties": false
    },
    "employers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "aliases": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Other names, normalised (lower case)"
          },
          "sector": {
            "type": ["string", "null"]
          },
          "website_url": {
            "anyOf": [
              {
                "type": "string",
                "description": "Absolute URL"
              },
              {
                "type": "null"
              }
            ]
          },
          "careers_url": {
            "anyOf": [
              {
                "type": "string",
                "description": "Absolute URL"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "type": ["string", "null"]
          },
          "url": {
            "type": "string",
            "description": "The employer's page on this site"
          },
          "ogl": {
            "type": "boolean",
            "description": "Some of this record comes from the DfE Find an Apprenticeship API"
          },
          "fact_file": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "overview": {
                    "type": ["string", "null"]
                  },
                  "programmes_summary": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "level": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "is_degree": {
                          "type": ["boolean", "null"]
                        },
                        "standard": {
                          "type": ["string", "null"]
                        },
                        "qualification": {
                          "type": ["string", "null"]
                        },
                        "discipline": {
                          "type": ["string", "null"]
                        },
                        "duration": {
                          "type": ["string", "null"]
                        },
                        "university_or_provider": {
                          "type": ["string", "null"]
                        },
                        "business_areas": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "locations": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "source_url": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uri"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "notes": {
                          "type": ["string", "null"]
                        }
                      },
                      "required": ["name", "level", "is_degree", "business_areas", "locations"],
                      "additionalProperties": false
                    }
                  },
                  "cohort_size": {
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "intake_years": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "locations": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "training_providers_universities": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "entry_requirements": {
                    "type": "object",
                    "properties": {
                      "a_levels": {
                        "type": ["string", "null"]
                      },
                      "ucas_points": {
                        "type": ["string", "null"]
                      },
                      "gcse": {
                        "type": ["string", "null"]
                      },
                      "equivalents": {
                        "type": ["string", "null"]
                      },
                      "other": {
                        "type": ["string", "null"]
                      },
                      "ucas_points_min": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "a_level_grades_min": {
                        "type": ["string", "null"]
                      },
                      "accepts_ucas_points": {
                        "type": ["boolean", "null"]
                      }
                    },
                    "required": [
                      "a_levels",
                      "ucas_points",
                      "gcse",
                      "equivalents",
                      "other",
                      "ucas_points_min",
                      "a_level_grades_min",
                      "accepts_ucas_points"
                    ],
                    "additionalProperties": false
                  },
                  "salary": {
                    "type": "object",
                    "properties": {
                      "starting": {
                        "type": ["string", "null"]
                      },
                      "progression": {
                        "type": ["string", "null"]
                      },
                      "notes": {
                        "type": ["string", "null"]
                      }
                    },
                    "required": ["starting", "progression", "notes"],
                    "additionalProperties": false
                  },
                  "benefits": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "application_process": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "stage": {
                          "type": "string",
                          "minLength": 1
                        },
                        "timing": {
                          "type": ["string", "null"]
                        },
                        "notes": {
                          "type": ["string", "null"]
                        }
                      },
                      "required": ["stage"],
                      "additionalProperties": false
                    }
                  },
                  "typical_timeline": {
                    "type": "object",
                    "properties": {
                      "opens": {
                        "type": ["string", "null"]
                      },
                      "closes": {
                        "type": ["string", "null"]
                      },
                      "assessment": {
                        "type": ["string", "null"]
                      },
                      "offers": {
                        "type": ["string", "null"]
                      },
                      "start": {
                        "type": ["string", "null"]
                      }
                    },
                    "required": ["opens", "closes", "assessment", "offers", "start"],
                    "additionalProperties": false
                  },
                  "notable": {
                    "type": ["string", "null"]
                  },
                  "sources": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "accessed_at": {
                          "type": "string",
                          "minLength": 1
                        },
                        "note": {
                          "type": ["string", "null"]
                        }
                      },
                      "required": ["url", "accessed_at"],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "overview",
                  "programmes_summary",
                  "cohort_size",
                  "intake_years",
                  "locations",
                  "training_providers_universities",
                  "entry_requirements",
                  "salary",
                  "benefits",
                  "application_process",
                  "typical_timeline",
                  "notable",
                  "sources"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "Curated facts from the employer's own pages; every programme has a source_url and `sources` lists each page read"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Instant, ISO 8601"
          }
        },
        "required": [
          "slug",
          "name",
          "aliases",
          "sector",
          "website_url",
          "careers_url",
          "description",
          "url",
          "ogl",
          "fact_file",
          "updated_at"
        ],
        "additionalProperties": false
      }
    },
    "programmes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "employer_slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "apprenticeship",
              "degree_apprenticeship",
              "internship",
              "placement",
              "insight",
              "graduate"
            ]
          },
          "level_min": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "level_max": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "route": {
            "description": "gov.uk route (sector)",
            "type": ["string", "null"]
          },
          "locations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "audience": {
            "type": "string",
            "enum": ["school_leaver", "undergraduate", "graduate"]
          },
          "apply_url": {
            "anyOf": [
              {
                "type": "string",
                "description": "Absolute URL"
              },
              {
                "type": "null"
              }
            ]
          },
          "requires_cv": {
            "type": ["boolean", "null"]
          },
          "cover_letter": {
            "anyOf": [
              {
                "type": "string",
                "enum": ["yes", "no", "optional"]
              },
              {
                "type": "null"
              }
            ]
          },
          "written_answers": {
            "anyOf": [
              {
                "type": "string",
                "enum": ["yes", "no", "optional"]
              },
              {
                "type": "null"
              }
            ]
          },
          "process": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Assessment stages: OA, VI, INT, AC"
          },
          "is_active": {
            "type": "boolean"
          },
          "url": {
            "type": "string",
            "description": "The programme's page on this site"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Instant, ISO 8601"
          }
        },
        "required": [
          "slug",
          "employer_slug",
          "name",
          "kind",
          "level_min",
          "level_max",
          "route",
          "locations",
          "audience",
          "apply_url",
          "requires_cv",
          "cover_letter",
          "written_answers",
          "process",
          "is_active",
          "url",
          "updated_at"
        ],
        "additionalProperties": false
      }
    },
    "windows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "programme_slug": {
            "type": "string"
          },
          "cycle_year": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Intake year: a September 2027 start is 2027"
          },
          "opens_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date",
                "description": "Calendar day, YYYY-MM-DD (UK)"
              },
              {
                "type": "null"
              }
            ]
          },
          "closes_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date",
                "description": "Calendar day, YYYY-MM-DD (UK)"
              },
              {
                "type": "null"
              }
            ]
          },
          "date_status": {
            "type": "string",
            "enum": ["confirmed", "estimated", "unknown"]
          },
          "is_rolling": {
            "type": "boolean"
          },
          "source": {
            "type": "string",
            "enum": ["manual", "observed", "predicted"],
            "description": "manual (read by a person), observed or predicted"
          },
          "evidence_method": {
            "anyOf": [
              {
                "type": "string",
                "enum": ["ats_api", "fetched", "search_index"]
              },
              {
                "type": "null"
              }
            ]
          },
          "evidence": {
            "description": "One-line quote or description of the evidence",
            "type": ["string", "null"]
          },
          "source_url": {
            "anyOf": [
              {
                "type": "string",
                "description": "Absolute URL"
              },
              {
                "type": "null"
              }
            ],
            "description": "The page the dates were read from"
          },
          "apply_url": {
            "anyOf": [
              {
                "type": "string",
                "description": "Absolute URL"
              },
              {
                "type": "null"
              }
            ]
          },
          "observed_first_seen_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Instant, ISO 8601"
              },
              {
                "type": "null"
              }
            ]
          },
          "observed_last_seen_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Instant, ISO 8601"
              },
              {
                "type": "null"
              }
            ]
          },
          "ogl": {
            "type": "boolean"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Instant, ISO 8601"
          }
        },
        "required": [
          "programme_slug",
          "cycle_year",
          "opens_at",
          "closes_at",
          "date_status",
          "is_rolling",
          "source",
          "evidence_method",
          "evidence",
          "source_url",
          "apply_url",
          "observed_first_seen_at",
          "observed_last_seen_at",
          "ogl",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "description": "One application window per programme per intake"
    },
    "opening_history": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "programme_slug": {
            "type": "string"
          },
          "cycle_year": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "event": {
            "type": "string",
            "enum": ["opened", "closed"]
          },
          "date": {
            "type": "string",
            "format": "date",
            "description": "Calendar day, YYYY-MM-DD (UK)"
          },
          "observed_at": {
            "type": "string",
            "format": "date-time",
            "description": "Instant, ISO 8601"
          }
        },
        "required": ["programme_slug", "cycle_year", "event", "date", "observed_at"],
        "additionalProperties": false
      },
      "description": "Openings and closings the crawler observed (a matching vacancy went live, or the last one closed)"
    }
  },
  "required": [
    "$schema",
    "schema_version",
    "generated_at",
    "publisher",
    "licence",
    "counts",
    "employers",
    "programmes",
    "windows",
    "opening_history"
  ],
  "additionalProperties": false,
  "description": "Apprentice Atlas open data: UK employer apprenticeship programmes and their windows",
  "title": "Apprentice Atlas open data export"
}
