List of statements
Returns a paginated list of statements. Statements are a record of the balance and the amount of withdrawn and paid to the bank account. Commonly, this statement is sent by the bank to the account holder by a daily or monthly basis. This endpoint fetches all statements from all bank accounts enrolled in Shinkansen Treasury and can be identified by the account_number field. List can be filtered by date range and account number.
Pagination: Results are returned in pages of up to page_size statements (default 25, max 100), ordered by the start of the booking period descending. The response includes a Link HTTP header (RFC 5988) with navigation URLs:
rel="next"- URL for the next page (absent on the last page)rel="prev"- URL for the previous page (absent on the first page)rel="first"- URL for the first pagerel="last"- URL for the last page
Each link is an absolute URL built from the host this service is configured with, and carries the page of the target page plus the filters you sent, so following a link keeps the same filters.
The order is the start of the booking period descending, with no further tie-break, so statements that share that date have no defined order between one request and the next. Narrow the result set with account_number or a date range when you need to read all of it, rather than relying on a walk over the pages to return every statement exactly once.
Query Parameters
- Type: stringaccount
_number If present, filter by bank account number. It must be sent as a single value; a repeated or nested parameter is rejected with 422 rather than silently ignored.
- Type: stringFormat: datefrom
If present, filter by date range. Format: YYYY-MM-DD
- Type: stringFormat: dateto
If present, filter by date range. Format: YYYY-MM-DD
- Type: integerpage
_size min:1max:100Maximum number of statements to return per page (can't be greater than 100). Defaults to 25 if not specified.
- Type: integerpagemin:1max:1000000000
Page number for pagination. Each page returns up to
page_sizestatements, ordered by the start of the booking period descending. Use theLinkresponse header to navigate between pages. A value that is not a positive integer falls back to 1, and values above the maximum are clamped to it.
Responses
- application/json
- 403
Forbidden (e.g: wrong API Key)
- application/json
curl 'https://api.treasury.shinkansen.finance/v1/statements?page=1' \
--header 'Shinkansen-Treasury-Api-Key: YOUR_SECRET_TOKEN'
{
"statements": [
{
"statement_id": "170DEDB6-E320-4288-A2A9-6F79A5EFDEEB",
"currency": "CLP",
"opening_balance": {
"balance_type": "end_of_statement",
"book_balance": 123.5,
"timestamp": "2019-06-04T00:00:00.000Z",
"source": {
"source_type": "account_statement",
"source_id": "AB1DEF2G-7E98-4E13-8B03-0B3B2E6D5A3C"
}
},
"closing_balance": {
"balance_type": "end_of_statement",
"book_balance": 1234.5,
"timestamp": "2019-07-04T00:00:00.000Z",
"source": {
"source_type": "account_statement",
"source_id": "170DEDB6-E320-4288-A2A9-6F79A5EFDEEB"
}
},
"statement_number": "10714171",
"since_booking_date": "2023-05-05",
"until_booking_date": "2023-06-05",
"bank_account_id": "DE48781E-EC90-49B9-96CB-B42EED961996"
},
{
"statement_id": "DDA0AC69-123E-4215-A219-155D2AB1FBE6",
"currency": "CLP",
"opening_balance": {
"balance_type": "end_of_statement",
"book_balance": 123.5,
"timestamp": "2019-06-04T00:00:00.000Z",
"source": {
"source_type": "account_statement",
"source_id": "AB1DEF2G-7E98-4E13-8B03-0B3B2E6D5A3C"
}
},
"closing_balance": {
"balance_type": "end_of_statement",
"book_balance": 1234.5,
"timestamp": "2019-07-04T00:00:00.000Z",
"source": {
"source_type": "account_statement",
"source_id": "170DEDB6-E320-4288-A2A9-6F79A5EFDEEB"
}
},
"statement_number": "10714170",
"since_booking_date": "2023-05-04",
"until_booking_date": "2023-06-04",
"bank_account_id": "DE48781E-EC90-49B9-96CB-B42EED961996"
}
]
}