v2

latestOpenAPI 3.1.0Source-specific upstream terms; see response catalog metadata2026-07-26139203447.9 KB
System

Service health

Return service status and BORME freshness from exactly one bounded global_counters_v1 offline projection. Its ETag is also bound to the shared asv1 generation used by CCAA, sector and sources, with 60-second must-revalidate caching. A cold request never opens SQLite, validates person/company sidecars, scans artifact directories, probes CSV files or rebuilds counters. Missing, legacy, malformed or future-dated projection bytes return 503.

get/api/v1/health

Headers

If-None-Matchstring

Optional RFC 9110 entity-tag validator. Weak validators, comma-separated validator lists and * are accepted.

Response

Health response

status'ok' | 'stale' | 'error' required
service'openmercantil' required
versionstring required
projection'global_counters_v1' required
projection_generationstring required
generated_atstring date-time required
artifacts_age_hoursnumber required
latest_borme_processedstring date required
companies_indexed_approxinteger required
total_events_approxinteger required
count_source'offline_projection' required
degradedboolean required

True when any feature is disabled/invalid or the data is stale (artifacts_age_hours >= 26), even if status is still "ok".