Enrich transactions (sync)
curl --request POST \
--url https://app.herondata.io/api/transactions \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"transactions": [
{
"amount": -42.42,
"description": "GOOGLE *ADS12340929 [email protected] US",
"account_id": "checking_account_202348",
"balance": 423,
"categories_default": "shopping",
"currency": "USD",
"date": "2020-04-27",
"end_user_id": "my_best_customer_203948",
"mcc_code": "<string>",
"order": 123,
"reference_id": "my_favourite_transaction_231098",
"timestamp": "2021-11-12T10:38:05Z",
"transaction_code": "card"
}
]
}
'import requests
url = "https://app.herondata.io/api/transactions"
payload = { "transactions": [
{
"amount": -42.42,
"description": "GOOGLE *ADS12340929 [email protected] US",
"account_id": "checking_account_202348",
"balance": 423,
"categories_default": "shopping",
"currency": "USD",
"date": "2020-04-27",
"end_user_id": "my_best_customer_203948",
"mcc_code": "<string>",
"order": 123,
"reference_id": "my_favourite_transaction_231098",
"timestamp": "2021-11-12T10:38:05Z",
"transaction_code": "card"
}
] }
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({
transactions: [
{
amount: -42.42,
description: 'GOOGLE *ADS12340929 [email protected] US',
account_id: 'checking_account_202348',
balance: 423,
categories_default: 'shopping',
currency: 'USD',
date: '2020-04-27',
end_user_id: 'my_best_customer_203948',
mcc_code: '<string>',
order: 123,
reference_id: 'my_favourite_transaction_231098',
timestamp: '2021-11-12T10:38:05Z',
transaction_code: 'card'
}
]
})
};
fetch('https://app.herondata.io/api/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://app.herondata.io/api/transactions",
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([
'transactions' => [
[
'amount' => -42.42,
'description' => 'GOOGLE *ADS12340929 [email protected] US',
'account_id' => 'checking_account_202348',
'balance' => 423,
'categories_default' => 'shopping',
'currency' => 'USD',
'date' => '2020-04-27',
'end_user_id' => 'my_best_customer_203948',
'mcc_code' => '<string>',
'order' => 123,
'reference_id' => 'my_favourite_transaction_231098',
'timestamp' => '2021-11-12T10:38:05Z',
'transaction_code' => 'card'
]
]
]),
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/transactions"
payload := strings.NewReader("{\n \"transactions\": [\n {\n \"amount\": -42.42,\n \"description\": \"GOOGLE *ADS12340929 [email protected] US\",\n \"account_id\": \"checking_account_202348\",\n \"balance\": 423,\n \"categories_default\": \"shopping\",\n \"currency\": \"USD\",\n \"date\": \"2020-04-27\",\n \"end_user_id\": \"my_best_customer_203948\",\n \"mcc_code\": \"<string>\",\n \"order\": 123,\n \"reference_id\": \"my_favourite_transaction_231098\",\n \"timestamp\": \"2021-11-12T10:38:05Z\",\n \"transaction_code\": \"card\"\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/transactions")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"transactions\": [\n {\n \"amount\": -42.42,\n \"description\": \"GOOGLE *ADS12340929 [email protected] US\",\n \"account_id\": \"checking_account_202348\",\n \"balance\": 423,\n \"categories_default\": \"shopping\",\n \"currency\": \"USD\",\n \"date\": \"2020-04-27\",\n \"end_user_id\": \"my_best_customer_203948\",\n \"mcc_code\": \"<string>\",\n \"order\": 123,\n \"reference_id\": \"my_favourite_transaction_231098\",\n \"timestamp\": \"2021-11-12T10:38:05Z\",\n \"transaction_code\": \"card\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.herondata.io/api/transactions")
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 \"transactions\": [\n {\n \"amount\": -42.42,\n \"description\": \"GOOGLE *ADS12340929 [email protected] US\",\n \"account_id\": \"checking_account_202348\",\n \"balance\": 423,\n \"categories_default\": \"shopping\",\n \"currency\": \"USD\",\n \"date\": \"2020-04-27\",\n \"end_user_id\": \"my_best_customer_203948\",\n \"mcc_code\": \"<string>\",\n \"order\": 123,\n \"reference_id\": \"my_favourite_transaction_231098\",\n \"timestamp\": \"2021-11-12T10:38:05Z\",\n \"transaction_code\": \"card\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"_summary": {
"request_id": "<string>"
},
"transactions": [
{
"amount": -42.42,
"description": "GOOGLE *ADS12340929 [email protected] US",
"account_id": "checking_account_202348",
"balance": 423,
"categories": [
{
"annotator": "predicted",
"confidence": 0.5,
"heron_id": "ctg_gQT3sMxEwLaADUpqRndGyK",
"label": "Rent",
"model_version": "004aa73e-be73-41da-8957-ed36f3677f82"
}
],
"currency": "USD",
"description_clean": "GOOGLE ADS",
"duplicate_of_id": "txn_iyJ2Wtkb2rD88b9BVkx35N",
"end_user_id": "my_best_customer_203948",
"has_matching_transaction": true,
"is_potential_duplicate": true,
"is_recurring": true,
"merchant": {
"name": "<string>",
"url": "<string>",
"categories": [
{
"code": "7311",
"description": "Advertising services",
"slug": "advertising_services"
}
],
"heron_id": "mrc_H7X94iQHfACwvkZiX2zT3U",
"icon_url": "<string>",
"is_priority": true,
"logo_url": "<string>"
},
"payment_processor": {
"heron_id": "mrc_nRYdGU7nYuevb7qem65cEb",
"icon_url": "https://storage.googleapis.com/heron-merchant-assets/icons/mrc_nRYdGU7nYuevb7qem65cEb.svg",
"logo_url": "https://storage.googleapis.com/heron-merchant-assets/logos/mrc_nRYdGU7nYuevb7qem65cEb.svg",
"name": "Paypal",
"url": "https://www.paypal.com"
},
"reference_id": "my_favourite_transaction_231098",
"request_id": "req_Ur3PFsnnNuPbgTNdvQz6Th",
"timestamp": "2021-11-12T10:38:05Z",
"transaction_code": "card"
}
]
}{
"code": 413,
"description": "Transaction batch size exceeds max of 2500",
"name": "Payload Too Large"
}Transactions
Enrich transactions (sync)
Enrich and categorize transactions and consume them in a sync response. For business lending and underwriting, please use “Create end user transactions” instead. Please send a maximum of 249 transactions per request.
POST
/
api
/
transactions
Enrich transactions (sync)
curl --request POST \
--url https://app.herondata.io/api/transactions \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"transactions": [
{
"amount": -42.42,
"description": "GOOGLE *ADS12340929 [email protected] US",
"account_id": "checking_account_202348",
"balance": 423,
"categories_default": "shopping",
"currency": "USD",
"date": "2020-04-27",
"end_user_id": "my_best_customer_203948",
"mcc_code": "<string>",
"order": 123,
"reference_id": "my_favourite_transaction_231098",
"timestamp": "2021-11-12T10:38:05Z",
"transaction_code": "card"
}
]
}
'import requests
url = "https://app.herondata.io/api/transactions"
payload = { "transactions": [
{
"amount": -42.42,
"description": "GOOGLE *ADS12340929 [email protected] US",
"account_id": "checking_account_202348",
"balance": 423,
"categories_default": "shopping",
"currency": "USD",
"date": "2020-04-27",
"end_user_id": "my_best_customer_203948",
"mcc_code": "<string>",
"order": 123,
"reference_id": "my_favourite_transaction_231098",
"timestamp": "2021-11-12T10:38:05Z",
"transaction_code": "card"
}
] }
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({
transactions: [
{
amount: -42.42,
description: 'GOOGLE *ADS12340929 [email protected] US',
account_id: 'checking_account_202348',
balance: 423,
categories_default: 'shopping',
currency: 'USD',
date: '2020-04-27',
end_user_id: 'my_best_customer_203948',
mcc_code: '<string>',
order: 123,
reference_id: 'my_favourite_transaction_231098',
timestamp: '2021-11-12T10:38:05Z',
transaction_code: 'card'
}
]
})
};
fetch('https://app.herondata.io/api/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://app.herondata.io/api/transactions",
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([
'transactions' => [
[
'amount' => -42.42,
'description' => 'GOOGLE *ADS12340929 [email protected] US',
'account_id' => 'checking_account_202348',
'balance' => 423,
'categories_default' => 'shopping',
'currency' => 'USD',
'date' => '2020-04-27',
'end_user_id' => 'my_best_customer_203948',
'mcc_code' => '<string>',
'order' => 123,
'reference_id' => 'my_favourite_transaction_231098',
'timestamp' => '2021-11-12T10:38:05Z',
'transaction_code' => 'card'
]
]
]),
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/transactions"
payload := strings.NewReader("{\n \"transactions\": [\n {\n \"amount\": -42.42,\n \"description\": \"GOOGLE *ADS12340929 [email protected] US\",\n \"account_id\": \"checking_account_202348\",\n \"balance\": 423,\n \"categories_default\": \"shopping\",\n \"currency\": \"USD\",\n \"date\": \"2020-04-27\",\n \"end_user_id\": \"my_best_customer_203948\",\n \"mcc_code\": \"<string>\",\n \"order\": 123,\n \"reference_id\": \"my_favourite_transaction_231098\",\n \"timestamp\": \"2021-11-12T10:38:05Z\",\n \"transaction_code\": \"card\"\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/transactions")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"transactions\": [\n {\n \"amount\": -42.42,\n \"description\": \"GOOGLE *ADS12340929 [email protected] US\",\n \"account_id\": \"checking_account_202348\",\n \"balance\": 423,\n \"categories_default\": \"shopping\",\n \"currency\": \"USD\",\n \"date\": \"2020-04-27\",\n \"end_user_id\": \"my_best_customer_203948\",\n \"mcc_code\": \"<string>\",\n \"order\": 123,\n \"reference_id\": \"my_favourite_transaction_231098\",\n \"timestamp\": \"2021-11-12T10:38:05Z\",\n \"transaction_code\": \"card\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.herondata.io/api/transactions")
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 \"transactions\": [\n {\n \"amount\": -42.42,\n \"description\": \"GOOGLE *ADS12340929 [email protected] US\",\n \"account_id\": \"checking_account_202348\",\n \"balance\": 423,\n \"categories_default\": \"shopping\",\n \"currency\": \"USD\",\n \"date\": \"2020-04-27\",\n \"end_user_id\": \"my_best_customer_203948\",\n \"mcc_code\": \"<string>\",\n \"order\": 123,\n \"reference_id\": \"my_favourite_transaction_231098\",\n \"timestamp\": \"2021-11-12T10:38:05Z\",\n \"transaction_code\": \"card\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"_summary": {
"request_id": "<string>"
},
"transactions": [
{
"amount": -42.42,
"description": "GOOGLE *ADS12340929 [email protected] US",
"account_id": "checking_account_202348",
"balance": 423,
"categories": [
{
"annotator": "predicted",
"confidence": 0.5,
"heron_id": "ctg_gQT3sMxEwLaADUpqRndGyK",
"label": "Rent",
"model_version": "004aa73e-be73-41da-8957-ed36f3677f82"
}
],
"currency": "USD",
"description_clean": "GOOGLE ADS",
"duplicate_of_id": "txn_iyJ2Wtkb2rD88b9BVkx35N",
"end_user_id": "my_best_customer_203948",
"has_matching_transaction": true,
"is_potential_duplicate": true,
"is_recurring": true,
"merchant": {
"name": "<string>",
"url": "<string>",
"categories": [
{
"code": "7311",
"description": "Advertising services",
"slug": "advertising_services"
}
],
"heron_id": "mrc_H7X94iQHfACwvkZiX2zT3U",
"icon_url": "<string>",
"is_priority": true,
"logo_url": "<string>"
},
"payment_processor": {
"heron_id": "mrc_nRYdGU7nYuevb7qem65cEb",
"icon_url": "https://storage.googleapis.com/heron-merchant-assets/icons/mrc_nRYdGU7nYuevb7qem65cEb.svg",
"logo_url": "https://storage.googleapis.com/heron-merchant-assets/logos/mrc_nRYdGU7nYuevb7qem65cEb.svg",
"name": "Paypal",
"url": "https://www.paypal.com"
},
"reference_id": "my_favourite_transaction_231098",
"request_id": "req_Ur3PFsnnNuPbgTNdvQz6Th",
"timestamp": "2021-11-12T10:38:05Z",
"transaction_code": "card"
}
]
}{
"code": 413,
"description": "Transaction batch size exceeds max of 2500",
"name": "Payload Too Large"
}Was this page helpful?
⌘I