Statements
Allows retrieval of up to 2 years' of historical statements for your end-user's consented accounts
The Statements product allows retrieval of statements for your end-user's consented accounts. You may request a date range of up to two years of historical statements (maximum date ranges vary by provider).
Paginated Statement list results include an array of statement information with the end-user's account identifier and details such as statement id, date, description, and status. The results also include links to GET
the statement, most often returned in PDF format. Other supported file formats are GIF, JPG, TIFF, and PNG.
Endpoints:
/statements/{version}/{providerId}/{accountId}
/statements/{version}/{providerId}/{accountId}/{statementId}
API documentation:
https://docs.akoya.com/v2/reference/get-statement-list
https://docs.akoya.com/v2.0/reference/get-statements
Supported data elements
Name | Type | Description |
---|---|---|
accountId | string | Corresponds to accountId in Account entity |
statementId | string | Long-term persistent identity of the statement |
statementDate | dateTime | Date of the statement (ISO 8601 format) |
description | string | Description of statement |
status | string | Defines the status of a document |
link | hateoasLink object array | The statement download link hosted by Akoya |
How to use the Statements product
Note
If you’d like to test with the steps detailed below, sign in as the sandbox
mikomo_11
user and consent to share data with your sandbox app (for help authenticating & authorizing in sandbox, see: Get authorization code). Use the resultingid_token
as the bearer token in the cURL commands.
GET Statement List
To get statements for your end-user, first retrieve a list of available statements for the consented account. Your request may include a date range of up to two years of historical statements (maximum date ranges vary by provider).
Endpoint: /statements/{version}/{providerId}/{accountId}
API documentation: https://docs.akoya.com/v2/reference/get-statement-list
curl --location "https://sandbox-products.ddp.akoya.com/statements/v2/mikomo/513815781465?startTime=2022-02-26T00%3A00%3A00Z&endTime=2023-02-26T00%3A00%3A00Z&offset=0&limit=5" --header "Authorization: Bearer {token}"
Example response
{
"links": {
"prev": {
"href": "/statements/v2/mikomo/513815781465?endTime=2023-02-26T00%3A00%3A00Z&limit=5&offset=0&startTime=2022-02-26T00%3A00%3A00Z"
}
},
"statements": [
{
"accountId": "513815781465",
"statementId": "P9CvLPKDaFRMbNDkhu1",
"statementDate": "2022-05-26",
"description": "FFOS Monthly/Quarterly Statement",
"status": "AVAILABLE",
"links": [
{
"href": "https://sandbox-products.ddp.akoya.com/statements/v2/mikomo/513815781465/P9CvLPKDaFRMbNDkhu1",
"action": "GET",
"types": [
"application/pdf",
"image/jpeg",
"image/png"
]
}
]
},
{
"accountId": "513815781465",
"statementId": "P9CvLPKDaFRMbNDkhu2",
"statementDate": "2023-01-02",
"description": "FFOS Year End Investment Report",
"status": "FAILED",
"links": [
{
"href": "https://sandbox-products.ddp.akoya.com/statements/v2/mikomo/513815781465/P9CvLPKDaFRMbNDkhu2",
"action": "GET",
"types": [
"application/pdf",
"image/jpeg",
"image/png"
]
}
]
},
{
"accountId": "513815781465",
"statementId": "P9CvLPKDaFRMbNDkhu3",
"statementDate": "2023-01-05",
"description": "FFOS Monthly/Quarterly Statement",
"status": "PROCESSING",
"links": [
{
"href": "https://sandbox-products.ddp.akoya.com/statements/v2/mikomo/513815781465/P9CvLPKDaFRMbNDkhu3",
"action": "GET",
"types": [
"application/pdf",
"image/jpeg",
"image/png"
]
}
]
},
{
"accountId": "513815781465",
"statementId": "P9CvLPKDaFRMbNDkhu4",
"statementDate": "2023-02-24",
"description": "FFOS Yearly Statement",
"status": "AVAILABLE",
"links": [
{
"href": "https://sandbox-products.ddp.akoya.com/statements/v2/mikomo/513815781465/P9CvLPKDaFRMbNDkhu4",
"action": "GET",
"types": [
"application/pdf",
"image/jpeg",
"image/png"
]
}
]
}
]
}
How to read the statement list response
To provide a consistent way to link each statement provided in the list, Akoya includes the exact API call for retrieving each statement. By providing these calls, Akoya allows a passthrough of the statement since direct connections to providers cannot be made. Akoya also interprets any special characters in statement metadata and tokenizes the statementId
.
Please use the href
link created in the response.
Note: If you’re testing using Postman, you may use the tokenized statementId
value included in statements.links.href
.
GET Statement
Endpoint: /statements/{version}/{providerId}/{accountId}/{statementId}
API documentation: https://docs.akoya.com/reference/get-statements
From the statement list response, use statements.links.href
as the location
in the cURL command. To save the response to pdf, include the output
command with a file name.
curl --location "<https://sandbox-products.ddp.akoya.com/statements/v2/mikomo/513815781465/P9CvLPKDaFRMbNDkhu1"> --header "Accept: application/pdf" --header "Authorization: Bearer {token}" --output example.pdf
Updated over 1 year ago