Income statement and balance sheet of one period, as a PDF
const url = 'https://example.com/v1/entities/example/reports/statements.pdf?comparative=true';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/v1/entities/example/reports/statements.pdf?comparative=true'Render the income statement and balance sheet as one PDF, drawn by the service rather than a browser.
Same journal, same period and same figures as the JSON reports. The shaping is haddon.statements, the
one place the sign convention, the grouping and the period result line are decided, so this document and any
other reader of /reports cannot disagree about a total.
The period names itself. from/to are the only period input, and whether that range is a calendar
year, quarter or month is worked out from the bounds (haddon.statements.period). A caller who could name
a granularity could name one its own dates contradict, and a PDF outlives the request that made it.
A balance sheet is at a date. It is drawn as at the period’s last day and headed that way, and its
comparative is the last day of the comparative period, never a range. Equity carries the income and expense
movements from the start of the journal to that date, which is what makes the two sides meet. The sheet is
cumulative, so a result row covering only the requested period would leave earlier profit in neither equity
nor the result line, and any range not starting at the journal’s start would print a difference.
web/src/routes/Reports.tsx asks for the same open start.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The entity this path is relative to
The entity this path is relative to
Query Parameters
Section titled “Query Parameters”Show the period before this one beside it, when these books hold one
Show the period before this one beside it, when these books hold one
Responses
Section titled “Responses”Successful Response
Bad Request
object
Example generated
{ "error": { "code": "example", "message": "example", "retryable": true, "details": [ {} ], "request_id": "example", "next_action": {} }}Unauthorized
object
Example generated
{ "error": { "code": "example", "message": "example", "retryable": true, "details": [ {} ], "request_id": "example", "next_action": {} }}Forbidden
object
Example generated
{ "error": { "code": "example", "message": "example", "retryable": true, "details": [ {} ], "request_id": "example", "next_action": {} }}Not Found
object
Example generated
{ "error": { "code": "example", "message": "example", "retryable": true, "details": [ {} ], "request_id": "example", "next_action": {} }}Conflict
object
Example generated
{ "error": { "code": "example", "message": "example", "retryable": true, "details": [ {} ], "request_id": "example", "next_action": {} }}Precondition Failed
object
Example generated
{ "error": { "code": "example", "message": "example", "retryable": true, "details": [ {} ], "request_id": "example", "next_action": {} }}Unprocessable Content
object
Example generated
{ "error": { "code": "example", "message": "example", "retryable": true, "details": [ {} ], "request_id": "example", "next_action": {} }}Internal Server Error
object
Example generated
{ "error": { "code": "example", "message": "example", "retryable": true, "details": [ {} ], "request_id": "example", "next_action": {} }}Service Unavailable
object
Example generated
{ "error": { "code": "example", "message": "example", "retryable": true, "details": [ {} ], "request_id": "example", "next_action": {} }}