curl --request POST \
--url https://east.sandbox.spade.com/transactions/report \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data @- <<EOF
{
"enrichmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorDescription": "Enrichment has an incorrect location. Wrong postal code.",
"incorrectLocation": true,
"incorrectLocationDescription": "The location's city is incorrect.",
"incorrectCategory": false,
"incorrectCategoryDescription": "The category returned is incorrect.",
"incorrectChannel": false,
"incorrectChannelDescription": "The spending channel should have been physical.",
"incorrectCounterparty": false,
"incorrectCounterpartyDescription": "The counterparty is incorrect.",
"incorrectLogo": false,
"incorrectLogoDescription": "The logo shown is outdated.",
"incorrectWebsite": false,
"incorrectWebsiteDescription": "The website redirects to a 404.",
"incorrectPhoneNumber": false,
"incorrectPhoneNumberDescription": "The phone number is disconnected."
}
EOFimport requests
url = "https://east.sandbox.spade.com/transactions/report"
payload = {
"enrichmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorDescription": "Enrichment has an incorrect location. Wrong postal code.",
"incorrectLocation": True,
"incorrectLocationDescription": "The location's city is incorrect.",
"incorrectCategory": False,
"incorrectCategoryDescription": "The category returned is incorrect.",
"incorrectChannel": False,
"incorrectChannelDescription": "The spending channel should have been physical.",
"incorrectCounterparty": False,
"incorrectCounterpartyDescription": "The counterparty is incorrect.",
"incorrectLogo": False,
"incorrectLogoDescription": "The logo shown is outdated.",
"incorrectWebsite": False,
"incorrectWebsiteDescription": "The website redirects to a 404.",
"incorrectPhoneNumber": False,
"incorrectPhoneNumberDescription": "The phone number is disconnected."
}
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({
enrichmentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
errorDescription: 'Enrichment has an incorrect location. Wrong postal code.',
incorrectLocation: true,
incorrectLocationDescription: 'The location\'s city is incorrect.',
incorrectCategory: false,
incorrectCategoryDescription: 'The category returned is incorrect.',
incorrectChannel: false,
incorrectChannelDescription: 'The spending channel should have been physical.',
incorrectCounterparty: false,
incorrectCounterpartyDescription: 'The counterparty is incorrect.',
incorrectLogo: false,
incorrectLogoDescription: 'The logo shown is outdated.',
incorrectWebsite: false,
incorrectWebsiteDescription: 'The website redirects to a 404.',
incorrectPhoneNumber: false,
incorrectPhoneNumberDescription: 'The phone number is disconnected.'
})
};
fetch('https://east.sandbox.spade.com/transactions/report', 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://east.sandbox.spade.com/transactions/report",
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([
'enrichmentId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'errorDescription' => 'Enrichment has an incorrect location. Wrong postal code.',
'incorrectLocation' => true,
'incorrectLocationDescription' => 'The location\'s city is incorrect.',
'incorrectCategory' => false,
'incorrectCategoryDescription' => 'The category returned is incorrect.',
'incorrectChannel' => false,
'incorrectChannelDescription' => 'The spending channel should have been physical.',
'incorrectCounterparty' => false,
'incorrectCounterpartyDescription' => 'The counterparty is incorrect.',
'incorrectLogo' => false,
'incorrectLogoDescription' => 'The logo shown is outdated.',
'incorrectWebsite' => false,
'incorrectWebsiteDescription' => 'The website redirects to a 404.',
'incorrectPhoneNumber' => false,
'incorrectPhoneNumberDescription' => 'The phone number is disconnected.'
]),
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://east.sandbox.spade.com/transactions/report"
payload := strings.NewReader("{\n \"enrichmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"errorDescription\": \"Enrichment has an incorrect location. Wrong postal code.\",\n \"incorrectLocation\": true,\n \"incorrectLocationDescription\": \"The location's city is incorrect.\",\n \"incorrectCategory\": false,\n \"incorrectCategoryDescription\": \"The category returned is incorrect.\",\n \"incorrectChannel\": false,\n \"incorrectChannelDescription\": \"The spending channel should have been physical.\",\n \"incorrectCounterparty\": false,\n \"incorrectCounterpartyDescription\": \"The counterparty is incorrect.\",\n \"incorrectLogo\": false,\n \"incorrectLogoDescription\": \"The logo shown is outdated.\",\n \"incorrectWebsite\": false,\n \"incorrectWebsiteDescription\": \"The website redirects to a 404.\",\n \"incorrectPhoneNumber\": false,\n \"incorrectPhoneNumberDescription\": \"The phone number is disconnected.\"\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://east.sandbox.spade.com/transactions/report")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"enrichmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"errorDescription\": \"Enrichment has an incorrect location. Wrong postal code.\",\n \"incorrectLocation\": true,\n \"incorrectLocationDescription\": \"The location's city is incorrect.\",\n \"incorrectCategory\": false,\n \"incorrectCategoryDescription\": \"The category returned is incorrect.\",\n \"incorrectChannel\": false,\n \"incorrectChannelDescription\": \"The spending channel should have been physical.\",\n \"incorrectCounterparty\": false,\n \"incorrectCounterpartyDescription\": \"The counterparty is incorrect.\",\n \"incorrectLogo\": false,\n \"incorrectLogoDescription\": \"The logo shown is outdated.\",\n \"incorrectWebsite\": false,\n \"incorrectWebsiteDescription\": \"The website redirects to a 404.\",\n \"incorrectPhoneNumber\": false,\n \"incorrectPhoneNumberDescription\": \"The phone number is disconnected.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://east.sandbox.spade.com/transactions/report")
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 \"enrichmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"errorDescription\": \"Enrichment has an incorrect location. Wrong postal code.\",\n \"incorrectLocation\": true,\n \"incorrectLocationDescription\": \"The location's city is incorrect.\",\n \"incorrectCategory\": false,\n \"incorrectCategoryDescription\": \"The category returned is incorrect.\",\n \"incorrectChannel\": false,\n \"incorrectChannelDescription\": \"The spending channel should have been physical.\",\n \"incorrectCounterparty\": false,\n \"incorrectCounterpartyDescription\": \"The counterparty is incorrect.\",\n \"incorrectLogo\": false,\n \"incorrectLogoDescription\": \"The logo shown is outdated.\",\n \"incorrectWebsite\": false,\n \"incorrectWebsiteDescription\": \"The website redirects to a 404.\",\n \"incorrectPhoneNumber\": false,\n \"incorrectPhoneNumberDescription\": \"The phone number is disconnected.\"\n}"
response = http.request(request)
puts response.read_body{
"errorReportId": "8e21c6a4-2f3d-4b7a-9c1e-5d6f0a9b7c3e",
"details": "Enrichment Successfully Reported."
}{
"invalidField": [
"This field is required."
]
}{
"details": "Incorrect authentication credentials."
}{
"details": "Internal server error."
}Report a card enrichment as incorrect
Endpoint to report a card enrichment as incorrect. An enrichmentId and an errorDescription are required fields to report an enrichment. Optional request fields such as incorrectLocation, incorrectLocationDescription, incorrectCategory, incorrectCategoryDescription, incorrectChannel, incorrectChannelDescription, incorrectCounterparty, incorrectCounterpartyDescription, incorrectLogo, incorrectLogoDescription, incorrectWebsite, incorrectWebsiteDescription, incorrectPhoneNumber, and incorrectPhoneNumberDescription, can be set to indicate what needs to be addressed in the enrichment. Once a report has been addressed, you will receive a corrected enrichment via a callback url you set with Spade. See the callback section to learn more on how we send back a corrected enrichment.
curl --request POST \
--url https://east.sandbox.spade.com/transactions/report \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data @- <<EOF
{
"enrichmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorDescription": "Enrichment has an incorrect location. Wrong postal code.",
"incorrectLocation": true,
"incorrectLocationDescription": "The location's city is incorrect.",
"incorrectCategory": false,
"incorrectCategoryDescription": "The category returned is incorrect.",
"incorrectChannel": false,
"incorrectChannelDescription": "The spending channel should have been physical.",
"incorrectCounterparty": false,
"incorrectCounterpartyDescription": "The counterparty is incorrect.",
"incorrectLogo": false,
"incorrectLogoDescription": "The logo shown is outdated.",
"incorrectWebsite": false,
"incorrectWebsiteDescription": "The website redirects to a 404.",
"incorrectPhoneNumber": false,
"incorrectPhoneNumberDescription": "The phone number is disconnected."
}
EOFimport requests
url = "https://east.sandbox.spade.com/transactions/report"
payload = {
"enrichmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorDescription": "Enrichment has an incorrect location. Wrong postal code.",
"incorrectLocation": True,
"incorrectLocationDescription": "The location's city is incorrect.",
"incorrectCategory": False,
"incorrectCategoryDescription": "The category returned is incorrect.",
"incorrectChannel": False,
"incorrectChannelDescription": "The spending channel should have been physical.",
"incorrectCounterparty": False,
"incorrectCounterpartyDescription": "The counterparty is incorrect.",
"incorrectLogo": False,
"incorrectLogoDescription": "The logo shown is outdated.",
"incorrectWebsite": False,
"incorrectWebsiteDescription": "The website redirects to a 404.",
"incorrectPhoneNumber": False,
"incorrectPhoneNumberDescription": "The phone number is disconnected."
}
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({
enrichmentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
errorDescription: 'Enrichment has an incorrect location. Wrong postal code.',
incorrectLocation: true,
incorrectLocationDescription: 'The location\'s city is incorrect.',
incorrectCategory: false,
incorrectCategoryDescription: 'The category returned is incorrect.',
incorrectChannel: false,
incorrectChannelDescription: 'The spending channel should have been physical.',
incorrectCounterparty: false,
incorrectCounterpartyDescription: 'The counterparty is incorrect.',
incorrectLogo: false,
incorrectLogoDescription: 'The logo shown is outdated.',
incorrectWebsite: false,
incorrectWebsiteDescription: 'The website redirects to a 404.',
incorrectPhoneNumber: false,
incorrectPhoneNumberDescription: 'The phone number is disconnected.'
})
};
fetch('https://east.sandbox.spade.com/transactions/report', 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://east.sandbox.spade.com/transactions/report",
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([
'enrichmentId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'errorDescription' => 'Enrichment has an incorrect location. Wrong postal code.',
'incorrectLocation' => true,
'incorrectLocationDescription' => 'The location\'s city is incorrect.',
'incorrectCategory' => false,
'incorrectCategoryDescription' => 'The category returned is incorrect.',
'incorrectChannel' => false,
'incorrectChannelDescription' => 'The spending channel should have been physical.',
'incorrectCounterparty' => false,
'incorrectCounterpartyDescription' => 'The counterparty is incorrect.',
'incorrectLogo' => false,
'incorrectLogoDescription' => 'The logo shown is outdated.',
'incorrectWebsite' => false,
'incorrectWebsiteDescription' => 'The website redirects to a 404.',
'incorrectPhoneNumber' => false,
'incorrectPhoneNumberDescription' => 'The phone number is disconnected.'
]),
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://east.sandbox.spade.com/transactions/report"
payload := strings.NewReader("{\n \"enrichmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"errorDescription\": \"Enrichment has an incorrect location. Wrong postal code.\",\n \"incorrectLocation\": true,\n \"incorrectLocationDescription\": \"The location's city is incorrect.\",\n \"incorrectCategory\": false,\n \"incorrectCategoryDescription\": \"The category returned is incorrect.\",\n \"incorrectChannel\": false,\n \"incorrectChannelDescription\": \"The spending channel should have been physical.\",\n \"incorrectCounterparty\": false,\n \"incorrectCounterpartyDescription\": \"The counterparty is incorrect.\",\n \"incorrectLogo\": false,\n \"incorrectLogoDescription\": \"The logo shown is outdated.\",\n \"incorrectWebsite\": false,\n \"incorrectWebsiteDescription\": \"The website redirects to a 404.\",\n \"incorrectPhoneNumber\": false,\n \"incorrectPhoneNumberDescription\": \"The phone number is disconnected.\"\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://east.sandbox.spade.com/transactions/report")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"enrichmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"errorDescription\": \"Enrichment has an incorrect location. Wrong postal code.\",\n \"incorrectLocation\": true,\n \"incorrectLocationDescription\": \"The location's city is incorrect.\",\n \"incorrectCategory\": false,\n \"incorrectCategoryDescription\": \"The category returned is incorrect.\",\n \"incorrectChannel\": false,\n \"incorrectChannelDescription\": \"The spending channel should have been physical.\",\n \"incorrectCounterparty\": false,\n \"incorrectCounterpartyDescription\": \"The counterparty is incorrect.\",\n \"incorrectLogo\": false,\n \"incorrectLogoDescription\": \"The logo shown is outdated.\",\n \"incorrectWebsite\": false,\n \"incorrectWebsiteDescription\": \"The website redirects to a 404.\",\n \"incorrectPhoneNumber\": false,\n \"incorrectPhoneNumberDescription\": \"The phone number is disconnected.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://east.sandbox.spade.com/transactions/report")
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 \"enrichmentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"errorDescription\": \"Enrichment has an incorrect location. Wrong postal code.\",\n \"incorrectLocation\": true,\n \"incorrectLocationDescription\": \"The location's city is incorrect.\",\n \"incorrectCategory\": false,\n \"incorrectCategoryDescription\": \"The category returned is incorrect.\",\n \"incorrectChannel\": false,\n \"incorrectChannelDescription\": \"The spending channel should have been physical.\",\n \"incorrectCounterparty\": false,\n \"incorrectCounterpartyDescription\": \"The counterparty is incorrect.\",\n \"incorrectLogo\": false,\n \"incorrectLogoDescription\": \"The logo shown is outdated.\",\n \"incorrectWebsite\": false,\n \"incorrectWebsiteDescription\": \"The website redirects to a 404.\",\n \"incorrectPhoneNumber\": false,\n \"incorrectPhoneNumberDescription\": \"The phone number is disconnected.\"\n}"
response = http.request(request)
puts response.read_body{
"errorReportId": "8e21c6a4-2f3d-4b7a-9c1e-5d6f0a9b7c3e",
"details": "Enrichment Successfully Reported."
}{
"invalidField": [
"This field is required."
]
}{
"details": "Incorrect authentication credentials."
}{
"details": "Internal server error."
}Body
Schema for reporting an enriched transaction.
Callbacks
POSThttps://example.com/your/callback/endpointCorrectedEnrichment
Body
Outcome of a reviewed error report, delivered via the callback configured with Spade. Carries the enrichment response fields at the top level, in the same shape as the original card enrichment response, alongside fields describing the report's outcome.
An array of triggered actions, or null if no triggers matched.
This field is only present if your integration has the actions feature enabled.
When a transaction matches one or more registered triggers, this array contains the action details including your custom action data.
Show child attributes
Show child attributes
[
{
"id": "trigger-12345",
"type": "merchant_trigger",
"action": { "type": "REWARD", "rewardPercent": 5 },
"scope": "account",
"source": "counterparty"
}
]
Response
Your server returns this code if it accepts the callback

