> For the complete documentation index, see [llms.txt](https://ledgera.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ledgera.gitbook.io/api/register/accounts/account-query/account-statements-query.md).

# Account Statements Query

The account statement can be queried using the GET /account/{id}/journal method. The user will provide the desired period, currency, and pagination for the statement.

The statement will only include entries that affected the *available* balance type of the specified currency.

The default fields returned in the balance statement are:

| Field                     | Descri                                                            |
| ------------------------- | ----------------------------------------------------------------- |
| *id*                      | The unique identifier of a journal entry record                   |
| *type*                    | The type of record indicating whether it is a *debit* or *credit* |
| *transaction\_id*         | Transaction identifier                                            |
| *transaction\_type*       | User transaction type                                             |
| *entry\_id*               | Entry identifier                                                  |
| *entry\_type*             | Entry name                                                        |
| *entry\_order*            | Entry creation order                                              |
| *amount*                  | Entry amount                                                      |
| *balance\_after*          | Balance amount after the record creation                          |
| *balance\_seq\_num*       | Sequential update number of the current balance                   |
| *created\_at*             | Transaction created datetime                                      |
| *settled\_at*             | Transaction reference date (or accounting date)                   |
| *parent\_transaction\_id* | Parent Transaction Identifier                                     |
| *external\_id*            | The user-assigned identifier at the time of transaction creation  |

Statement query example:

```json
GET /account/19720852-be40-489a-a3b3-985f51a0458c/journal

{
  "date_from": "",
  "date_to": "",
  "currency": "brl",
  "limit": 100,
  "cursor": 0
}
```

Response example:

```json
{
  "metadata": {
    "limit": 100,
    "count": 10,
    "current_cursor": 0,
    "next_cursor": 1
  },
  "data": [
    {
      "id": "912ec803-b2ce-49e4-a541-068d495ab570",
      "type": "credit",
      "transaction_id": "c18be87a-c2db-a527-a47f-63d6105e89e2",
      "transaction_type": "pixIn",
      "entry_id": "82ce4744-f647-f1a5-a320-619d9c85d719",
      "entry_type": "main_amount",
      "entry_order": 1
      "amount": 10000,
      "balance_after": 10000,
      "balance_seq_num": 1,
      "created_at": "2023-06-05T11:26:17.325Z",
      "settled_at": "2023-06-05",
      "parent_transaction_id": "ea355ff5-6a2e-a57e-708c-7ab94e79c7f6",
      "external_id": "teste 1",
      "metadata": {
        "key": "value"  
      }
    }
  ]
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://ledgera.gitbook.io/api/register/accounts/account-query/account-statements-query.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
