Create category, merchant feedback
curl --request PUT \
--url https://app.herondata.io/api/transactions/{heron_id}/feedback \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"transaction": {
"category": {
"heron_id": "ctg_SCDfepKXJ7UBX9FRdT6iPM",
"label": "Insurance"
},
"merchant": {
"heron_id": "mrc_XzS8oncUAaLMhLmwNh6dp7",
"is_correct": false,
"name": "Spotify"
},
"source": "<string>"
}
}
'import requests
url = "https://app.herondata.io/api/transactions/{heron_id}/feedback"
payload = { "transaction": {
"category": {
"heron_id": "ctg_SCDfepKXJ7UBX9FRdT6iPM",
"label": "Insurance"
},
"merchant": {
"heron_id": "mrc_XzS8oncUAaLMhLmwNh6dp7",
"is_correct": False,
"name": "Spotify"
},
"source": "<string>"
} }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
transaction: {
category: {heron_id: 'ctg_SCDfepKXJ7UBX9FRdT6iPM', label: 'Insurance'},
merchant: {heron_id: 'mrc_XzS8oncUAaLMhLmwNh6dp7', is_correct: false, name: 'Spotify'},
source: '<string>'
}
})
};
fetch('https://app.herondata.io/api/transactions/{heron_id}/feedback', 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/{heron_id}/feedback",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'transaction' => [
'category' => [
'heron_id' => 'ctg_SCDfepKXJ7UBX9FRdT6iPM',
'label' => 'Insurance'
],
'merchant' => [
'heron_id' => 'mrc_XzS8oncUAaLMhLmwNh6dp7',
'is_correct' => false,
'name' => 'Spotify'
],
'source' => '<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/transactions/{heron_id}/feedback"
payload := strings.NewReader("{\n \"transaction\": {\n \"category\": {\n \"heron_id\": \"ctg_SCDfepKXJ7UBX9FRdT6iPM\",\n \"label\": \"Insurance\"\n },\n \"merchant\": {\n \"heron_id\": \"mrc_XzS8oncUAaLMhLmwNh6dp7\",\n \"is_correct\": false,\n \"name\": \"Spotify\"\n },\n \"source\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app.herondata.io/api/transactions/{heron_id}/feedback")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"transaction\": {\n \"category\": {\n \"heron_id\": \"ctg_SCDfepKXJ7UBX9FRdT6iPM\",\n \"label\": \"Insurance\"\n },\n \"merchant\": {\n \"heron_id\": \"mrc_XzS8oncUAaLMhLmwNh6dp7\",\n \"is_correct\": false,\n \"name\": \"Spotify\"\n },\n \"source\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.herondata.io/api/transactions/{heron_id}/feedback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"transaction\": {\n \"category\": {\n \"heron_id\": \"ctg_SCDfepKXJ7UBX9FRdT6iPM\",\n \"label\": \"Insurance\"\n },\n \"merchant\": {\n \"heron_id\": \"mrc_XzS8oncUAaLMhLmwNh6dp7\",\n \"is_correct\": false,\n \"name\": \"Spotify\"\n },\n \"source\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_bodyEnrichmentFeedback
Create category, merchant feedback
Provide feedback on a Transaction’s Categories and Merchants
PUT
/
api
/
transactions
/
{heron_id}
/
feedback
Create category, merchant feedback
curl --request PUT \
--url https://app.herondata.io/api/transactions/{heron_id}/feedback \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"transaction": {
"category": {
"heron_id": "ctg_SCDfepKXJ7UBX9FRdT6iPM",
"label": "Insurance"
},
"merchant": {
"heron_id": "mrc_XzS8oncUAaLMhLmwNh6dp7",
"is_correct": false,
"name": "Spotify"
},
"source": "<string>"
}
}
'import requests
url = "https://app.herondata.io/api/transactions/{heron_id}/feedback"
payload = { "transaction": {
"category": {
"heron_id": "ctg_SCDfepKXJ7UBX9FRdT6iPM",
"label": "Insurance"
},
"merchant": {
"heron_id": "mrc_XzS8oncUAaLMhLmwNh6dp7",
"is_correct": False,
"name": "Spotify"
},
"source": "<string>"
} }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
transaction: {
category: {heron_id: 'ctg_SCDfepKXJ7UBX9FRdT6iPM', label: 'Insurance'},
merchant: {heron_id: 'mrc_XzS8oncUAaLMhLmwNh6dp7', is_correct: false, name: 'Spotify'},
source: '<string>'
}
})
};
fetch('https://app.herondata.io/api/transactions/{heron_id}/feedback', 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/{heron_id}/feedback",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'transaction' => [
'category' => [
'heron_id' => 'ctg_SCDfepKXJ7UBX9FRdT6iPM',
'label' => 'Insurance'
],
'merchant' => [
'heron_id' => 'mrc_XzS8oncUAaLMhLmwNh6dp7',
'is_correct' => false,
'name' => 'Spotify'
],
'source' => '<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/transactions/{heron_id}/feedback"
payload := strings.NewReader("{\n \"transaction\": {\n \"category\": {\n \"heron_id\": \"ctg_SCDfepKXJ7UBX9FRdT6iPM\",\n \"label\": \"Insurance\"\n },\n \"merchant\": {\n \"heron_id\": \"mrc_XzS8oncUAaLMhLmwNh6dp7\",\n \"is_correct\": false,\n \"name\": \"Spotify\"\n },\n \"source\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app.herondata.io/api/transactions/{heron_id}/feedback")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"transaction\": {\n \"category\": {\n \"heron_id\": \"ctg_SCDfepKXJ7UBX9FRdT6iPM\",\n \"label\": \"Insurance\"\n },\n \"merchant\": {\n \"heron_id\": \"mrc_XzS8oncUAaLMhLmwNh6dp7\",\n \"is_correct\": false,\n \"name\": \"Spotify\"\n },\n \"source\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.herondata.io/api/transactions/{heron_id}/feedback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"transaction\": {\n \"category\": {\n \"heron_id\": \"ctg_SCDfepKXJ7UBX9FRdT6iPM\",\n \"label\": \"Insurance\"\n },\n \"merchant\": {\n \"heron_id\": \"mrc_XzS8oncUAaLMhLmwNh6dp7\",\n \"is_correct\": false,\n \"name\": \"Spotify\"\n },\n \"source\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Path Parameters
Transaction heron_id
Body
application/json
A partial Transaction object with the suggested Category and/or Merchant. If you provide a heron_id for Category or Merchant, you don't need to provide other fields. If you don't know the Merchant heron_id nor name, you can just send the is_correct boolean. If heron_id is provided, we disregard name and label. If is_correct is set to true, we disregard all other Merchant fields.
Show child attributes
Show child attributes
Response
OK
Was this page helpful?
⌘I