curl --request POST \
--url https://api.treasuryprime.com/account/{account_id}/statement \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"apy": "3.50",
"date": "2024-03",
"email_address": "support@example.com",
"footnote": "In case of errors or questions about your electronic transfers, call +1 555-123-4567 or write to support@example.com within 60 days of the statement date.",
"org_legal_name": "Example Financial Inc",
"phone_number": "+1 555-123-4567",
"support_url": "https://support.example.com",
"type": "monthly"
}
'import requests
url = "https://api.treasuryprime.com/account/{account_id}/statement"
payload = {
"apy": "3.50",
"date": "2024-03",
"email_address": "support@example.com",
"footnote": "In case of errors or questions about your electronic transfers, call +1 555-123-4567 or write to support@example.com within 60 days of the statement date.",
"org_legal_name": "Example Financial Inc",
"phone_number": "+1 555-123-4567",
"support_url": "https://support.example.com",
"type": "monthly"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
apy: '3.50',
date: '2024-03',
email_address: 'support@example.com',
footnote: 'In case of errors or questions about your electronic transfers, call +1 555-123-4567 or write to support@example.com within 60 days of the statement date.',
org_legal_name: 'Example Financial Inc',
phone_number: '+1 555-123-4567',
support_url: 'https://support.example.com',
type: 'monthly'
})
};
fetch('https://api.treasuryprime.com/account/{account_id}/statement', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.treasuryprime.com/account/{account_id}/statement",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'apy' => '3.50',
'date' => '2024-03',
'email_address' => 'support@example.com',
'footnote' => 'In case of errors or questions about your electronic transfers, call +1 555-123-4567 or write to support@example.com within 60 days of the statement date.',
'org_legal_name' => 'Example Financial Inc',
'phone_number' => '+1 555-123-4567',
'support_url' => 'https://support.example.com',
'type' => 'monthly'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.treasuryprime.com/account/{account_id}/statement"
payload := strings.NewReader("{\n \"apy\": \"3.50\",\n \"date\": \"2024-03\",\n \"email_address\": \"support@example.com\",\n \"footnote\": \"In case of errors or questions about your electronic transfers, call +1 555-123-4567 or write to support@example.com within 60 days of the statement date.\",\n \"org_legal_name\": \"Example Financial Inc\",\n \"phone_number\": \"+1 555-123-4567\",\n \"support_url\": \"https://support.example.com\",\n \"type\": \"monthly\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.treasuryprime.com/account/{account_id}/statement")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"apy\": \"3.50\",\n \"date\": \"2024-03\",\n \"email_address\": \"support@example.com\",\n \"footnote\": \"In case of errors or questions about your electronic transfers, call +1 555-123-4567 or write to support@example.com within 60 days of the statement date.\",\n \"org_legal_name\": \"Example Financial Inc\",\n \"phone_number\": \"+1 555-123-4567\",\n \"support_url\": \"https://support.example.com\",\n \"type\": \"monthly\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.treasuryprime.com/account/{account_id}/statement")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"apy\": \"3.50\",\n \"date\": \"2024-03\",\n \"email_address\": \"support@example.com\",\n \"footnote\": \"In case of errors or questions about your electronic transfers, call +1 555-123-4567 or write to support@example.com within 60 days of the statement date.\",\n \"org_legal_name\": \"Example Financial Inc\",\n \"phone_number\": \"+1 555-123-4567\",\n \"support_url\": \"https://support.example.com\",\n \"type\": \"monthly\"\n}"
response = http.request(request)
puts response.read_body{
"account_id": "acct_2074732992",
"apy": "3.50",
"date": "2024-03",
"email_address": "support@example.com",
"footnote": "In case of errors or questions about your electronic transfers, call +1 555-123-4567 or write to support@example.com within 60 days of the statement date.",
"org_legal_name": "Example Financial Inc",
"phone_number": "+1 555-123-4567",
"support_url": "https://support.example.com",
"type": "monthly",
"url": "https://api.treasuryprime.com/account/acct_2074732992/statement/file_11jq1f6w3h6jr"
}Generate a Statement
curl --request POST \
--url https://api.treasuryprime.com/account/{account_id}/statement \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"apy": "3.50",
"date": "2024-03",
"email_address": "support@example.com",
"footnote": "In case of errors or questions about your electronic transfers, call +1 555-123-4567 or write to support@example.com within 60 days of the statement date.",
"org_legal_name": "Example Financial Inc",
"phone_number": "+1 555-123-4567",
"support_url": "https://support.example.com",
"type": "monthly"
}
'import requests
url = "https://api.treasuryprime.com/account/{account_id}/statement"
payload = {
"apy": "3.50",
"date": "2024-03",
"email_address": "support@example.com",
"footnote": "In case of errors or questions about your electronic transfers, call +1 555-123-4567 or write to support@example.com within 60 days of the statement date.",
"org_legal_name": "Example Financial Inc",
"phone_number": "+1 555-123-4567",
"support_url": "https://support.example.com",
"type": "monthly"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
apy: '3.50',
date: '2024-03',
email_address: 'support@example.com',
footnote: 'In case of errors or questions about your electronic transfers, call +1 555-123-4567 or write to support@example.com within 60 days of the statement date.',
org_legal_name: 'Example Financial Inc',
phone_number: '+1 555-123-4567',
support_url: 'https://support.example.com',
type: 'monthly'
})
};
fetch('https://api.treasuryprime.com/account/{account_id}/statement', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.treasuryprime.com/account/{account_id}/statement",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'apy' => '3.50',
'date' => '2024-03',
'email_address' => 'support@example.com',
'footnote' => 'In case of errors or questions about your electronic transfers, call +1 555-123-4567 or write to support@example.com within 60 days of the statement date.',
'org_legal_name' => 'Example Financial Inc',
'phone_number' => '+1 555-123-4567',
'support_url' => 'https://support.example.com',
'type' => 'monthly'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.treasuryprime.com/account/{account_id}/statement"
payload := strings.NewReader("{\n \"apy\": \"3.50\",\n \"date\": \"2024-03\",\n \"email_address\": \"support@example.com\",\n \"footnote\": \"In case of errors or questions about your electronic transfers, call +1 555-123-4567 or write to support@example.com within 60 days of the statement date.\",\n \"org_legal_name\": \"Example Financial Inc\",\n \"phone_number\": \"+1 555-123-4567\",\n \"support_url\": \"https://support.example.com\",\n \"type\": \"monthly\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.treasuryprime.com/account/{account_id}/statement")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"apy\": \"3.50\",\n \"date\": \"2024-03\",\n \"email_address\": \"support@example.com\",\n \"footnote\": \"In case of errors or questions about your electronic transfers, call +1 555-123-4567 or write to support@example.com within 60 days of the statement date.\",\n \"org_legal_name\": \"Example Financial Inc\",\n \"phone_number\": \"+1 555-123-4567\",\n \"support_url\": \"https://support.example.com\",\n \"type\": \"monthly\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.treasuryprime.com/account/{account_id}/statement")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"apy\": \"3.50\",\n \"date\": \"2024-03\",\n \"email_address\": \"support@example.com\",\n \"footnote\": \"In case of errors or questions about your electronic transfers, call +1 555-123-4567 or write to support@example.com within 60 days of the statement date.\",\n \"org_legal_name\": \"Example Financial Inc\",\n \"phone_number\": \"+1 555-123-4567\",\n \"support_url\": \"https://support.example.com\",\n \"type\": \"monthly\"\n}"
response = http.request(request)
puts response.read_body{
"account_id": "acct_2074732992",
"apy": "3.50",
"date": "2024-03",
"email_address": "support@example.com",
"footnote": "In case of errors or questions about your electronic transfers, call +1 555-123-4567 or write to support@example.com within 60 days of the statement date.",
"org_legal_name": "Example Financial Inc",
"phone_number": "+1 555-123-4567",
"support_url": "https://support.example.com",
"type": "monthly",
"url": "https://api.treasuryprime.com/account/acct_2074732992/statement/file_11jq1f6w3h6jr"
}Authorizations
Body
The account.statement.create to create
Annual Percentage Yield to be displayed on statements generated with this configuration. Must be non-negative. APY will be displayed with two-decimal precision and must be provided with two-decimal precision. The provided apy is taken as a percentage, e.g. 3.50 would indicate an APY of 3.50%. Either apy or apy_custom must be populated.
^[0-9][.][0-9][0-9]$Custom text to include on statements to describe the Annual Percentage Yield. The text provided will be displayed as right-aligned plain text above the summary on the statement. This field is intended to allow displaying tiered or other APY formats when APY is not a simple rate. When apy_custom is provided it will be used instead of an Annual Percentage Yield field in the summary. Either apy or apy_custom must be populated.
Response
The account.statement.create created
Annual Percentage Yield to be displayed on statements generated with this configuration. Must be non-negative. APY will be displayed with two-decimal precision and must be provided with two-decimal precision. The provided apy is taken as a percentage, e.g. 3.50 would indicate an APY of 3.50%. Either apy or apy_custom must be populated.
^[0-9][.][0-9][0-9]$Custom text to include on statements to describe the Annual Percentage Yield. The text provided will be displayed as right-aligned plain text above the summary on the statement. This field is intended to allow displaying tiered or other APY formats when APY is not a simple rate. When apy_custom is provided it will be used instead of an Annual Percentage Yield field in the summary. Either apy or apy_custom must be populated.
Was this page helpful?