Upload Plaid assets
curl --request POST \
--url https://app.herondata.io/api/end_users/{end_user_id_or_heron_id}/plaid/assets \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"report": {
"date_generated": "2023-11-07T05:31:56Z",
"days_requested": 123,
"items": [
{
"accounts": [
{
"account_id": "<string>",
"balances": {
"available": 123,
"current": 123,
"iso_currency_code": "<string>",
"limit": 123
},
"historical_balances": [
{
"current": 123,
"date": "2023-12-25",
"iso_currency_code": "USD"
}
],
"transactions": [
{
"account_id": "<string>",
"amount": 123,
"balance": 123,
"category": "<string>",
"date": "2023-12-25",
"iso_currency_code": "USD",
"merchant_name": "<string>",
"name": "<string>",
"pending": true,
"pending_transaction_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"transaction_code": "<string>",
"transaction_id": "<string>"
}
],
"holder_category": "<string>",
"mask": "<string>",
"name": "<string>",
"official_name": "<string>",
"owners": [
{
"names": [
"<string>"
]
}
],
"subtype": "<string>",
"type": "<string>"
}
],
"institution_name": "<string>"
}
]
}
}
'import requests
url = "https://app.herondata.io/api/end_users/{end_user_id_or_heron_id}/plaid/assets"
payload = { "report": {
"date_generated": "2023-11-07T05:31:56Z",
"days_requested": 123,
"items": [
{
"accounts": [
{
"account_id": "<string>",
"balances": {
"available": 123,
"current": 123,
"iso_currency_code": "<string>",
"limit": 123
},
"historical_balances": [
{
"current": 123,
"date": "2023-12-25",
"iso_currency_code": "USD"
}
],
"transactions": [
{
"account_id": "<string>",
"amount": 123,
"balance": 123,
"category": "<string>",
"date": "2023-12-25",
"iso_currency_code": "USD",
"merchant_name": "<string>",
"name": "<string>",
"pending": True,
"pending_transaction_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"transaction_code": "<string>",
"transaction_id": "<string>"
}
],
"holder_category": "<string>",
"mask": "<string>",
"name": "<string>",
"official_name": "<string>",
"owners": [{ "names": ["<string>"] }],
"subtype": "<string>",
"type": "<string>"
}
],
"institution_name": "<string>"
}
]
} }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
report: {
date_generated: '2023-11-07T05:31:56Z',
days_requested: 123,
items: [
{
accounts: [
{
account_id: '<string>',
balances: {available: 123, current: 123, iso_currency_code: '<string>', limit: 123},
historical_balances: [{current: 123, date: '2023-12-25', iso_currency_code: 'USD'}],
transactions: [
{
account_id: '<string>',
amount: 123,
balance: 123,
category: '<string>',
date: '2023-12-25',
iso_currency_code: 'USD',
merchant_name: '<string>',
name: '<string>',
pending: true,
pending_transaction_id: '<string>',
timestamp: '2023-11-07T05:31:56Z',
transaction_code: '<string>',
transaction_id: '<string>'
}
],
holder_category: '<string>',
mask: '<string>',
name: '<string>',
official_name: '<string>',
owners: [{names: ['<string>']}],
subtype: '<string>',
type: '<string>'
}
],
institution_name: '<string>'
}
]
}
})
};
fetch('https://app.herondata.io/api/end_users/{end_user_id_or_heron_id}/plaid/assets', 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://app.herondata.io/api/end_users/{end_user_id_or_heron_id}/plaid/assets",
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([
'report' => [
'date_generated' => '2023-11-07T05:31:56Z',
'days_requested' => 123,
'items' => [
[
'accounts' => [
[
'account_id' => '<string>',
'balances' => [
'available' => 123,
'current' => 123,
'iso_currency_code' => '<string>',
'limit' => 123
],
'historical_balances' => [
[
'current' => 123,
'date' => '2023-12-25',
'iso_currency_code' => 'USD'
]
],
'transactions' => [
[
'account_id' => '<string>',
'amount' => 123,
'balance' => 123,
'category' => '<string>',
'date' => '2023-12-25',
'iso_currency_code' => 'USD',
'merchant_name' => '<string>',
'name' => '<string>',
'pending' => true,
'pending_transaction_id' => '<string>',
'timestamp' => '2023-11-07T05:31:56Z',
'transaction_code' => '<string>',
'transaction_id' => '<string>'
]
],
'holder_category' => '<string>',
'mask' => '<string>',
'name' => '<string>',
'official_name' => '<string>',
'owners' => [
[
'names' => [
'<string>'
]
]
],
'subtype' => '<string>',
'type' => '<string>'
]
],
'institution_name' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://app.herondata.io/api/end_users/{end_user_id_or_heron_id}/plaid/assets"
payload := strings.NewReader("{\n \"report\": {\n \"date_generated\": \"2023-11-07T05:31:56Z\",\n \"days_requested\": 123,\n \"items\": [\n {\n \"accounts\": [\n {\n \"account_id\": \"<string>\",\n \"balances\": {\n \"available\": 123,\n \"current\": 123,\n \"iso_currency_code\": \"<string>\",\n \"limit\": 123\n },\n \"historical_balances\": [\n {\n \"current\": 123,\n \"date\": \"2023-12-25\",\n \"iso_currency_code\": \"USD\"\n }\n ],\n \"transactions\": [\n {\n \"account_id\": \"<string>\",\n \"amount\": 123,\n \"balance\": 123,\n \"category\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"iso_currency_code\": \"USD\",\n \"merchant_name\": \"<string>\",\n \"name\": \"<string>\",\n \"pending\": true,\n \"pending_transaction_id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"transaction_code\": \"<string>\",\n \"transaction_id\": \"<string>\"\n }\n ],\n \"holder_category\": \"<string>\",\n \"mask\": \"<string>\",\n \"name\": \"<string>\",\n \"official_name\": \"<string>\",\n \"owners\": [\n {\n \"names\": [\n \"<string>\"\n ]\n }\n ],\n \"subtype\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"institution_name\": \"<string>\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://app.herondata.io/api/end_users/{end_user_id_or_heron_id}/plaid/assets")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"report\": {\n \"date_generated\": \"2023-11-07T05:31:56Z\",\n \"days_requested\": 123,\n \"items\": [\n {\n \"accounts\": [\n {\n \"account_id\": \"<string>\",\n \"balances\": {\n \"available\": 123,\n \"current\": 123,\n \"iso_currency_code\": \"<string>\",\n \"limit\": 123\n },\n \"historical_balances\": [\n {\n \"current\": 123,\n \"date\": \"2023-12-25\",\n \"iso_currency_code\": \"USD\"\n }\n ],\n \"transactions\": [\n {\n \"account_id\": \"<string>\",\n \"amount\": 123,\n \"balance\": 123,\n \"category\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"iso_currency_code\": \"USD\",\n \"merchant_name\": \"<string>\",\n \"name\": \"<string>\",\n \"pending\": true,\n \"pending_transaction_id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"transaction_code\": \"<string>\",\n \"transaction_id\": \"<string>\"\n }\n ],\n \"holder_category\": \"<string>\",\n \"mask\": \"<string>\",\n \"name\": \"<string>\",\n \"official_name\": \"<string>\",\n \"owners\": [\n {\n \"names\": [\n \"<string>\"\n ]\n }\n ],\n \"subtype\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"institution_name\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.herondata.io/api/end_users/{end_user_id_or_heron_id}/plaid/assets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"report\": {\n \"date_generated\": \"2023-11-07T05:31:56Z\",\n \"days_requested\": 123,\n \"items\": [\n {\n \"accounts\": [\n {\n \"account_id\": \"<string>\",\n \"balances\": {\n \"available\": 123,\n \"current\": 123,\n \"iso_currency_code\": \"<string>\",\n \"limit\": 123\n },\n \"historical_balances\": [\n {\n \"current\": 123,\n \"date\": \"2023-12-25\",\n \"iso_currency_code\": \"USD\"\n }\n ],\n \"transactions\": [\n {\n \"account_id\": \"<string>\",\n \"amount\": 123,\n \"balance\": 123,\n \"category\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"iso_currency_code\": \"USD\",\n \"merchant_name\": \"<string>\",\n \"name\": \"<string>\",\n \"pending\": true,\n \"pending_transaction_id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"transaction_code\": \"<string>\",\n \"transaction_id\": \"<string>\"\n }\n ],\n \"holder_category\": \"<string>\",\n \"mask\": \"<string>\",\n \"name\": \"<string>\",\n \"official_name\": \"<string>\",\n \"owners\": [\n {\n \"names\": [\n \"<string>\"\n ]\n }\n ],\n \"subtype\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"institution_name\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"_summary": {
"request_id": "<string>"
}
}EndUserIntegrations
Upload Plaid assets
Upload Plaid asset JSON for a specified end user to translate into Heron Data format and add transactions for the end user
POST
/
api
/
end_users
/
{end_user_id_or_heron_id}
/
plaid
/
assets
Upload Plaid assets
curl --request POST \
--url https://app.herondata.io/api/end_users/{end_user_id_or_heron_id}/plaid/assets \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"report": {
"date_generated": "2023-11-07T05:31:56Z",
"days_requested": 123,
"items": [
{
"accounts": [
{
"account_id": "<string>",
"balances": {
"available": 123,
"current": 123,
"iso_currency_code": "<string>",
"limit": 123
},
"historical_balances": [
{
"current": 123,
"date": "2023-12-25",
"iso_currency_code": "USD"
}
],
"transactions": [
{
"account_id": "<string>",
"amount": 123,
"balance": 123,
"category": "<string>",
"date": "2023-12-25",
"iso_currency_code": "USD",
"merchant_name": "<string>",
"name": "<string>",
"pending": true,
"pending_transaction_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"transaction_code": "<string>",
"transaction_id": "<string>"
}
],
"holder_category": "<string>",
"mask": "<string>",
"name": "<string>",
"official_name": "<string>",
"owners": [
{
"names": [
"<string>"
]
}
],
"subtype": "<string>",
"type": "<string>"
}
],
"institution_name": "<string>"
}
]
}
}
'import requests
url = "https://app.herondata.io/api/end_users/{end_user_id_or_heron_id}/plaid/assets"
payload = { "report": {
"date_generated": "2023-11-07T05:31:56Z",
"days_requested": 123,
"items": [
{
"accounts": [
{
"account_id": "<string>",
"balances": {
"available": 123,
"current": 123,
"iso_currency_code": "<string>",
"limit": 123
},
"historical_balances": [
{
"current": 123,
"date": "2023-12-25",
"iso_currency_code": "USD"
}
],
"transactions": [
{
"account_id": "<string>",
"amount": 123,
"balance": 123,
"category": "<string>",
"date": "2023-12-25",
"iso_currency_code": "USD",
"merchant_name": "<string>",
"name": "<string>",
"pending": True,
"pending_transaction_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"transaction_code": "<string>",
"transaction_id": "<string>"
}
],
"holder_category": "<string>",
"mask": "<string>",
"name": "<string>",
"official_name": "<string>",
"owners": [{ "names": ["<string>"] }],
"subtype": "<string>",
"type": "<string>"
}
],
"institution_name": "<string>"
}
]
} }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
report: {
date_generated: '2023-11-07T05:31:56Z',
days_requested: 123,
items: [
{
accounts: [
{
account_id: '<string>',
balances: {available: 123, current: 123, iso_currency_code: '<string>', limit: 123},
historical_balances: [{current: 123, date: '2023-12-25', iso_currency_code: 'USD'}],
transactions: [
{
account_id: '<string>',
amount: 123,
balance: 123,
category: '<string>',
date: '2023-12-25',
iso_currency_code: 'USD',
merchant_name: '<string>',
name: '<string>',
pending: true,
pending_transaction_id: '<string>',
timestamp: '2023-11-07T05:31:56Z',
transaction_code: '<string>',
transaction_id: '<string>'
}
],
holder_category: '<string>',
mask: '<string>',
name: '<string>',
official_name: '<string>',
owners: [{names: ['<string>']}],
subtype: '<string>',
type: '<string>'
}
],
institution_name: '<string>'
}
]
}
})
};
fetch('https://app.herondata.io/api/end_users/{end_user_id_or_heron_id}/plaid/assets', 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://app.herondata.io/api/end_users/{end_user_id_or_heron_id}/plaid/assets",
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([
'report' => [
'date_generated' => '2023-11-07T05:31:56Z',
'days_requested' => 123,
'items' => [
[
'accounts' => [
[
'account_id' => '<string>',
'balances' => [
'available' => 123,
'current' => 123,
'iso_currency_code' => '<string>',
'limit' => 123
],
'historical_balances' => [
[
'current' => 123,
'date' => '2023-12-25',
'iso_currency_code' => 'USD'
]
],
'transactions' => [
[
'account_id' => '<string>',
'amount' => 123,
'balance' => 123,
'category' => '<string>',
'date' => '2023-12-25',
'iso_currency_code' => 'USD',
'merchant_name' => '<string>',
'name' => '<string>',
'pending' => true,
'pending_transaction_id' => '<string>',
'timestamp' => '2023-11-07T05:31:56Z',
'transaction_code' => '<string>',
'transaction_id' => '<string>'
]
],
'holder_category' => '<string>',
'mask' => '<string>',
'name' => '<string>',
'official_name' => '<string>',
'owners' => [
[
'names' => [
'<string>'
]
]
],
'subtype' => '<string>',
'type' => '<string>'
]
],
'institution_name' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://app.herondata.io/api/end_users/{end_user_id_or_heron_id}/plaid/assets"
payload := strings.NewReader("{\n \"report\": {\n \"date_generated\": \"2023-11-07T05:31:56Z\",\n \"days_requested\": 123,\n \"items\": [\n {\n \"accounts\": [\n {\n \"account_id\": \"<string>\",\n \"balances\": {\n \"available\": 123,\n \"current\": 123,\n \"iso_currency_code\": \"<string>\",\n \"limit\": 123\n },\n \"historical_balances\": [\n {\n \"current\": 123,\n \"date\": \"2023-12-25\",\n \"iso_currency_code\": \"USD\"\n }\n ],\n \"transactions\": [\n {\n \"account_id\": \"<string>\",\n \"amount\": 123,\n \"balance\": 123,\n \"category\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"iso_currency_code\": \"USD\",\n \"merchant_name\": \"<string>\",\n \"name\": \"<string>\",\n \"pending\": true,\n \"pending_transaction_id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"transaction_code\": \"<string>\",\n \"transaction_id\": \"<string>\"\n }\n ],\n \"holder_category\": \"<string>\",\n \"mask\": \"<string>\",\n \"name\": \"<string>\",\n \"official_name\": \"<string>\",\n \"owners\": [\n {\n \"names\": [\n \"<string>\"\n ]\n }\n ],\n \"subtype\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"institution_name\": \"<string>\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://app.herondata.io/api/end_users/{end_user_id_or_heron_id}/plaid/assets")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"report\": {\n \"date_generated\": \"2023-11-07T05:31:56Z\",\n \"days_requested\": 123,\n \"items\": [\n {\n \"accounts\": [\n {\n \"account_id\": \"<string>\",\n \"balances\": {\n \"available\": 123,\n \"current\": 123,\n \"iso_currency_code\": \"<string>\",\n \"limit\": 123\n },\n \"historical_balances\": [\n {\n \"current\": 123,\n \"date\": \"2023-12-25\",\n \"iso_currency_code\": \"USD\"\n }\n ],\n \"transactions\": [\n {\n \"account_id\": \"<string>\",\n \"amount\": 123,\n \"balance\": 123,\n \"category\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"iso_currency_code\": \"USD\",\n \"merchant_name\": \"<string>\",\n \"name\": \"<string>\",\n \"pending\": true,\n \"pending_transaction_id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"transaction_code\": \"<string>\",\n \"transaction_id\": \"<string>\"\n }\n ],\n \"holder_category\": \"<string>\",\n \"mask\": \"<string>\",\n \"name\": \"<string>\",\n \"official_name\": \"<string>\",\n \"owners\": [\n {\n \"names\": [\n \"<string>\"\n ]\n }\n ],\n \"subtype\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"institution_name\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.herondata.io/api/end_users/{end_user_id_or_heron_id}/plaid/assets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"report\": {\n \"date_generated\": \"2023-11-07T05:31:56Z\",\n \"days_requested\": 123,\n \"items\": [\n {\n \"accounts\": [\n {\n \"account_id\": \"<string>\",\n \"balances\": {\n \"available\": 123,\n \"current\": 123,\n \"iso_currency_code\": \"<string>\",\n \"limit\": 123\n },\n \"historical_balances\": [\n {\n \"current\": 123,\n \"date\": \"2023-12-25\",\n \"iso_currency_code\": \"USD\"\n }\n ],\n \"transactions\": [\n {\n \"account_id\": \"<string>\",\n \"amount\": 123,\n \"balance\": 123,\n \"category\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"iso_currency_code\": \"USD\",\n \"merchant_name\": \"<string>\",\n \"name\": \"<string>\",\n \"pending\": true,\n \"pending_transaction_id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"transaction_code\": \"<string>\",\n \"transaction_id\": \"<string>\"\n }\n ],\n \"holder_category\": \"<string>\",\n \"mask\": \"<string>\",\n \"name\": \"<string>\",\n \"official_name\": \"<string>\",\n \"owners\": [\n {\n \"names\": [\n \"<string>\"\n ]\n }\n ],\n \"subtype\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"institution_name\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"_summary": {
"request_id": "<string>"
}
}Was this page helpful?
⌘I