API Changelog

A complete history of changes to the ClauseHub APIs. We follow semantic versioning.

v1.7.0 17 March 2026 Feature
  • Added POST /auth/login endpoint — clients authenticate with email and password through the API, no Supabase credentials needed
  • Standalone scraper extracted to energy-api-scraper repo — fetches real TIL data from Octopus, EDF, and E.ON Next via their Kraken APIs (1,054 tariffs)
  • Scraper authenticates via /auth/login and submits tariffs through the standard API using the Python client library
v1.6.0 17 March 2026 Feature
  • Added tariff changes feed endpoint (GET /tariffs/changes?since=) — returns created, updated, and archived tariffs since a given timestamp
  • Added CSV-based data ingestion pipeline (scripts/ingest_tariffs.py) with daily scheduled GitHub Actions workflow
  • Ingestion is idempotent — compares incoming data with existing tariffs, creates new versions only when rates change
v1.5.0 17 March 2026 Feature
  • Added admin role assignment endpoint (PATCH /admin/users/{id}/role) — assign consumer, supplier, or admin roles via Supabase app_metadata
  • Auth middleware now reads role and supplier_id from Supabase app_metadata JWT claims
  • Added support for ES256 (asymmetric) JWT verification via Supabase JWKS endpoint, with HS256 fallback
v1.4.0 17 March 2026 Improvement
  • Public search endpoint now redacts pricing fields — value, standingChargeValue, exitFees, and discounts return null. Full pricing requires authentication on a paid plan.
  • Replaced python-jose with PyJWT to resolve high-severity ecdsa dependency vulnerability
  • CI now uses PostgreSQL 16 service container for tests (no external test database required)
  • Fixed all 34 integration tests — resolved asyncpg event loop issues with SlowAPI middleware
v1.3.0 10 March 2026 Feature
  • Added public search endpoint (GET /tariffs/search/public) — no authentication required
  • Added bulk tariff creation endpoint (POST /suppliers/{id}/tariffs/bulk) — up to 100 items per request
  • Added consumableRange filter to search endpoints
v1.2.0 24 February 2026 Feature
  • Added version history endpoints for all resource types (GET /{resource}/{id}/versions)
  • Added updatedSince query parameter for filtering recently changed tariffs
  • Added GET /tariffs/recent endpoint
v1.1.0 10 February 2026 Improvement
  • Improved cursor-based pagination with JSON:API links object
  • Added rate limiting headers (X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset)
  • Added OpenAPI specification endpoint at GET /schema
v1.0.0 27 January 2026 Launch
  • Initial release of the Energy API
  • Full CRUD for suppliers, tariffs, consumables, contracts, regions, payment methods
  • JSON:API v1.0 compliant responses
  • Supabase JWT authentication with role-based access control (admin, supplier, consumer)
  • Immutable versioning across all resources
  • 14 DNO regions with PES codes
  • Health check endpoint at GET /health