Return a [paginated](http://developer.apiture.com/docs/concepts/pagination) [sortable](http://developer.apiture.com/docs/concepts/sorting) [filterable](http://developer.apiture.com/docs/concepts/filtering) [searchable](http://developer.apiture.com/docs/concepts/searching) collection of statements. The [links](http://developer.apiture.com/docs/concepts/links) in the response include pagination links. Statements may be filtered in several ways:
1. Pass the `endDate` and a `period` which represents how far in the past to include. The `endDate` is the current date if omitted. For example, to fetch statements for the last six months, request `?period=P6M` query parameters. Each `prev` link will return the previous six months of statements. The default period if ommitted is `P6M`. Thus, the default request if none of `startDate`, `endDate` and `period` are passed is the last 6 months of statements. This implies a result sorted in _descending_ order by time.
1. Pass the `startDate` and/and `endDate`, to find any statements which overlap that date range. This implies a result sorted in ascending order by time.
1. Pass the `startDate` and a `period` which represents how far after the start date to include. For example, to fetch statements for the first six months of 2018, request `?startDate=2018-01-01&period=P6M` query parameters. Each `next` link in the response collection will return the next six months of statements, if available. This implies a result sorted in ascending order by time.
1. If accounts are included in the the optional `accounts` query parameter, only statements corresponding to those accounts to which the user is entitled will be returned. An empty list of `_embedded.items` will be returned if the user is not entitled to any of the requested accounts.
**Warning**: The getStatements `operation` is **deprecated**.
The getStatements `operation` was deprecated on version `v0.7.0` of the API.
`operation` will be removed on version `v1.0.0` of the API.
curl -X GET -H "API-Key: [[apiKey]]" "http:///statements/statements?start=&limit=&sortBy=&accounts=&startDate=&endDate=&period=&filter=&q="
import { StatementApi } from "@apiture/statements-client-sdk";
const statementApi = new StatementApi(configuration);
// Configure OAuth2 access token for authorization: accessToken
var accessToken = "YOUR ACCESS TOKEN";
statementApi.setAccessToken(accessToken)
// Configure API key authorization: apiKey
var apiKey = "YOUR API KEY";
statementApi.setApiKey(apiKey);
var api = new Statements.StatementApi.getStatements()
var opts = {
'start': 789, // {Long} The zero-based index of the first statement item to include in this page. The default 0 denotes the beginning of the collection.
'limit': 56, // {Integer} The maximum number of statement representations to return in this page.
'sortBy': sortBy_example, // {String} Optional sort criteria. See [sort criteria format](http://developer.apiture.com/docs/concepts/sorting), such as `?sortBy=field1,-field2`.
'accounts': accounts_example, // {String} An optional comma or pipe (`|`) separated list list of account IDs. Note: these are _not_ account numbers but are the unique resource `_id` of the corresponding financial institution accounts. The user must have access to the corresponding accounts in order to view statements.
'startDate': 2013-10-20, // {date} The start date of the query range. May be combined with `endDate` _or_ `period` but not both.
'endDate': 2013-10-20, // {date} The end date of the query range. May be combined with `endDate` _or_ `period` but not both.
'period': period_example, // {String} The time period for the date range, looking backwards from `endDate` (or today, if `endDate` is omitted), or forward from `startDate`. For example, to list the statements for the last 6 months, use `?period=P6m`.
'filter': filter_example, // {String} Optional filter criteria. See [filtering](http://developer.apiture.com/docs/concepts/filtering).
'q': q_example // {String} Optional search string. See [searching](http://developer.apiture.com/docs/concepts/searching).
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
statementApi.getStatements(opts, callback);
Name |
Description |
start |
Long
(int64)
The zero-based index of the first statement item to include in this page. The default 0 denotes the beginning of the collection.
|
limit |
Integer
(int32)
The maximum number of statement representations to return in this page.
|
sortBy |
String
Optional sort criteria. See [sort criteria format](http://developer.apiture.com/docs/concepts/sorting), such as `?sortBy=field1,-field2`.
|
accounts |
String
An optional comma or pipe (`|`) separated list list of account IDs. Note: these are _not_ account numbers but are the unique resource `_id` of the corresponding financial institution accounts. The user must have access to the corresponding accounts in order to view statements.
|
startDate |
date
(date)
The start date of the query range. May be combined with `endDate` _or_ `period` but not both.
|
endDate |
date
(date)
The end date of the query range. May be combined with `endDate` _or_ `period` but not both.
|
period |
String
(period)
The time period for the date range, looking backwards from `endDate` (or today, if `endDate` is omitted), or forward from `startDate`. For example, to list the statements for the last 6 months, use `?period=P6m`.
|
filter |
String
Optional filter criteria. See [filtering](http://developer.apiture.com/docs/concepts/filtering).
|
q |
String
Optional search string. See [searching](http://developer.apiture.com/docs/concepts/searching).
|