The /statement
endpoint can be used to generate test statements. Before any statements can be generated, you'll need to configure one or more Statement Configs.
When testing in the Sandbox environment, the transactions in the test statements will be examples only, and not correspond to sandbox activity for that account.
Retrieve a Test Statement URL
To simulate retrieving a monthly account Statement URL, pass a valid account_id
along with any current or past date as the date
value. The response will contain a URL to a test statement PDF.
Example request to retrieve statement URL
curl -u $API_KEY_ID:$API_SECRET_KEY https://api.sandbox.treasuryprime.com/account/acct_1029384755/statement?date=2022-07
Example response containing statement URL
{
"id": "acct_1029384755",
"type": "monthly",
"date": "2022-07",
"url": "https://api.sandbox.treasuryprime.com/account/acct_1029384755/statement/file_abc1234567890"
}
Simulate an Account Statement Error
To trigger an "error" status, pass an invalid account_id
or a date
in the future.
Example request returning error status
curl -u $API_KEY_ID:$API_SECRET_KEY https://api.sandbox.treasuryprime.com/account/acct_1029384755/statement?date=2322-01
Example error response
{
"error":"Statement with date 2322-01 not found."
}