Statements

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 page
  • rel="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.

get/statements

Request

  • Base URL
    https://api.treasury.shinkansen.finance/v1
  • URL
    https://api.treasury.shinkansen.finance/v1/statements
  • Auth
    API key in header Shinkansen-Treasury-Api-Key

Response

List of statements

Example response

{
  "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"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.