Documentation
IntegrationsEnterprise plan
Measurements API
Publish your indicator measurements from an ERP, custom software or a script. Every measurement is as traceable as one entered by hand, with its source shown.
Before you start
- You need the Enterprise plan with the indicators module turned on.
- Only company administrators can create and revoke API keys.
- The indicator must already exist in Mapaflow and have a code (for example, IN-03-01). The API does not create indicators.
- Indicators filled in from a connected ERP (Odoo, Business Central) do not accept measurements through the API.
Create an API key
- 1Go to Settings → Integrations → API keys and click “New key”.
- 2Give it a name that says where it is used (for example, “Production ERP”) and choose when it expires: in 30 days, 90 days, 1 year or never.
- 3Copy the key (it starts with mf_) and store it in the system that will send the measurements.
The key is shown only once. Mapaflow only keeps a fingerprint, so it cannot be recovered: if you lose it, create a new one and revoke the old one.
Publish a measurement
Send a POST request to the indicator’s address, with the key in the Authorization header and the data as JSON:
curl -X POST https://mapaflow.com/api/v1/indicadores/IN-03-01/mediciones \
-H "Authorization: Bearer mf_…" \
-H "Content-Type: application/json" \
-d '{ "periodo": "2026-09", "valor": 93.5 }'Body fields
| periodo | Month (2026-09) or a date within the period (2026-09-30). If omitted, the last closed period is measured. Future periods are rejected. |
|---|---|
| valor | The period’s result, as a number. For indicators without a formula. |
| numerador, denominador | For indicators with a structured formula, instead of valor. Mapaflow calculates the result. |
| notas | Optional. Text that goes with the measurement (up to 1,000 characters). |
| motivo | Required only when correcting a period already measured with a different value (up to 500 characters). |
| noValorable | Optional, true when the period cannot be assessed. Requires notas. |
Indicator with numerator and denominator
{ "periodo": "2026-09", "numerador": 47, "denominador": 50 }Correct a period already measured
Measurements are never edited. If the period already has a different value, the old one is voided and the new one becomes its successor, with the reason. Sending the same measurement twice does not create a duplicate.
{ "periodo": "2026-09", "valor": 94.1, "motivo": "Adjusted after the accounting close" }Responses
HTTP/1.1 201 Created
{
"estado": "creada",
"medicion": { "id": 812, "periodo": "2026-09-01", "valor": 93.5, "noValorable": false }
}| Code | Meaning |
|---|---|
| 201 | Measurement created. |
| 200 | Measurement corrected (estado “corregida”) or identical to the existing one (estado “sin_cambios”). |
| 400 | Invalid data. The error field gives the reason (for example, invalid_period or reason_required) and key the failing field. |
| 401 | The key is missing, unknown, revoked or expired. For security, it does not say which. |
| 404 | No indicator has that code, or the indicators module is turned off. |
| 409 | The indicator is archived or is filled in from a connected ERP. |
| 429 | Too many requests: the limit is 120 per minute per key. Wait and try again. |
What happens in Mapaflow
- The measurement shows on the indicator with the “API” label and no author: it is clear that a system, not a person, published it.
- The same rules apply as for manual measurements: targets, alerts and compliance calculation.
- Every published measurement is recorded in the activity log, with the name of the key used.
Import from a CSV or Excel file
If your system exports a file instead of calling an API, use Settings → Integrations → “Import measurements from CSV or Excel”. The rules are the same as for the API.
- One row per measurement with the indicator code, the period, the value (or numerator and denominator) and, optionally, notes and reason. Columns are matched by name.
- Periods such as 2026-09, 09/2026, 30/09/2026 or 2026-09-30, and numbers with a comma or a dot.
- Up to 500 rows and 5 MB per file (.csv, .txt or .xlsx). A row with an error does not stop the others: at the end you see how many were created, corrected or rejected, and why.
- You can also schedule it: give the file’s https address and Mapaflow reads it every day. The address cannot contain a username or password; a signed link works.
Security
- Treat the key like a password: keep it in a secrets manager or an environment variable, never in code or an email.
- Use one key per system, so you can revoke one without stopping the others.
- If you think a key has leaked, revoke it in Settings → Integrations. It stops working immediately.
- A key can only publish measurements for your company. It cannot read or change anything else.