Vepler logo
v2.127.0 Breaking change

Schools API reworked: provider-keyed lookups, flexible query, and catchment matching

The Schools API moves to a provider-keyed, query-body shape and gains catchment: per-school polygons, nationwide coverage, and catchment-enriched school queries by UPRN or point.

Added

  • Catchment matching folds into POST /v1/schools/query. Supply a catchmentReference (with either uprn or point) and each school gains an inline catchment block (matchBasis plus verdict), while the response gains a meta.catchment block listing the tiers applied, tiers skipped (with reason), and coverage warnings. Matching runs five tiers: designated polygon, last-admitted distance, faith jurisdiction, feeder link, and distance ranking.
  • New GET /v1/schools/catchment/by-school/{id} returns a GeoJSON FeatureCollection of every catchment polygon effective for a school. Use asOfDate for historic queries and catchmentType to restrict by area type.
  • New GET /v1/schools/catchment/coverage returns a per-tier histogram of local-authority ingest status (loaded, discovered, not_started, …) across polygons, outcomes, feeders and faith jurisdictions, scoped by country.
  • New GET /v1/schools/autocomplete for type-ahead lookup by name, combining a prefix match with a trigram fallback. Takes q, limit and onlyOpen.
  • New provider-keyed lookups: GET /v1/schools/source/{provider}/{key} for a single school and POST /v1/schools/source/query for batch fetch (up to 500 keys). Provider codes are dfe, welshgov, seed, deni and dept_edu_ie.
  • New metric aggregation endpoints: POST /v1/schools/metrics/compare to compare a metric across schools, and GET /v1/schools/metrics/geographic to aggregate a metric across a geography.

Changed

  • Listing, free-text and geographic search are unified into POST /v1/schools/query. Filter by country, region, providers, type, status, rating, authority, postcode or free-text query; search geographically with near (radius, max 50km) or within (bounding box), which are mutually exclusive; paginate with limit/offset and order with orderBy/order.

Removed