Skip to content

The income statement and balance sheet of a period, arranged and signed by the service

GET
/v1/entities/{entity_id}/reports/statements
curl --request GET \
--url 'https://example.com/v1/entities/example/reports/statements?comparative=true'

Return the statements the PDF is drawn from, as JSON, so a screen and an emailed document cannot disagree.

This is the canonical shaped view from issue 0008 section B. Sections, their order, signs, subtotals, the result row and whether the two sides of the sheet meet are decided once in haddon.statements.shape. The interface reads that arrangement instead of rebuilding it, and the PDF is drawn from the same view. difference and its per-column checks are part of the output, which keeps JSON, interface and PDF in agreement mid-period when equity carries a result nothing has posted to it.

Every commodity the period holds comes back shaped, the requested one first. other_commodities names the rest, so a reader is told what a single-commodity statement leaves out.

entity_id
required
Entity Id

The entity this path is relative to

string

The entity this path is relative to

from
Any of:
string

Inclusive

to
Any of:
string

Inclusive

comparative
Comparative

Show the period before this one beside it, when these books hold one

boolean
default: true

Show the period before this one beside it, when these books hold one

commodity
Any of:
string

Defaults to the entity’s base currency

Successful Response

Media typeapplication/json
StatementsDocument
object
entity_id
required
Entity Id
string
legal_name
required
Legal Name
string
base_currency
required
Base Currency
string
snapshot_seq
required
Snapshot Seq
integer
report
required
Report
string
commodity
required
Commodity

The commodity the document leads with: the one requested, or the base one

string
period
required
PeriodLabel
object
start
required
Start
string
end
required
End
string
name
required
Name
string
heading
required
Heading
string
comparative
required
Any of:
ComparativeLabel
object
start
required
Start
string
end
required
End
string
name
required
Name
string
as_of
required
As Of
string
footnote
required
Footnote

The sign convention and the commodities this document does not show

string
statements
required
Statements

One shaped income statement and balance sheet per commodity these books hold in the period

Array<object>
CommodityStatements
object
commodity
required
Commodity
string
income_statement
required
IncomeStatementView
object
commodity
required
Commodity
string
start
required
Any of:
string
end
required
Any of:
string
comparative_start
required
Any of:
string
comparative_end
required
Any of:
string
result_label
required
Result Label

This commodity’s own bottom line, said rather than left to the sign; a document of several commodities has one label per commodity

string
sections
required
Sections
Array<object>
ShapedSection
object
key
required
Key
string
title
required
Title
string
total_label
required
Total Label
string
total_micros
required
Total Micros

Signed integer micro-units (millionths) as a base-10 string; never a JSON number.

string
/^-?(0|[1-9][0-9]*)$/
comparative_total_micros
Any of:
string
/^-?(0|[1-9][0-9]*)$/
groups
required
Groups
Array<object>
ShapedGroup
object
key
required
Key
string
heading
required
Any of:
string
subtotal_micros
Any of:
string
/^-?(0|[1-9][0-9]*)$/
comparative_subtotal_micros
Any of:
string
/^-?(0|[1-9][0-9]*)$/
lines
required
Lines
Array<object>
ShapedLine
object
key
required
Key
string
account_id
required
Any of:
string
label
required
Label
string
amount_micros
required
Amount Micros

Signed integer micro-units (millionths) as a base-10 string; never a JSON number.

string
/^-?(0|[1-9][0-9]*)$/
comparative_micros
Any of:
string
/^-?(0|[1-9][0-9]*)$/
result_micros
required
Result Micros

Signed integer micro-units (millionths) as a base-10 string; never a JSON number.

string
/^-?(0|[1-9][0-9]*)$/
comparative_result_micros
Any of:
string
/^-?(0|[1-9][0-9]*)$/
balance_sheet
required
BalanceSheetView
object
commodity
required
Commodity
string
as_of
required
As Of
string
comparative_as_of
required
Any of:
string
sections
required
Sections
Array<object>
ShapedSection
object
key
required
Key
string
title
required
Title
string
total_label
required
Total Label
string
total_micros
required
Total Micros

Signed integer micro-units (millionths) as a base-10 string; never a JSON number.

string
/^-?(0|[1-9][0-9]*)$/
comparative_total_micros
Any of:
string
/^-?(0|[1-9][0-9]*)$/
groups
required
Groups
Array<object>
ShapedGroup
object
key
required
Key
string
heading
required
Any of:
string
subtotal_micros
Any of:
string
/^-?(0|[1-9][0-9]*)$/
comparative_subtotal_micros
Any of:
string
/^-?(0|[1-9][0-9]*)$/
lines
required
Lines
Array<object>
ShapedLine
object
key
required
Key
string
account_id
required
Any of:
string
label
required
Label
string
amount_micros
required
Amount Micros

Signed integer micro-units (millionths) as a base-10 string; never a JSON number.

string
/^-?(0|[1-9][0-9]*)$/
comparative_micros
Any of:
string
/^-?(0|[1-9][0-9]*)$/
total_assets_micros
required
Total Assets Micros

Signed integer micro-units (millionths) as a base-10 string; never a JSON number.

string
/^-?(0|[1-9][0-9]*)$/
total_funding_micros
required
Total Funding Micros

Signed integer micro-units (millionths) as a base-10 string; never a JSON number.

string
/^-?(0|[1-9][0-9]*)$/
difference_micros
required
Difference Micros

Signed integer micro-units (millionths) as a base-10 string; never a JSON number.

string
/^-?(0|[1-9][0-9]*)$/
comparative_total_assets_micros
Any of:
string
/^-?(0|[1-9][0-9]*)$/
comparative_total_funding_micros
Any of:
string
/^-?(0|[1-9][0-9]*)$/
comparative_difference_micros
Any of:
string
/^-?(0|[1-9][0-9]*)$/
checks
required
Checks

One entry per column shown: assets less the two sides funding them, which is zero on a balanced journal at every date

Array<object>
BalanceCheck
object
date
required
Date
string
difference_micros
required
Difference Micros

Signed integer micro-units (millionths) as a base-10 string; never a JSON number.

string
/^-?(0|[1-9][0-9]*)$/
other_commodities
required
Other Commodities
Array<string>
links
required
Links
object
key
additional properties
string

Example

{
"statements": [
{
"income_statement": {
"sections": [
{
"total_micros": "-12000000",
"groups": [
{
"lines": [
{
"amount_micros": "-12000000"
}
]
}
]
}
],
"result_micros": "-12000000"
},
"balance_sheet": {
"sections": [
{
"total_micros": "-12000000",
"groups": [
{
"lines": [
{
"amount_micros": "-12000000"
}
]
}
]
}
],
"total_assets_micros": "-12000000",
"total_funding_micros": "-12000000",
"difference_micros": "-12000000",
"checks": [
{
"difference_micros": "-12000000"
}
]
}
}
]
}

Bad Request

Media typeapplication/json
ErrorEnvelope
object
error
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
retryable
required
Retryable
boolean
details
required
Details
Array<object>
object
key
additional properties
any
request_id
Any of:
string
next_action
Any of:
object
key
additional properties
any

Example generated

{
"error": {
"code": "example",
"message": "example",
"retryable": true,
"details": [
{}
],
"request_id": "example",
"next_action": {}
}
}

Unauthorized

Media typeapplication/json
ErrorEnvelope
object
error
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
retryable
required
Retryable
boolean
details
required
Details
Array<object>
object
key
additional properties
any
request_id
Any of:
string
next_action
Any of:
object
key
additional properties
any

Example generated

{
"error": {
"code": "example",
"message": "example",
"retryable": true,
"details": [
{}
],
"request_id": "example",
"next_action": {}
}
}

Forbidden

Media typeapplication/json
ErrorEnvelope
object
error
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
retryable
required
Retryable
boolean
details
required
Details
Array<object>
object
key
additional properties
any
request_id
Any of:
string
next_action
Any of:
object
key
additional properties
any

Example generated

{
"error": {
"code": "example",
"message": "example",
"retryable": true,
"details": [
{}
],
"request_id": "example",
"next_action": {}
}
}

Not Found

Media typeapplication/json
ErrorEnvelope
object
error
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
retryable
required
Retryable
boolean
details
required
Details
Array<object>
object
key
additional properties
any
request_id
Any of:
string
next_action
Any of:
object
key
additional properties
any

Example generated

{
"error": {
"code": "example",
"message": "example",
"retryable": true,
"details": [
{}
],
"request_id": "example",
"next_action": {}
}
}

Conflict

Media typeapplication/json
ErrorEnvelope
object
error
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
retryable
required
Retryable
boolean
details
required
Details
Array<object>
object
key
additional properties
any
request_id
Any of:
string
next_action
Any of:
object
key
additional properties
any

Example generated

{
"error": {
"code": "example",
"message": "example",
"retryable": true,
"details": [
{}
],
"request_id": "example",
"next_action": {}
}
}

Precondition Failed

Media typeapplication/json
ErrorEnvelope
object
error
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
retryable
required
Retryable
boolean
details
required
Details
Array<object>
object
key
additional properties
any
request_id
Any of:
string
next_action
Any of:
object
key
additional properties
any

Example generated

{
"error": {
"code": "example",
"message": "example",
"retryable": true,
"details": [
{}
],
"request_id": "example",
"next_action": {}
}
}

Unprocessable Content

Media typeapplication/json
ErrorEnvelope
object
error
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
retryable
required
Retryable
boolean
details
required
Details
Array<object>
object
key
additional properties
any
request_id
Any of:
string
next_action
Any of:
object
key
additional properties
any

Example generated

{
"error": {
"code": "example",
"message": "example",
"retryable": true,
"details": [
{}
],
"request_id": "example",
"next_action": {}
}
}

Internal Server Error

Media typeapplication/json
ErrorEnvelope
object
error
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
retryable
required
Retryable
boolean
details
required
Details
Array<object>
object
key
additional properties
any
request_id
Any of:
string
next_action
Any of:
object
key
additional properties
any

Example generated

{
"error": {
"code": "example",
"message": "example",
"retryable": true,
"details": [
{}
],
"request_id": "example",
"next_action": {}
}
}

Service Unavailable

Media typeapplication/json
ErrorEnvelope
object
error
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
retryable
required
Retryable
boolean
details
required
Details
Array<object>
object
key
additional properties
any
request_id
Any of:
string
next_action
Any of:
object
key
additional properties
any

Example generated

{
"error": {
"code": "example",
"message": "example",
"retryable": true,
"details": [
{}
],
"request_id": "example",
"next_action": {}
}
}