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.

ParameterTypeDescription
year
required
stringYear for which to retrieve data, for example 2022.
month
required
stringMonth 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.

AttributeDescription
statement_idUUID of the statement.
account_idUUID that identifies the customer's Brand account. In this case, it is a deposit account ID.
statement_monthThe month of the statement, for example 09.
typeThe type of statement, either deposit or credit.
statement_start_dateThe beginning date for the statement period, for example 2022-01-21.
statement_end_dateThe end date for the statement period, for example 2022-01-21.
feesThe total amount of fees paid during the statement period.
transactions[].transaction_idUUID of the transaction, for example cea15fcb-48dd-4c3d-a0d5-564ea360c6c9.
transactions[].transaction_dateDate the transaction occurred, for example 2022-02-13.
transactions[].settled_dateDate the transaction settled. for example 2022-02-13.
transactions[].amountTransaction amount in cents, for example 6599.
transactions[].transaction_descriptionDescription for the transaction, for example atm fee.
transactions[].transaction_typeThe transaction type, for example Fee.

The attributes specific to a deposit account are described in the following table.

AttributeDescription
deposit.beginning_balanceThe balance at the beginning of the statement period.
deposit.withdrawalsAll withdrawals from this account during the payment period.
deposit.depositsAll deposits to this account during the payment period.
deposit.ending_balanceThe 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.

ParameterTypeDescription
starting_beforestringUUID of the first statement to start at, for example 1b8c7986-bd5a-4923-9d62-fe3a3671f891.
ending_beforestringUUID of the last statement to end at, for example c11fc6d8-9865-45b7-b3de-583257abe33e.
limitstringMaximum 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.