Get Account Transactions
curl --request GET \
--url https://api.yapily.com/accounts/{accountId}/transactions \
--header 'Authorization: Basic <encoded-value>' \
--header 'consent: <consent>'import requests
url = "https://api.yapily.com/accounts/{accountId}/transactions"
headers = {
"consent": "<consent>",
"Authorization": "Basic <encoded-value>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {consent: '<consent>', Authorization: 'Basic <encoded-value>'}
};
fetch('https://api.yapily.com/accounts/{accountId}/transactions', 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.yapily.com/accounts/{accountId}/transactions",
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: Basic <encoded-value>",
"consent: <consent>"
],
]);
$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.yapily.com/accounts/{accountId}/transactions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("consent", "<consent>")
req.Header.Add("Authorization", "Basic <encoded-value>")
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.yapily.com/accounts/{accountId}/transactions")
.header("consent", "<consent>")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yapily.com/accounts/{accountId}/transactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["consent"] = '<consent>'
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"meta": {
"tracingId": "488ce8243ee74a378be722ffffec8f7f",
"count": 1,
"pagination": {
"totalCount": 1,
"self": {
"limit": 1000,
"sort": "-date",
"offset": 0
}
}
},
"data": [
{
"id": "49d6e5c6-0130-46e3-884b-1b185432d9e0",
"date": "2021-05-06T17:44:34.589Z",
"bookingDateTime": "2021-05-06T17:44:34.589Z",
"valueDateTime": "2021-05-06T17:44:34.589Z",
"status": "BOOKED",
"amount": -100.23,
"currency": "GBP",
"transactionAmount": {
"amount": -100.23,
"currency": "GBP"
},
"reference": "0",
"description": "Debit for Payment Id: sdp-1-57379a43-c4b8-49f5-bd7c-699189ee7a60",
"transactionInformation": [
"Debit for Payment Id: sdp-1-57379a43-c4b8-49f5-bd7c-699189ee7a60"
],
"isoBankTransactionCode": {
"domainCode": {
"code": "PMNT",
"name": "Payments"
},
"familyCode": {
"code": "ICDT",
"name": "Issued Credit Transfers"
},
"subFamilyCode": {
"code": "DMCT",
"name": "Domestic Credit Transfer"
}
},
"proprietaryBankTransactionCode": {
"code": "PMT",
"issuer": "modelo-sandbox"
},
"balance": {
"type": "CLOSING_AVAILABLE",
"balanceAmount": {
"amount": 426.53,
"currency": "GBP"
}
},
"enrichment": {
"transactionHash": {
"hash": "adad72d7b3069ab9e4a6cb2844e2e3e9.1"
}
}
}
],
"links": {
"self": "https://api.yapily.com/accounts/700004000000000000000002/transactions?from&before&limit=1000&sort=-date&offset=0&cursor"
}
}{
"error": {
"code": 401,
"status": "UNAUTHORIZED",
"message": "Full authentication is required to access this resource"
}
}Financial Data
Get Account Transactions
Returns the account transactions for an account.
Feature: ACCOUNT_TRANSACTIONS
Get Account Transactions
curl --request GET \
--url https://api.yapily.com/accounts/{accountId}/transactions \
--header 'Authorization: Basic <encoded-value>' \
--header 'consent: <consent>'import requests
url = "https://api.yapily.com/accounts/{accountId}/transactions"
headers = {
"consent": "<consent>",
"Authorization": "Basic <encoded-value>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {consent: '<consent>', Authorization: 'Basic <encoded-value>'}
};
fetch('https://api.yapily.com/accounts/{accountId}/transactions', 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.yapily.com/accounts/{accountId}/transactions",
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: Basic <encoded-value>",
"consent: <consent>"
],
]);
$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.yapily.com/accounts/{accountId}/transactions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("consent", "<consent>")
req.Header.Add("Authorization", "Basic <encoded-value>")
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.yapily.com/accounts/{accountId}/transactions")
.header("consent", "<consent>")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yapily.com/accounts/{accountId}/transactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["consent"] = '<consent>'
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"meta": {
"tracingId": "488ce8243ee74a378be722ffffec8f7f",
"count": 1,
"pagination": {
"totalCount": 1,
"self": {
"limit": 1000,
"sort": "-date",
"offset": 0
}
}
},
"data": [
{
"id": "49d6e5c6-0130-46e3-884b-1b185432d9e0",
"date": "2021-05-06T17:44:34.589Z",
"bookingDateTime": "2021-05-06T17:44:34.589Z",
"valueDateTime": "2021-05-06T17:44:34.589Z",
"status": "BOOKED",
"amount": -100.23,
"currency": "GBP",
"transactionAmount": {
"amount": -100.23,
"currency": "GBP"
},
"reference": "0",
"description": "Debit for Payment Id: sdp-1-57379a43-c4b8-49f5-bd7c-699189ee7a60",
"transactionInformation": [
"Debit for Payment Id: sdp-1-57379a43-c4b8-49f5-bd7c-699189ee7a60"
],
"isoBankTransactionCode": {
"domainCode": {
"code": "PMNT",
"name": "Payments"
},
"familyCode": {
"code": "ICDT",
"name": "Issued Credit Transfers"
},
"subFamilyCode": {
"code": "DMCT",
"name": "Domestic Credit Transfer"
}
},
"proprietaryBankTransactionCode": {
"code": "PMT",
"issuer": "modelo-sandbox"
},
"balance": {
"type": "CLOSING_AVAILABLE",
"balanceAmount": {
"amount": 426.53,
"currency": "GBP"
}
},
"enrichment": {
"transactionHash": {
"hash": "adad72d7b3069ab9e4a6cb2844e2e3e9.1"
}
}
}
],
"links": {
"self": "https://api.yapily.com/accounts/700004000000000000000002/transactions?from&before&limit=1000&sort=-date&offset=0&cursor"
}
}{
"error": {
"code": 401,
"status": "UNAUTHORIZED",
"message": "Full authentication is required to access this resource"
}
}Learn more: Pagination for handling large transaction sets (1000 limit default)
Authorizations
Use HTTP Basic Authentication with your Application ID as username and Application Secret as password. Manage credentials in the Yapily Console. See Authentication for details.
Headers
Conditional. Represents the user's login ID for the Institution to a personal account.
See PSU identifiers to see if this header is required.
Conditional. Represents the user's login ID for the Institution to a business account.
See PSU identifiers to see if this header is required.
Conditional. The IP address of the PSU.
See PSU identifiers to see if this header is required.
Query Parameters
Was this page helpful?