Ir a la app

The reports API lets you generate official PDF documents and retrieve narrative risk analysis for institutional communication.

Rate limit: 10 requests per minute.


POST /api/v1/report

Generates an official PDF report for a municipality and period. Returns the PDF binary directly.

Request

curl -s -X POST "https://api.pastormap.com/api/v1/report" \
  -H "Authorization: Bearer $PASTOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"municipio_id": "05001", "periodo": "2026-07"}' \
  --output report.pdf

Request body

Field Type Required Description
municipio_id string Yes INE municipality code (5 digits, e.g. 05001).
periodo string (YYYY-MM) Yes Month for the report (e.g. 2026-07).

Response

Content-Type: application/pdf

The response body is a PDF binary. Write it directly to a file or stream it to the client.


GET /api/v1/framing

Returns a narrative risk analysis for a municipality, structured for institutional communication.

Request

curl -s "https://api.pastormap.com/api/v1/framing?municipio_id=05001" \
  -H "Authorization: Bearer $PASTOR_API_KEY"

Query parameters

Parameter Type Required Description
municipio_id string Yes INE municipality code.