The Movements API provides a complete ledger of all financial activity within a community. Each entry is classified as either an income (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/GuillermoNavarro/Proyecto_comunidades/llms.txt
Use this file to discover all available pages before exploring further.
INGRESO) or an expense (GASTO). Movements linked to a paid receipt are generated automatically by the system when a fee is settled; manual movements are created by admins to record community expenses such as maintenance or repairs.
Data model
Auto-generated primary key for the movement record.
A human-readable label describing the movement (e.g.
"Reparacion ascensor").The community this movement belongs to. Auto-populated from the JWT — do not send this field manually when creating a movement.
The resident linked to this movement. Present on income entries generated from fee receipts;
null for manual expense movements.The date the movement occurred, in ISO-8601 date format.
The monetary amount of the movement. Always a positive value regardless of type.
The direction of the movement. Must be one of:
| Value | Meaning |
|---|---|
GASTO | An outgoing expense (e.g. repairs, services) |
INGRESO | An incoming payment (e.g. fee receipt paid by a resident) |
The receipt that triggered this movement. Only present on automatically generated income entries;
null for manually created movements.Endpoints
GET /api/movimientos
Returns every movement stored in the database, across all communities.Required role:
SUPER_ADMINMovimiento records.
Response
A flat array of all movement objects in the system.
GET /api/movimientos/comunidad
Returns all movements that belong to the authenticated user’s community, as encoded in the JWT.Required role:
USER or ADMINAll movement records scoped to the caller’s community.
GET /api/movimientos/me
Returns only the movements associated with the authenticated user’s own account.Required role:
USER or ADMINMovements where the
usuario field matches the authenticated user’s ID.GET /api/movimientos/{idMovimiento}
Returns a single movement by its ID, enforcing a community ownership check.Required role:
ADMIN403 Forbidden. This prevents cross-community data leakage at the admin level.
Path parameters
The numeric ID of the movement to retrieve.
| Code | Meaning |
|---|---|
200 OK | Movement found and belongs to the admin’s community |
403 Forbidden | Movement exists but belongs to a different community |
404 Not Found | No movement found with the given ID |
POST /api/movimientos
Creates a new manual movement record for the admin’s community.Required role:
ADMIN or SUPER_ADMINThe
comunidad field is automatically set from the JWT token and must not be included in the request body. Only provide nombre, fecha, importe, and tipo.application/json
A descriptive label for the movement, e.g.
"Reparacion ascensor".The movement date in
YYYY-MM-DD format.The monetary amount. Use a positive decimal value.
The movement type. Must be exactly
GASTO or INGRESO.Optional. An object containing
id (Long) if the movement should be linked to a specific resident. Omit for community-wide expenses.The full persisted movement object, including the auto-assigned
id and resolved comunidad.