Organization
Statements
What a project's charging came to in a calendar month, per person: one row of totals for each person who charged, and one person's month with the price rule behind it. The board gets totals and never when anyone charged, because a month of charging times shows when someone is home; the times stay on the person's own statement. A month that is still open is worked out when you ask, so its figures can change. When the board closes a month, its figures, names and documents are stored and fixed from then on, and the PDF and CSV files come from what was stored. Reading a month needs the settlement.statement.read permission and closing one needs settlement.statement.close; Owners and Admins hold both, because the answers name people and their money. Choose where a project's closed statements go. A project names at most one connected accounting app to receive its months once the board has closed them, or none. Anyone in the project can read the choice; choosing takes an Owner or Admin.
Endpoints
- GETSee a month of charging, per person
/v1/projects/{projectId}/statements - GETGet where statements go
/v1/projects/{projectId}/statements/destination - PUTChoose where statements go
/v1/projects/{projectId}/statements/destination - GETList the closed months
/v1/projects/{projectId}/statements/months - POSTClose a month
/v1/projects/{projectId}/statements/{month}/close - GETDownload the month's ledger as CSV
/v1/projects/{projectId}/statements/{month}/quarters.csv - GETSee one person's month
/v1/projects/{projectId}/statements/{month}/residents/{principalId} - GETDownload a person's quarter-hours as CSV
/v1/projects/{projectId}/statements/{month}/residents/{principalId}/quarters.csv - GETDownload a person's statement as a PDF
/v1/projects/{projectId}/statements/{month}/residents/{principalId}/statement.pdf