TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/elenacarino-max/mas-climapp/llms.txt
Use this file to discover all available pages before exploring further.
/api/registrar endpoint accepts manually entered climate data as a JSON payload. On receipt the controller constructs a RegistroClimatico model object, which enforces numeric types on all measurement fields, then passes the record through the AlertService before writing it to the JSON repository. The response includes the list of alert codes active for the submitted reading, giving you immediate feedback without a separate API call.
Request
Observation date. Accepted format:
DD/MM/YYYY. Example: "07/05/2026".Name of the municipality where the observation was taken. Example:
"Madrid". Defaults to "Desconocido" if omitted.Station identifier used to group records from the same sensor or observer. Example:
"EST-001".Air temperature in degrees Celsius. Must be castable to
float.Relative humidity as a percentage (0–100). Must be castable to
float.Wind speed in km/h. Must be castable to
float.Precipitation in mm. Must be castable to
float. Use 0 for no rain.Validation rules
- All numeric fields (
temperatura,humedad,viento,lluvia) are cast tofloatby theRegistroClimaticomodel. Supplying a non-numeric string causes a500error. - The request body must be valid JSON. A missing or non-JSON body returns a
400error. municipiois written to the stored record as-is; it is used as the filter key in/consultaand/comparar.
Example request
Response
Success — 201 Created
alertas array contains all alert codes active for the submitted record. See the alert code table for the full list of possible values.
Error responses
400 Bad Request — request body is absent or is not valid JSON.
500 Internal Server Error — the repository failed to write the record, or a field could not be cast to the expected type.
Records saved via this endpoint are tagged with
"fuente": "manual", which lets /consulta and /comparar distinguish them from AEMET-sourced records fetched through /api/clima.