Skip to main content

Generate account statement

Generate an account statement for a custom time period using the API or on your Dashboard.

API guide​

  1. Call the generateAccountStatement mutation.
  2. Add the accountId.
  3. Add the openingDate and closingDate with the following format: YYYY-MM-DDT00:00:00.000Z (up to three months).
  4. Set the language for your account statement, and choose PDF or CSV if you'd like.
  5. 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.

  1. Go to Dashboard > Data > Accounts.
  2. Open the account for which you want to generate a statement (not pictured).
  3. Go to the Account statements tab.
  4. Click + New

Screenshot of the Dashboard Account statements tab

  1. Enter the start date and closing date. The time period can cover up to three months.
  2. Choose the format and language.
  3. Click Save.

Screenshot of Dashboard modal to generate an account statement

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.

Screenshot of new account statement line with pending status