Fetch the transaction history for a bank account. ( STABLE )
curl --request GET \
--url https://api.grailpay.com/3p/api/v2/bank-accounts/{aggregator_type}/{account_uuid}/history \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.grailpay.com/3p/api/v2/bank-accounts/{aggregator_type}/{account_uuid}/history"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.grailpay.com/3p/api/v2/bank-accounts/{aggregator_type}/{account_uuid}/history', 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.grailpay.com/3p/api/v2/bank-accounts/{aggregator_type}/{account_uuid}/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.grailpay.com/3p/api/v2/bank-accounts/{aggregator_type}/{account_uuid}/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.grailpay.com/3p/api/v2/bank-accounts/{aggregator_type}/{account_uuid}/history")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.grailpay.com/3p/api/v2/bank-accounts/{aggregator_type}/{account_uuid}/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": true,
"message": null,
"data": {
"transactions": [
{
"transaction_id": "c7318ff7-257c-490e-8242-03a815b223b7",
"account_id": "acc_6Tef269B6ZArSVpYrxtjBV",
"amount": 384.05,
"type": "debit",
"currency": "USD",
"date": "2023-02-16T00:00:00",
"datetime": "2023-02-16T09:14:11",
"description": "Regina's Mulberry",
"raw_description": "Regina's Mulberry #1402 T48999-84",
"pending": true,
"enrichment": {
"category": {
"value": "food_and_drink",
"confidence": 99
},
"subcategory": {
"value": "coffee",
"confidence": 99
},
"merchant": {
"id": "a0822a4f-a59b-4fc9-a768-d880da5bd090",
"name": "Starbucks",
"logo": "https://example.com/starbucks.png",
"confidence": 99
},
"processor": {
"id": "a0822a4f-a59b-4fc9-a768-d880da5bd090",
"name": "Square",
"logo": "https://example.com/square.png",
"confidence": 99
},
"recurrence": {
"frequency": "monthly",
"next_predicted_date": "2024-08-03"
}
},
"original_id": ""
}
],
"pagination": {
"current_page": 1,
"total_pages": 5,
"total_items": 50,
"per_page": 10
}
},
"errors": [
"<string>"
]
}{
"status": false,
"message": "Invalid Token",
"data": null,
"errors": null,
"error_code": null
}{
"status": false,
"message": "We are unable to retrieve the transaction history for this bank account.",
"data": null,
"errors": null,
"error_code": null
}{
"status": false,
"message": "The bank account was not found.",
"data": null,
"errors": null,
"error_code": null
}Bank Accounts
Fetch the transaction history for a bank account. ( STABLE )
Fetch a list of transactions for a bank account. This currently only works with accounts linked through the Bank Link SDK.
GET
/
3p
/
api
/
v2
/
bank-accounts
/
{aggregator_type}
/
{account_uuid}
/
history
Fetch the transaction history for a bank account. ( STABLE )
curl --request GET \
--url https://api.grailpay.com/3p/api/v2/bank-accounts/{aggregator_type}/{account_uuid}/history \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.grailpay.com/3p/api/v2/bank-accounts/{aggregator_type}/{account_uuid}/history"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.grailpay.com/3p/api/v2/bank-accounts/{aggregator_type}/{account_uuid}/history', 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.grailpay.com/3p/api/v2/bank-accounts/{aggregator_type}/{account_uuid}/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.grailpay.com/3p/api/v2/bank-accounts/{aggregator_type}/{account_uuid}/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.grailpay.com/3p/api/v2/bank-accounts/{aggregator_type}/{account_uuid}/history")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.grailpay.com/3p/api/v2/bank-accounts/{aggregator_type}/{account_uuid}/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": true,
"message": null,
"data": {
"transactions": [
{
"transaction_id": "c7318ff7-257c-490e-8242-03a815b223b7",
"account_id": "acc_6Tef269B6ZArSVpYrxtjBV",
"amount": 384.05,
"type": "debit",
"currency": "USD",
"date": "2023-02-16T00:00:00",
"datetime": "2023-02-16T09:14:11",
"description": "Regina's Mulberry",
"raw_description": "Regina's Mulberry #1402 T48999-84",
"pending": true,
"enrichment": {
"category": {
"value": "food_and_drink",
"confidence": 99
},
"subcategory": {
"value": "coffee",
"confidence": 99
},
"merchant": {
"id": "a0822a4f-a59b-4fc9-a768-d880da5bd090",
"name": "Starbucks",
"logo": "https://example.com/starbucks.png",
"confidence": 99
},
"processor": {
"id": "a0822a4f-a59b-4fc9-a768-d880da5bd090",
"name": "Square",
"logo": "https://example.com/square.png",
"confidence": 99
},
"recurrence": {
"frequency": "monthly",
"next_predicted_date": "2024-08-03"
}
},
"original_id": ""
}
],
"pagination": {
"current_page": 1,
"total_pages": 5,
"total_items": 50,
"per_page": 10
}
},
"errors": [
"<string>"
]
}{
"status": false,
"message": "Invalid Token",
"data": null,
"errors": null,
"error_code": null
}{
"status": false,
"message": "We are unable to retrieve the transaction history for this bank account.",
"data": null,
"errors": null,
"error_code": null
}{
"status": false,
"message": "The bank account was not found.",
"data": null,
"errors": null,
"error_code": null
}Authorizations
Token-based authentication using Authorization: Bearer <YOUR_API_KEY> provided by the GrailPay Support Team.
Path Parameters
Bank Account Provider. Possible Values: bank_link
Available options:
bank_link UUID of the bank account
⌘I
