Retrieving deposit account statement data
How to build a deposit account statement.
Retrieve data for a statement for a single month
To retrieve a statement for a single account, use the GET /accounts/{account_id}/statements/{yyyy}/{mm} operation and provide the parameters as shown in the table below.
| Parameter | Type | Description | 
|---|---|---|
| yearrequired | string | Year for which to retrieve data, for example 2022. | 
| monthrequired | string | Month for which to retrieve data, for example 09. | 
An example of a request to retrieve data for a single months is shown below.
curl --request GET \
     --url https://sandbox.bond.tech/api/v0.1/accounts/c11fc6d8-9865-45b7-b3de-583257abe33e/statements/2022/09 \
     --header 'Accept: application/json' \
     --header 'Authorization: YOUR-AUTHENTICATION' \
     --header 'Identity: <YOUR_IDENTITY>'
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://sandbox.bond.tech/api/v0.1/accounts/c11fc6d8-9865-45b7-b3de-583257abe33e/statements/2022/09")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Identity"] = '<YOUR_IDENTITY>'
request["Authorization"] = 'YOUR-AUTHENTICATION'
response = http.request(request)
puts response.read_body
import requests
url = "https://sandbox.bond.tech/api/v0.1/accounts/c11fc6d8-9865-45b7-b3de-583257abe33e/statements/2022/09"
headers = {
    "Accept": "application/json",
    "Identity": "<YOUR_IDENTITY>",
    "Authorization": "YOUR-AUTHENTICATION"
}
response = requests.get(url, headers=headers)
print(response.text)
const options = {
  method: 'GET',
  headers: {
    Accept: 'application/json',
    Identity: '<YOUR_IDENTITY>',
    Authorization: 'YOUR-AUTHENTICATION'
  }
};
fetch('https://sandbox.bond.tech/api/v0.1/accounts/c11fc6d8-9865-45b7-b3de-583257abe33e/statements/2022/09', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
var client = new RestClient("https://sandbox.bond.tech/api/v0.1/accounts/c11fc6d8-9865-45b7-b3de-583257abe33e/statements/2022/09");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("Identity", "<YOUR_IDENTITY>");
request.AddHeader("Authorization", "YOUR-AUTHENTICATION");
IRestResponse response = client.Execute(request);
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
  .url("https://sandbox.bond.tech/api/v0.1/accounts/c11fc6d8-9865-45b7-b3de-583257abe33e/statements/2022/09")
  .get()
  .addHeader("Accept", "application/json")
  .addHeader("Identity", "<YOUR_IDENTITY>")
  .addHeader("Authorization", "YOUR-AUTHENTICATION")
  .build();
Response response = client.newCall(request).execute();
An example of a responses to a successful data retrieval request is shown below.
{
  "statement_id": "c11fc6d8-9865-45b7-b3de-583257abe33e",
  "account_id": "654dc482-96f9-4012-b2e3-fb73a5a17c97",
  "statement_month": "2022-02",
  "type": "deposit",
  "statement_start_date": "2022-01-21",
  "statement_end_date": "2022-02-20",
  "fees": 0,
  "transactions": [
    {
      "transaction_id": "cea15fcb-48dd-4c3d-a0d5-564ea360c6c9",
      "transaction_date": "2022-02-13",
      "settled_date": "2022-02-13",
      "amount": 1458,
      "transaction_description": "atm fee",
      "transaction_type": "Fee"
    }
  ],
  "deposit": {
    "beginning_balance": 1000057,
    "withdrawals": 20057,
    "deposits": 325000,
    "ending_balance": 1305000
  }
}
The response is broken up into two parts; general statement attributes and statement-type-specific data. The general attribute descriptions are shown in the following table.
| Attribute | Description | 
|---|---|
| statement_id | UUID of the statement. | 
| account_id | UUID that identifies the customer's Brand account. In this case, it is a deposit account ID. | 
| statement_month | The month of the statement, for example 09. | 
| type | The type of statement, either depositorcredit. | 
| statement_start_date | The beginning date for the statement period, for example 2022-01-21. | 
| statement_end_date | The end date for the statement period, for example 2022-01-21. | 
| fees | The total amount of fees paid during the statement period. | 
| transactions[].transaction_id | UUID of the transaction, for example cea15fcb-48dd-4c3d-a0d5-564ea360c6c9. | 
| transactions[].transaction_date | Date the transaction occurred, for example 2022-02-13. | 
| transactions[].settled_date | Date the transaction settled. for example 2022-02-13. | 
| transactions[].amount | Transaction amount in cents, for example 6599. | 
| transactions[].transaction_description | Description for the transaction, for example atm fee. | 
| transactions[].transaction_type | The transaction type, for example Fee. | 
The attributes specific to a deposit account are described in the following table.
| Attribute | Description | 
|---|---|
| deposit.beginning_balance | The balance at the beginning of the statement period. | 
| deposit.withdrawals | All withdrawals from this account during the payment period. | 
| deposit.deposits | All deposits to this account during the payment period. | 
| deposit.ending_balance | The account balance at the end of the statement period. | 
For a complete specification and interactive examples, see Get a statement for an account in the Bond API Reference.
Retrieve all statements for an account
To retrieve all statements for a single account, use the GET /accounts/{account_id}/statements operation and provide the parameters as shown in the table below.
| Parameter | Type | Description | 
|---|---|---|
| starting_before | string | UUID of the first statement to start at, for example 1b8c7986-bd5a-4923-9d62-fe3a3671f891. | 
| ending_before | string | UUID of the last statement to end at, for example c11fc6d8-9865-45b7-b3de-583257abe33e. | 
| limit | string | Maximum number of statements to retrieve. | 
An example of a successful request for multiple statements for an account is shown below.
curl --request GET \
     --url 'https://sandbox.bond.tech/api/v0.1/accounts/c11fc6d8-9865-45b7-b3de-583257abe33e/statements?starting_after=1b8c7986-bd5a-4923-9d62-fe3a3671f891&ending_before=e3cbfb61-61f3-4ec7-a82d-622c45c641a3&limit=10' \
     --header 'Accept: application/json' \
     --header 'Authorization: YOUR-AUTHENTICATION' \
     --header 'Identity: <YOUR_IDENTITY>'
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://sandbox.bond.tech/api/v0.1/accounts/c11fc6d8-9865-45b7-b3de-583257abe33e/statements?starting_after=1b8c7986-bd5a-4923-9d62-fe3a3671f891&ending_before=e3cbfb61-61f3-4ec7-a82d-622c45c641a3&limit=10")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Identity"] = '<YOUR_IDENTITY>'
request["Authorization"] = 'YOUR-AUTHENTICATION'
response = http.request(request)
puts response.read_body
import requests
url = "https://sandbox.bond.tech/api/v0.1/accounts/c11fc6d8-9865-45b7-b3de-583257abe33e/statements?starting_after=1b8c7986-bd5a-4923-9d62-fe3a3671f891&ending_before=e3cbfb61-61f3-4ec7-a82d-622c45c641a3&limit=10"
headers = {
    "Accept": "application/json",
    "Identity": "<YOUR_IDENTITY>",
    "Authorization": "YOUR-AUTHENTICATION"
}
response = requests.get(url, headers=headers)
print(response.text)
const options = {
  method: 'GET',
  headers: {
    Accept: 'application/json',
    Identity: '<YOUR_IDENTITY>',
    Authorization: 'YOUR-AUTHENTICATION'
  }
};
fetch('https://sandbox.bond.tech/api/v0.1/accounts/c11fc6d8-9865-45b7-b3de-583257abe33e/statements?starting_after=1b8c7986-bd5a-4923-9d62-fe3a3671f891&ending_before=e3cbfb61-61f3-4ec7-a82d-622c45c641a3&limit=10', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
var client = new RestClient("https://sandbox.bond.tech/api/v0.1/accounts/c11fc6d8-9865-45b7-b3de-583257abe33e/statements?starting_after=1b8c7986-bd5a-4923-9d62-fe3a3671f891&ending_before=e3cbfb61-61f3-4ec7-a82d-622c45c641a3&limit=10");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("Identity", "<YOUR_IDENTITY>");
request.AddHeader("Authorization", "YOUR-AUTHENTICATION");
IRestResponse response = client.Execute(request);
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
  .url("https://sandbox.bond.tech/api/v0.1/accounts/c11fc6d8-9865-45b7-b3de-583257abe33e/statements?starting_after=1b8c7986-bd5a-4923-9d62-fe3a3671f891&ending_before=e3cbfb61-61f3-4ec7-a82d-622c45c641a3&limit=10")
  .get()
  .addHeader("Accept", "application/json")
  .addHeader("Identity", "<YOUR_IDENTITY>")
  .addHeader("Authorization", "YOUR-AUTHENTICATION")
  .build();
Response response = client.newCall(request).execute();
An example of a response to a successful data retrieval request is shown below.
{
  "page": 1,
  "pages": 1,
  "count": 1,
  "next_page": 0,
  "data": [
    {
      "statement_id": "c11fc6d8-9865-45b7-b3de-583257abe33e",
      "statement_month": "2022-02",
      "type": "deposit",
      "statement_start_date": "2022-01-21",
      "statement_end_date": "2022-02-20",
      "fees": 0,
      "transactions": [
        {
          "transaction_id": "e3cbfb61-61f3-4ec7-a82d-622c45c641a3",
          "transaction_date": "2022-02-13",
          "settled_date": "2022-02-13",
          "amount": 1458,
          "transaction_description": "atm fee",
          "transaction_type": "Fee"
        }
      ],
      "deposit": {
        "beginning_balance": 1000057,
        "withdrawals": 20057,
        "deposits": 325000,
        "ending_balance": 1305000
      }
    }
  ]
}
For a complete specification and interactive examples, see Get all statements for an account in the Bond API Reference.
Updated 6 months ago
