Overview
The Community Charges API provides comprehensive statement views that combine charges (cargos) and payments (pagos) for contracts and communities. This API is designed for viewing and querying charge data, not for creating or modifying charges.All endpoints in this section require ADMIN_COMPANY or SYSTEM_ADMIN role.
Statement Object
A statement provides a complete financial view combining charges and payments.Array of charge objects
Array of payment objects
Get Statement by Contract
Retrieve a complete statement (charges and payments) for a specific contract.Path Parameters
The unique identifier of the contract
Authorization
RequiresADMIN_COMPANY or SYSTEM_ADMIN role.
Response
Returns a StatementDto object containing arrays of charges (cargos) and payments (pagos).Example Response
Example Request
Get Statement by Community
Retrieve a complete statement (charges and payments) for all contracts in a specific community.Path Parameters
The unique identifier of the community
Authorization
RequiresADMIN_COMPANY or SYSTEM_ADMIN role.
Response
Returns a StatementDto object containing all charges and payments for contracts in the specified community.Example Request
Get Charges by Community
Retrieve only the charges (without payments) for a specific community.Path Parameters
The unique identifier of the community
Authorization
RequiresADMIN_COMPANY or SYSTEM_ADMIN role.
Response
Returns an array of CargoComunidadDto objects for the specified community.Example Response
Get Charges by Contract
Retrieve only the charges (without payments) for a specific contract.Path Parameters
The unique identifier of the contract
Authorization
RequiresADMIN_COMPANY or SYSTEM_ADMIN role.
Response
Returns an array of CargoComunidadDto objects for the specified contract.Example Request
Resident Charges
In addition to community charges tracked at the contract level, the system also supports individual resident charges through the/api/CargosResidente endpoints.
Key Differences
| Feature | Community Charges | Resident Charges |
|---|---|---|
| Endpoint | /api/charges/* | /api/CargosResidente/* |
| Associated With | Contracts & Communities | Individual Residents |
| Purpose | Contract-level billing | Resident-specific charges |
| Status Values | No vencido, vencido, pagado, pago parcial | Activo, Pagado, PagoParcial, Cancelado |
| Late Fees | MontoRecargos field | Not tracked |
| Payment Link | PagoComunidad via PagoCargoComunidad | Managed separately |
Get All Resident Charges
Get Resident Charges by Resident ID
Get Resident Charges by Community ID
Create Resident Charge
Update Resident Charge
Delete Resident Charge
Understanding Charge Status
Community Charge Status
Community charges use Spanish status values that reflect their payment timeline:- No vencido: Charge is not yet due (before
fechaDePago) - vencido: Charge is overdue (after
fechaDePago, not fully paid) - pagado: Charge has been fully paid
- pago parcial: Charge has been partially paid but balance remains
Late Fees (Recargos)
ThemontoRecargos field tracks additional fees applied to overdue charges. The total amount owed is montoCargo + montoRecargos.
Payment Application
When a payment is recorded:- Payment is created in
PagoComunidadtable - Payment is linked to one or more charges via
PagoCargoComunidad - Each link specifies
montoAplicado(amount applied to that charge) - Charge status updates automatically based on total payments applied
Error Responses
401 Unauthorized
Returned when authentication is missing or invalid.403 Forbidden
Returned when the user doesn’t have the required role.404 Not Found
Returned when the requested contract or community doesn’t exist.Best Practices
- Use Statements: Use statement endpoints to get a complete financial view
- Check Status: Monitor charge status to identify overdue accounts
- Track Late Fees: Include
montoRecargoswhen calculating total amounts due - Payment Application: Review
pagoCargosto understand how payments were applied - Filter by Community: Use community-level endpoints for managing multiple contracts
- Date Awareness: Consider
fechaDePagowhen determining if charges are overdue