Generate account statement
Generate an account statement for a custom time period using the API or on your Dashboard.
API guide​
- Call the
generateAccountStatement
mutation. - Add the
accountId
. - Add the
openingDate
andclosingDate
with the following format:YYYY-MM-DDT00:00:00.000Z
(up to three months). - Set the
language
for your account statement, and choosePDF
orCSV
if you'd like. - Add all information you'd like to review about the statement (lines 11-21).
Mutation​
🔎 Open the mutation in API Explorer
mutation GenerateAccountStatement {
generateAccountStatement(
input: {
accountId: "$ACCOUNT_ID"
openingDate: "2024-04-12T00:00:00.000Z"
closingDate: "2024-06-12T00:00:00.000Z"
language: nl
statementType: PDF
}
) {
closingDate
createdAt
fees {
currency
value
}
id
openingDate
period
status
updatedAt
}
}
Payload​
The mutation returns all of the requested information.
Notice the period
= Custom
(line 12), indicating that you generated this account statement, not Swan.
{
"data": {
"generateAccountStatement": {
"closingDate": "2024-06-12T00:00:00.000Z",
"createdAt": "2024-06-20T15:56:50.096Z",
"fees": {
"currency": "EUR",
"value": "0"
},
"id": "$ACCOUNT_STATEMENT_ID",
"openingDate": "2024-04-12T00:00:00.000Z",
"period": "Custom",
"status": "Available",
"updatedAt": "2024-06-20T15:56:52.423Z"
}
}
}
Dashboard​
You can also generate statements from your Dashboard.
- Go to Dashboard > Data > Accounts.
- Open the account for which you want to generate a statement (not pictured).
- Go to the Account statements tab.
- Click + New
- Enter the start date and closing date. The time period can cover up to three months.
- Choose the format and language.
- Click Save.
Your new statement appears on your list of account statements with the status Pending
.
After the status changes to Available
, you can download your statement.