TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/adrianaarang/climapp/llms.txt
Use this file to discover all available pages before exploring further.
/api/registrar endpoint accepts a JSON body containing a manually entered climate observation and persists it to the local data/registros_climaticos.json file. This allows users to log their own measurements independently of the live AEMET feed. If the municipio field is omitted or sent as "null", ClimApp automatically resolves the municipality name from the internal station lookup table using the provided estacion_id. Every record saved through this endpoint is tagged with "fuente": "manual" so it can be distinguished from AEMET-sourced data when filtering.
Endpoint
Request body
AEMET station identifier for the measurement location (e.g.
"3195" for Madrid-Retiro).Municipality name associated with the station. If omitted or set to
"null", ClimApp resolves the name automatically from the station lookup table using estacion_id.Date of the observation in
DD/MM/YYYY format (e.g. "29/04/2026"). See the date format warning below.Air temperature in degrees Celsius (°C). Accepted range:
-50 to 60.Relative humidity as a percentage (%). Accepted range:
0 to 100.Wind speed in kilometres per hour (km/h). Must be
≥ 0.Accumulated rainfall in millimetres (mm). Must be
≥ 0.Example request
Success response
On success the endpoint returns HTTP201 with the saved record echoed back in the data field.
Error responses
| Status | Condition | Response body |
|---|---|---|
400 | Request body is empty or Content-Type is not JSON | {"error": "No se recibió el paquete de datos"} |
400 | Validation fails (e.g. wrong date format, out-of-range values) | {"status": "error", "message": "❌ Datos no válidos. Asegúrate de usar el formato de fecha correcto."} |
500 | An error occurs while writing to the JSON storage file | {"error": "Error al escribir en el JSON"} |
Stored record fields
Each record written todata/registros_climaticos.json contains the following fields:
AEMET station identifier provided in the request.
Observation date in
DD/MM/YYYY format, exactly as supplied in the request.Temperature in °C, cast to
float.Relative humidity %, cast to
float.Wind speed in km/h, cast to
float.Rainfall in mm, cast to
float.Municipality name, either provided in the request or resolved automatically from the station lookup table.
Always
"manual" for records saved through this endpoint. Used by the filter and comparison features to distinguish manual entries from AEMET data.