Statement lines across every statement, by date: what each is and what it was booked to
const url = 'https://example.com/v1/entities/example/lines';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/linesList lines across every statement over a date range, with what became of each and its entries.
GET /statements/{id}/lines reads one document in printed order. This reads by time: every line of every
statement in the range, ordered by date and then document order, the way somebody reviewing a period reads
it.
state is applied after the page is read, because a line’s status is not a column. It is derived from
the chain of explanations written for the line, their allocations, the entries behind them and whether the
line’s statement has been replaced. Doing that in SQL would be a second implementation of
lines_repo.line_state that could disagree with the first, which is worse than a short page.
So a page here can hold fewer items than limit, or none, while next_cursor is still set.
filtered_after_page lists the filters applied after selection; while it is non-empty, a short page is
not the end of the results. Read until next_cursor is null.
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”Keep only these line statuses; repeat for several
Keep only these line statuses; repeat for several
Responses
Section titled “Responses”Successful Response
Statement lines across every statement, by date: what each one is, and what it was booked to.
object
What has become of one statement line.
status is derived from the live explanation, never stored, so there is exactly one answer.
unexplained_micros is the remainder, reported in every state including a fully explained line, where it
is "0". history is every explanation ever written for this line, oldest first.
object
Signed integer micro-units (millionths) as a base-10 string; never a JSON number.
Unexplained | partly_explained | booked | linked | ignored | superseded_input
Signed integer micro-units (millionths) as a base-10 string; never a JSON number.
Signed integer micro-units (millionths) as a base-10 string; never a JSON number.
One thing somebody said about a line. The chain of these is the line’s history.
object
Booked | linked | ignored
object
Signed integer micro-units (millionths) as a base-10 string; never a JSON number.
Signed integer micro-units (millionths) as a base-10 string; never a JSON number.
One thing somebody said about a line. The chain of these is the line’s history.
object
Booked | linked | ignored
object
Signed integer micro-units (millionths) as a base-10 string; never a JSON number.
Signed integer micro-units (millionths) as a base-10 string; never a JSON number.
The entries this line is booked or linked to, oldest first
An entry a statement line is explained by, with the mirror that already reverses it, if any.
object
object
Signed integer micro-units (millionths) as a base-10 string; never a JSON number.
object
object
object
Filters that were applied to each row’s derived state after this page was selected. While this is non-empty a page may hold fewer items than limit – even none – with next_cursor still set, and that is not the end of the results: read until next_cursor is null. It is empty when every filter in play was applied by the query itself, and a short page then does mean the last one.
Example
{ "items": [ { "amount_micros": "-12000000", "allocated_micros": "-12000000", "unexplained_micros": "-12000000", "explanation": { "allocations": [ { "amount_micros": "-12000000" } ], "allocated_micros": "-12000000" }, "history": [ { "allocations": [ { "amount_micros": "-12000000" } ], "allocated_micros": "-12000000" } ], "entries": [ { "postings": [ { "amount_micros": "-12000000" } ] } ] } ]}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": {} }}