Send patch transactions for a pdf statement
curl --request PATCH \
--url https://app.herondata.io/api/integrations/pdfs/{heron_id}/processed \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"index": 123,
"transactions": [
{
"amount": 123,
"balance": 123,
"bounds": {
"page": 123,
"x_max": 123,
"x_min": 123,
"y_max": 123,
"y_min": 123
},
"currency": "<string>",
"description": "<string>",
"ocr_suspect": true,
"reference_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"transaction_code": "<string>"
}
],
"exclude": true,
"summary": {
"account_number": "<string>",
"bank_name": "<string>",
"company": "<string>",
"end_balance": 123,
"fraud_reasons": [
"<string>"
],
"fraud_score": 123,
"start_balance": 123,
"statement_end_date": "2023-11-07T05:31:56Z",
"statement_start_date": "2023-11-07T05:31:56Z"
}
}
'import requests
url = "https://app.herondata.io/api/integrations/pdfs/{heron_id}/processed"
payload = {
"index": 123,
"transactions": [
{
"amount": 123,
"balance": 123,
"bounds": {
"page": 123,
"x_max": 123,
"x_min": 123,
"y_max": 123,
"y_min": 123
},
"currency": "<string>",
"description": "<string>",
"ocr_suspect": True,
"reference_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"transaction_code": "<string>"
}
],
"exclude": True,
"summary": {
"account_number": "<string>",
"bank_name": "<string>",
"company": "<string>",
"end_balance": 123,
"fraud_reasons": ["<string>"],
"fraud_score": 123,
"start_balance": 123,
"statement_end_date": "2023-11-07T05:31:56Z",
"statement_start_date": "2023-11-07T05:31:56Z"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
index: 123,
transactions: [
{
amount: 123,
balance: 123,
bounds: {page: 123, x_max: 123, x_min: 123, y_max: 123, y_min: 123},
currency: '<string>',
description: '<string>',
ocr_suspect: true,
reference_id: '<string>',
timestamp: '2023-11-07T05:31:56Z',
transaction_code: '<string>'
}
],
exclude: true,
summary: {
account_number: '<string>',
bank_name: '<string>',
company: '<string>',
end_balance: 123,
fraud_reasons: ['<string>'],
fraud_score: 123,
start_balance: 123,
statement_end_date: '2023-11-07T05:31:56Z',
statement_start_date: '2023-11-07T05:31:56Z'
}
})
};
fetch('https://app.herondata.io/api/integrations/pdfs/{heron_id}/processed', 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/integrations/pdfs/{heron_id}/processed",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'index' => 123,
'transactions' => [
[
'amount' => 123,
'balance' => 123,
'bounds' => [
'page' => 123,
'x_max' => 123,
'x_min' => 123,
'y_max' => 123,
'y_min' => 123
],
'currency' => '<string>',
'description' => '<string>',
'ocr_suspect' => true,
'reference_id' => '<string>',
'timestamp' => '2023-11-07T05:31:56Z',
'transaction_code' => '<string>'
]
],
'exclude' => true,
'summary' => [
'account_number' => '<string>',
'bank_name' => '<string>',
'company' => '<string>',
'end_balance' => 123,
'fraud_reasons' => [
'<string>'
],
'fraud_score' => 123,
'start_balance' => 123,
'statement_end_date' => '2023-11-07T05:31:56Z',
'statement_start_date' => '2023-11-07T05:31:56Z'
]
]),
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/integrations/pdfs/{heron_id}/processed"
payload := strings.NewReader("{\n \"index\": 123,\n \"transactions\": [\n {\n \"amount\": 123,\n \"balance\": 123,\n \"bounds\": {\n \"page\": 123,\n \"x_max\": 123,\n \"x_min\": 123,\n \"y_max\": 123,\n \"y_min\": 123\n },\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"ocr_suspect\": true,\n \"reference_id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"transaction_code\": \"<string>\"\n }\n ],\n \"exclude\": true,\n \"summary\": {\n \"account_number\": \"<string>\",\n \"bank_name\": \"<string>\",\n \"company\": \"<string>\",\n \"end_balance\": 123,\n \"fraud_reasons\": [\n \"<string>\"\n ],\n \"fraud_score\": 123,\n \"start_balance\": 123,\n \"statement_end_date\": \"2023-11-07T05:31:56Z\",\n \"statement_start_date\": \"2023-11-07T05:31:56Z\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://app.herondata.io/api/integrations/pdfs/{heron_id}/processed")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"index\": 123,\n \"transactions\": [\n {\n \"amount\": 123,\n \"balance\": 123,\n \"bounds\": {\n \"page\": 123,\n \"x_max\": 123,\n \"x_min\": 123,\n \"y_max\": 123,\n \"y_min\": 123\n },\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"ocr_suspect\": true,\n \"reference_id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"transaction_code\": \"<string>\"\n }\n ],\n \"exclude\": true,\n \"summary\": {\n \"account_number\": \"<string>\",\n \"bank_name\": \"<string>\",\n \"company\": \"<string>\",\n \"end_balance\": 123,\n \"fraud_reasons\": [\n \"<string>\"\n ],\n \"fraud_score\": 123,\n \"start_balance\": 123,\n \"statement_end_date\": \"2023-11-07T05:31:56Z\",\n \"statement_start_date\": \"2023-11-07T05:31:56Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.herondata.io/api/integrations/pdfs/{heron_id}/processed")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"index\": 123,\n \"transactions\": [\n {\n \"amount\": 123,\n \"balance\": 123,\n \"bounds\": {\n \"page\": 123,\n \"x_max\": 123,\n \"x_min\": 123,\n \"y_max\": 123,\n \"y_min\": 123\n },\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"ocr_suspect\": true,\n \"reference_id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"transaction_code\": \"<string>\"\n }\n ],\n \"exclude\": true,\n \"summary\": {\n \"account_number\": \"<string>\",\n \"bank_name\": \"<string>\",\n \"company\": \"<string>\",\n \"end_balance\": 123,\n \"fraud_reasons\": [\n \"<string>\"\n ],\n \"fraud_score\": 123,\n \"start_balance\": 123,\n \"statement_end_date\": \"2023-11-07T05:31:56Z\",\n \"statement_start_date\": \"2023-11-07T05:31:56Z\"\n }\n}"
response = http.request(request)
puts response.read_body{
"ok": true
}EndUserIntegrations
Send patch transactions for a pdf statement
Send patch transactions processed pdf that will override the extracted transactions in the specified statement
PATCH
/
api
/
integrations
/
pdfs
/
{heron_id}
/
processed
Send patch transactions for a pdf statement
curl --request PATCH \
--url https://app.herondata.io/api/integrations/pdfs/{heron_id}/processed \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"index": 123,
"transactions": [
{
"amount": 123,
"balance": 123,
"bounds": {
"page": 123,
"x_max": 123,
"x_min": 123,
"y_max": 123,
"y_min": 123
},
"currency": "<string>",
"description": "<string>",
"ocr_suspect": true,
"reference_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"transaction_code": "<string>"
}
],
"exclude": true,
"summary": {
"account_number": "<string>",
"bank_name": "<string>",
"company": "<string>",
"end_balance": 123,
"fraud_reasons": [
"<string>"
],
"fraud_score": 123,
"start_balance": 123,
"statement_end_date": "2023-11-07T05:31:56Z",
"statement_start_date": "2023-11-07T05:31:56Z"
}
}
'import requests
url = "https://app.herondata.io/api/integrations/pdfs/{heron_id}/processed"
payload = {
"index": 123,
"transactions": [
{
"amount": 123,
"balance": 123,
"bounds": {
"page": 123,
"x_max": 123,
"x_min": 123,
"y_max": 123,
"y_min": 123
},
"currency": "<string>",
"description": "<string>",
"ocr_suspect": True,
"reference_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"transaction_code": "<string>"
}
],
"exclude": True,
"summary": {
"account_number": "<string>",
"bank_name": "<string>",
"company": "<string>",
"end_balance": 123,
"fraud_reasons": ["<string>"],
"fraud_score": 123,
"start_balance": 123,
"statement_end_date": "2023-11-07T05:31:56Z",
"statement_start_date": "2023-11-07T05:31:56Z"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
index: 123,
transactions: [
{
amount: 123,
balance: 123,
bounds: {page: 123, x_max: 123, x_min: 123, y_max: 123, y_min: 123},
currency: '<string>',
description: '<string>',
ocr_suspect: true,
reference_id: '<string>',
timestamp: '2023-11-07T05:31:56Z',
transaction_code: '<string>'
}
],
exclude: true,
summary: {
account_number: '<string>',
bank_name: '<string>',
company: '<string>',
end_balance: 123,
fraud_reasons: ['<string>'],
fraud_score: 123,
start_balance: 123,
statement_end_date: '2023-11-07T05:31:56Z',
statement_start_date: '2023-11-07T05:31:56Z'
}
})
};
fetch('https://app.herondata.io/api/integrations/pdfs/{heron_id}/processed', 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/integrations/pdfs/{heron_id}/processed",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'index' => 123,
'transactions' => [
[
'amount' => 123,
'balance' => 123,
'bounds' => [
'page' => 123,
'x_max' => 123,
'x_min' => 123,
'y_max' => 123,
'y_min' => 123
],
'currency' => '<string>',
'description' => '<string>',
'ocr_suspect' => true,
'reference_id' => '<string>',
'timestamp' => '2023-11-07T05:31:56Z',
'transaction_code' => '<string>'
]
],
'exclude' => true,
'summary' => [
'account_number' => '<string>',
'bank_name' => '<string>',
'company' => '<string>',
'end_balance' => 123,
'fraud_reasons' => [
'<string>'
],
'fraud_score' => 123,
'start_balance' => 123,
'statement_end_date' => '2023-11-07T05:31:56Z',
'statement_start_date' => '2023-11-07T05:31:56Z'
]
]),
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/integrations/pdfs/{heron_id}/processed"
payload := strings.NewReader("{\n \"index\": 123,\n \"transactions\": [\n {\n \"amount\": 123,\n \"balance\": 123,\n \"bounds\": {\n \"page\": 123,\n \"x_max\": 123,\n \"x_min\": 123,\n \"y_max\": 123,\n \"y_min\": 123\n },\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"ocr_suspect\": true,\n \"reference_id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"transaction_code\": \"<string>\"\n }\n ],\n \"exclude\": true,\n \"summary\": {\n \"account_number\": \"<string>\",\n \"bank_name\": \"<string>\",\n \"company\": \"<string>\",\n \"end_balance\": 123,\n \"fraud_reasons\": [\n \"<string>\"\n ],\n \"fraud_score\": 123,\n \"start_balance\": 123,\n \"statement_end_date\": \"2023-11-07T05:31:56Z\",\n \"statement_start_date\": \"2023-11-07T05:31:56Z\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://app.herondata.io/api/integrations/pdfs/{heron_id}/processed")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"index\": 123,\n \"transactions\": [\n {\n \"amount\": 123,\n \"balance\": 123,\n \"bounds\": {\n \"page\": 123,\n \"x_max\": 123,\n \"x_min\": 123,\n \"y_max\": 123,\n \"y_min\": 123\n },\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"ocr_suspect\": true,\n \"reference_id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"transaction_code\": \"<string>\"\n }\n ],\n \"exclude\": true,\n \"summary\": {\n \"account_number\": \"<string>\",\n \"bank_name\": \"<string>\",\n \"company\": \"<string>\",\n \"end_balance\": 123,\n \"fraud_reasons\": [\n \"<string>\"\n ],\n \"fraud_score\": 123,\n \"start_balance\": 123,\n \"statement_end_date\": \"2023-11-07T05:31:56Z\",\n \"statement_start_date\": \"2023-11-07T05:31:56Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.herondata.io/api/integrations/pdfs/{heron_id}/processed")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"index\": 123,\n \"transactions\": [\n {\n \"amount\": 123,\n \"balance\": 123,\n \"bounds\": {\n \"page\": 123,\n \"x_max\": 123,\n \"x_min\": 123,\n \"y_max\": 123,\n \"y_min\": 123\n },\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"ocr_suspect\": true,\n \"reference_id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"transaction_code\": \"<string>\"\n }\n ],\n \"exclude\": true,\n \"summary\": {\n \"account_number\": \"<string>\",\n \"bank_name\": \"<string>\",\n \"company\": \"<string>\",\n \"end_balance\": 123,\n \"fraud_reasons\": [\n \"<string>\"\n ],\n \"fraud_score\": 123,\n \"start_balance\": 123,\n \"statement_end_date\": \"2023-11-07T05:31:56Z\",\n \"statement_start_date\": \"2023-11-07T05:31:56Z\"\n }\n}"
response = http.request(request)
puts response.read_body{
"ok": true
}Authorizations
Path Parameters
heron_id of the pdf
Body
application/json
The index of the statement in the pdf to patch
The full list of transactions that will be used to override the extracted transactions for the specified statement
Show child attributes
Show child attributes
True if the statement should be excluded from processing
Show child attributes
Show child attributes
Response
200 - application/json
Ok
Was this page helpful?
⌘I