Skip to main content

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.

The Receipts API exposes read-only access to Recibo (receipt) records. Receipts are created automatically by the system whenever a new Cuota (fee) is saved — one receipt is generated per active user in the community (or for a single user when the fee type is INDIVIDUAL). There is no POST endpoint for manually creating receipts through this API. Each receipt links a user to a fee and tracks whether the charge is PENDIENTE (outstanding) or PAGADO (paid).
Receipts cannot be created manually via the API. They are generated automatically when you call POST /api/cuotas.
All endpoints require a valid JWT Bearer token in the Authorization header.

GET /api/recibos/me

Returns all receipts belonging to the currently authenticated user, identified by the id claim in their JWT.
Required role: USER or ADMIN
curl -X GET https://api.example.com/api/recibos/me \
  -H "Authorization: Bearer <token>"
Response 200 OK — array of Recibo objects for the calling user.
[].id
number
Unique identifier of the receipt.
[].importe
number
Amount charged to this user on this receipt.
[].estadoRecibo
string
Payment status. Either PENDIENTE (unpaid) or PAGADO (paid).
[].cuota
object
The fee that generated this receipt. The comunidad field is omitted from the nested cuota to avoid circular data.
[].comunidad
object
The community this receipt belongs to.
[].usuario
object
The user to whom this receipt is issued. The password and comunidad fields are excluded from this nested object.
Example response
[
  {
    "id": 101,
    "importe": 6.80,
    "estadoRecibo": "PENDIENTE",
    "cuota": {
      "id": 10,
      "nombre": "Cuota Ordinaria Enero 2025",
      "fechaEmision": "2025-01-01",
      "fechaVencimiento": "2025-01-31",
      "importe": 85.00,
      "tipo": "ORDINARIA"
    },
    "comunidad": {
      "id": 1,
      "nombre": "Comunidad Los Pinos",
      "direccion": "Calle Mayor 10",
      "ciudad": "Madrid",
      "codPostal": "28001"
    },
    "usuario": {
      "id": 5,
      "dni": "87654321B",
      "nombre": "Carlos",
      "apellidos": "Martínez Ruiz",
      "puerta": "1C",
      "telefono": "611987654",
      "email": "[email protected]",
      "rol": "USER",
      "coeficiente": 0.08,
      "estado": true,
      "cambiarPass": false
    }
  }
]
StatusMeaning
200OK — list returned (may be empty).
403Forbidden — caller does not have USER or ADMIN role.

GET /api/recibos/comunidad

Returns all receipts (both PENDIENTE and PAGADO) for the community encoded in the caller’s JWT. Useful for a full payment ledger view.
Required role: ADMIN
curl -X GET https://api.example.com/api/recibos/comunidad \
  -H "Authorization: Bearer <token>"
Response 200 OK — array of Recibo objects scoped to the caller’s community (same schema as GET /api/recibos/me).
StatusMeaning
200OK — list returned (may be empty).
403Forbidden — caller does not have ADMIN role.

GET /api/recibos/comunidad/morosos

Returns only the PENDIENTE receipts for the caller’s community — the delinquency list. Use this endpoint to identify residents with outstanding balances.
Required role: ADMIN
This endpoint is the fastest way to produce a list of residents who have not paid any outstanding fee. Filter the results by usuario.id to see all unpaid charges for a specific resident.
curl -X GET https://api.example.com/api/recibos/comunidad/morosos \
  -H "Authorization: Bearer <token>"
Response 200 OK — array of Recibo objects where estadoRecibo is PENDIENTE.
Example response
[
  {
    "id": 102,
    "importe": 6.80,
    "estadoRecibo": "PENDIENTE",
    "cuota": {
      "id": 10,
      "nombre": "Cuota Ordinaria Enero 2025",
      "fechaEmision": "2025-01-01",
      "fechaVencimiento": "2025-01-31",
      "importe": 85.00,
      "tipo": "ORDINARIA"
    },
    "comunidad": {
      "id": 1,
      "nombre": "Comunidad Los Pinos",
      "direccion": "Calle Mayor 10",
      "ciudad": "Madrid",
      "codPostal": "28001"
    },
    "usuario": {
      "id": 7,
      "dni": "11223344C",
      "nombre": "Lucía",
      "apellidos": "Fernández Vega",
      "puerta": "4D",
      "telefono": "622334455",
      "email": "[email protected]",
      "rol": "USER",
      "coeficiente": 0.08,
      "estado": true,
      "cambiarPass": false
    }
  }
]
StatusMeaning
200OK — list returned (may be empty if no debts outstanding).
403Forbidden — caller does not have ADMIN role.

GET /api/recibos/usuario/{idUsuario}/pendientes

Returns all PENDIENTE receipts for a specific user within the caller’s JWT community. Useful for checking the total outstanding debt of an individual resident.
Required role: ADMIN

Path parameters

idUsuario
number
required
The unique identifier of the user whose pending receipts should be returned.
curl -X GET https://api.example.com/api/recibos/usuario/5/pendientes \
  -H "Authorization: Bearer <token>"
Response 200 OK — array of Recibo objects where estadoRecibo is PENDIENTE for the given user.
Example response
[
  {
    "id": 101,
    "importe": 6.80,
    "estadoRecibo": "PENDIENTE",
    "cuota": {
      "id": 10,
      "nombre": "Cuota Ordinaria Enero 2025",
      "fechaEmision": "2025-01-01",
      "fechaVencimiento": "2025-01-31",
      "importe": 85.00,
      "tipo": "ORDINARIA"
    },
    "comunidad": {
      "id": 1,
      "nombre": "Comunidad Los Pinos",
      "direccion": "Calle Mayor 10",
      "ciudad": "Madrid",
      "codPostal": "28001"
    },
    "usuario": {
      "id": 5,
      "dni": "87654321B",
      "nombre": "Carlos",
      "apellidos": "Martínez Ruiz",
      "puerta": "1C",
      "telefono": "611987654",
      "email": "[email protected]",
      "rol": "USER",
      "coeficiente": 0.08,
      "estado": true,
      "cambiarPass": false
    }
  }
]
StatusMeaning
200OK — list returned (may be empty).
403Forbidden — caller does not have ADMIN role.

GET /api/recibos/cuota/{idCuota}

Returns all receipts associated with a specific fee within the caller’s JWT community. Useful for auditing payment status for a particular billing cycle.
Required role: ADMIN

Path parameters

idCuota
number
required
The unique identifier of the fee whose receipts should be returned.
curl -X GET https://api.example.com/api/recibos/cuota/10 \
  -H "Authorization: Bearer <token>"
Response 200 OK — array of Recibo objects for all residents linked to the specified fee, reflecting each individual’s payment status.
Example response
[
  {
    "id": 101,
    "importe": 6.80,
    "estadoRecibo": "PAGADO",
    "cuota": {
      "id": 10,
      "nombre": "Cuota Ordinaria Enero 2025",
      "fechaEmision": "2025-01-01",
      "fechaVencimiento": "2025-01-31",
      "importe": 85.00,
      "tipo": "ORDINARIA"
    },
    "comunidad": {
      "id": 1,
      "nombre": "Comunidad Los Pinos",
      "direccion": "Calle Mayor 10",
      "ciudad": "Madrid",
      "codPostal": "28001"
    },
    "usuario": {
      "id": 5,
      "dni": "87654321B",
      "nombre": "Carlos",
      "apellidos": "Martínez Ruiz",
      "puerta": "1C",
      "telefono": "611987654",
      "email": "[email protected]",
      "rol": "USER",
      "coeficiente": 0.08,
      "estado": true,
      "cambiarPass": false
    }
  },
  {
    "id": 102,
    "importe": 6.80,
    "estadoRecibo": "PENDIENTE",
    "cuota": {
      "id": 10,
      "nombre": "Cuota Ordinaria Enero 2025",
      "fechaEmision": "2025-01-01",
      "fechaVencimiento": "2025-01-31",
      "importe": 85.00,
      "tipo": "ORDINARIA"
    },
    "comunidad": {
      "id": 1,
      "nombre": "Comunidad Los Pinos",
      "direccion": "Calle Mayor 10",
      "ciudad": "Madrid",
      "codPostal": "28001"
    },
    "usuario": {
      "id": 7,
      "dni": "11223344C",
      "nombre": "Lucía",
      "apellidos": "Fernández Vega",
      "puerta": "4D",
      "telefono": "622334455",
      "email": "[email protected]",
      "rol": "USER",
      "coeficiente": 0.08,
      "estado": true,
      "cambiarPass": false
    }
  }
]
StatusMeaning
200OK — list returned (may be empty).
403Forbidden — caller does not have ADMIN role.

Build docs developers (and LLMs) love