> ## Documentation Index
> Fetch the complete documentation index at: https://docs.treasuryprime.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

The [`/statement`](/reference/post_account_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](/reference/get_statement_config).

<Warning>
  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.
</Warning>

## Retrieve a Test Statement URL

To simulate retrieving a monthly account [Statement](/reference/get_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

<CodeGroup>
  ```bash bash theme={null}
  curl -X GET -u $API_KEY_ID:$API_SECRET_KEY 'https://api.sandbox.treasuryprime.com/account/acct_1029384755/statement?date=2022-07'
  ```
</CodeGroup>

##### Example response containing statement URL

<CodeGroup>
  ```bash bash theme={null}
  {
    "id": "acct_1029384755",
    "type": "monthly",
    "date": "2022-07",
    "url": "https://api.sandbox.treasuryprime.com/account/acct_1029384755/statement/file_abc1234567890"
  }
  ```
</CodeGroup>

## 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

<CodeGroup>
  ```bash bash theme={null}
  curl -X GET -u $API_KEY_ID:$API_SECRET_KEY 'https://api.sandbox.treasuryprime.com/account/acct_1029384755/statement?date=2322-01'
  ```
</CodeGroup>

##### Example error response

<CodeGroup>
  ```bash bash theme={null}
  {
    "error":"Statement with date 2322-01 not found."
  }
  ```
</CodeGroup>
