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

# Statements Models

These models are used by the [create](#create-statement-for-an-account) and [get](#retrieve-a-statement-for-an-account) statements endpoints.

## StatementSupportedTypes

This is an enumeration of the supported formats for a statement

**Values**

| Value | Description |
| - | - |
| `pdf` | Generate a single statement in pdf format. |
| `csv` | Generate a single statement in csv format. |
| `mt940` | Generate multiple statements, one for each day in the period, in mt940 format. The result will be a zip file with all the mt940 statements. |

## StatementFileStatus

```json theme={null}
  {
    "status": "Pending"
  }
```

This model is a representation of the current status of statement.

**Fields**

<ResponseField name="status" type="string">
  The [`StatementStatus`](#statementstatus) for the statement.
</ResponseField>

## StatementStatus

This is an enumeration of possible status in which a statement can be.

**Values**

| Value | Description |
| - | - |
| `Pending` | The statement has not been processed yet. |
| `Failed` | The statement processing failed. |

## Email Accounts Statements

```http theme={null}
POST /statements/accounts HTTP/1.1
Authorization: string
Content-Type: application/json

{
    "client_id": "string",
    "date_from": "string",
    "date_to": "string",
    "format": "string",
    "currencies": "string"
}
```

Send accounts statements via email to a specified contact. The statement will include transactions for the specified period and currencies.

<Note>See [here](/api/authentication#authenticating-requests) for details of required headers.</Note>

## Request Body

**Query Parameters**

<ParamField query="client_id" type="string" required>
  The ID of the client.
</ParamField>

**Body**

<ParamField body="date_from" type="string" required>
  Start date for the statement period. YYYY-MM-DD format. The date range between `date_from` and `date_to` must not exceed 3 years.
</ParamField>

<ParamField body="date_to" type="string" required>
  End date for the statement period. YYYY-MM-DD format. The date range between `date_from` and `date_to` must not exceed 3 years.
</ParamField>

<ParamField body="format" type="string">
  The format of the statement. Valid values: `csv`, `pdf`, `xls`, `coda`. Default is `pdf`.
</ParamField>

<ParamField body="currencies" type="string">
  Comma-separated list of currency codes to include in the statement (e.g., "GBP" or "GBP,EUR,USD"). If omitted, all currencies will be included.
</ParamField>

<ParamField body="send_via" type="string">
  How the generated statement should be delivered. Valid values: `push`, `email`, `both`.
</ParamField>

## Response

```json Response theme={null}
HTTP/1.1 200 OK
Content-Type: application/json

{
  "message": "Request accepted, you will receive an email with the statement."
}
```

A successful request will send the statement to the specified contact's email address.

<Note>See [here](/api/getting-started#error-handling) for details of unsuccessful requests.</Note>

## Email Trade Statements

```http theme={null}
POST /statements/trades HTTP/1.1
Authorization: string
Content-Type: application/json

{
    "date": "string",
    "format": "string"
}
```

Send a trade statement via email to a specified client.

<Note>See [here](/api/authentication#authenticating-requests) for details of required headers.</Note>

## Request Body

**Query Parameters**

<ParamField query="client_id" type="string" required>
  The ID of the client
</ParamField>

**Body**

<ParamField body="date_from" type="string" required>
  The date or period for the trade statement. YYYY-MM-DD or YYYY-MM formats.
</ParamField>

<ParamField body="format" type="string">
  The format of the statement. Valid values: `pdf`, `xls`. Default is `pdf`.
</ParamField>

## Response

```json Response theme={null}
HTTP/1.1 200 OK
Content-Type: application/json

{
  "message": "Request accepted, you will receive an email with the statement."
}
```

A successful request will send the trade statement to the specified contact's email address.

<Note>See [here](/api/getting-started#error-handling) for details of unsuccessful requests.</Note>

## Email MT940 Statements

```http theme={null}
POST /statements/mt940 HTTP/1.1
Authorization: token <your_token>
Content-Type: application/json

{
    "date_from": "string",
    "date_to": "string",
    "account_ids": [2924, 2925],
    "subtags": false
}
```

Send MT940 format statements via email to a specified contact.

<Note>See [here](/api/authentication#authenticating-requests) for details of required headers.</Note>

## Request Body

**Query Parameters**

<ParamField query="client_id" type="string" required>
  The ID of the client
</ParamField>

**Body**

<ParamField body="date_from" type="string" required>
  Start date for the statement period. YYYY-MM-DD format. The date range between `date_from` and `date_to` must not exceed 3 years.
</ParamField>

<ParamField body="date_to" type="string">
  End date for the statement period. If not provided, defaults to the value of `date_from`. YYYY-MM-DD format. The date range between `date_from` and `date_to` must not exceed 3 years.
</ParamField>

<ParamField body="account_ids" type="array">
  Array of account IDs to include in the statement (e.g., \[2924, 2925]). If not provided, all accounts will be included.
</ParamField>

<ParamField body="subtags" type="boolean">
  Boolean flag to enable/disable subtags in the MT940 output. Default is `false`.
</ParamField>

## Response

```json Response theme={null}
HTTP/1.1 200 OK
Content-Type: application/json

{
  "message": "Request accepted, you will receive an email with the statement."
}
```

A successful request will send the MT940 statement to the specified contact's email address.

<Note>See [here](/api/getting-started#error-handling) for details of unsuccessful requests.</Note>

## Email Incoming Funds Statements

```http theme={null}
POST /statements/incoming-funds HTTP/1.1
Authorization: string
Content-Type: application/json

{
    "format": "string",
    "date_from": "string",
    "date_to": "string"
}
```

Send an incoming funds statement via email to a specified client.

<Note>See [here](/api/authentication#authenticating-requests) for details of required headers.</Note>

## Request Body

**Query Parameters**

<ParamField query="client_id" type="string" required>
  The ID of the client
</ParamField>

**Body**

<ParamField body="format" type="string">
  The format of the statement. Valid values: `csv`, `xls`, `pdf`. Default is `csv`.
</ParamField>

<ParamField body="date_from" type="string" required>
  Start date for the statement period. YYYY-MM-DD format. The date range between `date_from` and `date_to` must not exceed 3 years.
</ParamField>

<ParamField body="date_to" type="string" required>
  End date for the statement period. YYYY-MM-DD format. The date range between `date_from` and `date_to` must not exceed 3 years.
</ParamField>

## Response

```json Response theme={null}
HTTP/1.1 200 OK
Content-Type: application/json

{
  "message": "Request accepted, you will receive an email with the statement."
}
```

A successful request will send the incoming funds statement to the specified contact's email address.

<Note>See [here](/api/getting-started#error-handling) for details of unsuccessful requests.</Note>
