curl --request POST \
--url https://east.sandbox.spade.com/batches/transactions/transfers/enrich \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"transactions": [
{
"userId": "user_id_123456789",
"transactionId": "transaction_id_123456789",
"transactionType": "ACH_DEPOSIT",
"description": "AMAZON CORP SYF PAYMNT",
"amount": "283.78",
"currencyCode": "USD",
"occurredAt": "2022-06-15 18:27:51Z",
"organizationId": "organization_id_123",
"accountId": "account_id_123456789",
"transactionTypeDescription": "ACH Withdrawal",
"alternateDescription": "AMAZON CORP",
"memo": "100 PUBLIC SQUARE CLEVELAND OH",
"direction": "CREDIT",
"billingProfile": "standard",
"customAttributes": {
"custom_attribute_1": "value_1",
"custom_attribute_2": "value_2"
}
}
],
"callbackUrl": "https://example.com/callback"
}
'import requests
url = "https://east.sandbox.spade.com/batches/transactions/transfers/enrich"
payload = {
"transactions": [
{
"userId": "user_id_123456789",
"transactionId": "transaction_id_123456789",
"transactionType": "ACH_DEPOSIT",
"description": "AMAZON CORP SYF PAYMNT",
"amount": "283.78",
"currencyCode": "USD",
"occurredAt": "2022-06-15 18:27:51Z",
"organizationId": "organization_id_123",
"accountId": "account_id_123456789",
"transactionTypeDescription": "ACH Withdrawal",
"alternateDescription": "AMAZON CORP",
"memo": "100 PUBLIC SQUARE CLEVELAND OH",
"direction": "CREDIT",
"billingProfile": "standard",
"customAttributes": {
"custom_attribute_1": "value_1",
"custom_attribute_2": "value_2"
}
}
],
"callbackUrl": "https://example.com/callback"
}
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: [
{
userId: 'user_id_123456789',
transactionId: 'transaction_id_123456789',
transactionType: 'ACH_DEPOSIT',
description: 'AMAZON CORP SYF PAYMNT',
amount: '283.78',
currencyCode: 'USD',
occurredAt: '2022-06-15 18:27:51Z',
organizationId: 'organization_id_123',
accountId: 'account_id_123456789',
transactionTypeDescription: 'ACH Withdrawal',
alternateDescription: 'AMAZON CORP',
memo: '100 PUBLIC SQUARE CLEVELAND OH',
direction: 'CREDIT',
billingProfile: 'standard',
customAttributes: {custom_attribute_1: 'value_1', custom_attribute_2: 'value_2'}
}
],
callbackUrl: 'https://example.com/callback'
})
};
fetch('https://east.sandbox.spade.com/batches/transactions/transfers/enrich', 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/batches/transactions/transfers/enrich",
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' => [
[
'userId' => 'user_id_123456789',
'transactionId' => 'transaction_id_123456789',
'transactionType' => 'ACH_DEPOSIT',
'description' => 'AMAZON CORP SYF PAYMNT',
'amount' => '283.78',
'currencyCode' => 'USD',
'occurredAt' => '2022-06-15 18:27:51Z',
'organizationId' => 'organization_id_123',
'accountId' => 'account_id_123456789',
'transactionTypeDescription' => 'ACH Withdrawal',
'alternateDescription' => 'AMAZON CORP',
'memo' => '100 PUBLIC SQUARE CLEVELAND OH',
'direction' => 'CREDIT',
'billingProfile' => 'standard',
'customAttributes' => [
'custom_attribute_1' => 'value_1',
'custom_attribute_2' => 'value_2'
]
]
],
'callbackUrl' => 'https://example.com/callback'
]),
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/batches/transactions/transfers/enrich"
payload := strings.NewReader("{\n \"transactions\": [\n {\n \"userId\": \"user_id_123456789\",\n \"transactionId\": \"transaction_id_123456789\",\n \"transactionType\": \"ACH_DEPOSIT\",\n \"description\": \"AMAZON CORP SYF PAYMNT\",\n \"amount\": \"283.78\",\n \"currencyCode\": \"USD\",\n \"occurredAt\": \"2022-06-15 18:27:51Z\",\n \"organizationId\": \"organization_id_123\",\n \"accountId\": \"account_id_123456789\",\n \"transactionTypeDescription\": \"ACH Withdrawal\",\n \"alternateDescription\": \"AMAZON CORP\",\n \"memo\": \"100 PUBLIC SQUARE CLEVELAND OH\",\n \"direction\": \"CREDIT\",\n \"billingProfile\": \"standard\",\n \"customAttributes\": {\n \"custom_attribute_1\": \"value_1\",\n \"custom_attribute_2\": \"value_2\"\n }\n }\n ],\n \"callbackUrl\": \"https://example.com/callback\"\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/batches/transactions/transfers/enrich")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"transactions\": [\n {\n \"userId\": \"user_id_123456789\",\n \"transactionId\": \"transaction_id_123456789\",\n \"transactionType\": \"ACH_DEPOSIT\",\n \"description\": \"AMAZON CORP SYF PAYMNT\",\n \"amount\": \"283.78\",\n \"currencyCode\": \"USD\",\n \"occurredAt\": \"2022-06-15 18:27:51Z\",\n \"organizationId\": \"organization_id_123\",\n \"accountId\": \"account_id_123456789\",\n \"transactionTypeDescription\": \"ACH Withdrawal\",\n \"alternateDescription\": \"AMAZON CORP\",\n \"memo\": \"100 PUBLIC SQUARE CLEVELAND OH\",\n \"direction\": \"CREDIT\",\n \"billingProfile\": \"standard\",\n \"customAttributes\": {\n \"custom_attribute_1\": \"value_1\",\n \"custom_attribute_2\": \"value_2\"\n }\n }\n ],\n \"callbackUrl\": \"https://example.com/callback\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://east.sandbox.spade.com/batches/transactions/transfers/enrich")
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 \"userId\": \"user_id_123456789\",\n \"transactionId\": \"transaction_id_123456789\",\n \"transactionType\": \"ACH_DEPOSIT\",\n \"description\": \"AMAZON CORP SYF PAYMNT\",\n \"amount\": \"283.78\",\n \"currencyCode\": \"USD\",\n \"occurredAt\": \"2022-06-15 18:27:51Z\",\n \"organizationId\": \"organization_id_123\",\n \"accountId\": \"account_id_123456789\",\n \"transactionTypeDescription\": \"ACH Withdrawal\",\n \"alternateDescription\": \"AMAZON CORP\",\n \"memo\": \"100 PUBLIC SQUARE CLEVELAND OH\",\n \"direction\": \"CREDIT\",\n \"billingProfile\": \"standard\",\n \"customAttributes\": {\n \"custom_attribute_1\": \"value_1\",\n \"custom_attribute_2\": \"value_2\"\n }\n }\n ],\n \"callbackUrl\": \"https://example.com/callback\"\n}"
response = http.request(request)
puts response.read_body{
"batchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"batchSize": 1,
"submittedAt": "2024-11-21T20:07:20.213660Z"
}{
"invalidField": [
"This field is required."
]
}{
"details": "Incorrect authentication credentials."
}{
"details": "Internal server error."
}Enrich a batch of transfers
Submit a batch of transfers for enrichment.
This endpoint will return a batchId which can be used in the /batches/{batchId} and /batches/{batchId}/results
endpoints to check the status of the batch job and retrieve the results.
You can pass ?synchronous=true to enrich smaller sets of transactions synchronously. See the Microbatch enrichment guide for details.
Note that we impose a rate limit on the number of batch requests made in a rolling 12 hour window. Please reach out to sales@spade.com with any questions.
curl --request POST \
--url https://east.sandbox.spade.com/batches/transactions/transfers/enrich \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"transactions": [
{
"userId": "user_id_123456789",
"transactionId": "transaction_id_123456789",
"transactionType": "ACH_DEPOSIT",
"description": "AMAZON CORP SYF PAYMNT",
"amount": "283.78",
"currencyCode": "USD",
"occurredAt": "2022-06-15 18:27:51Z",
"organizationId": "organization_id_123",
"accountId": "account_id_123456789",
"transactionTypeDescription": "ACH Withdrawal",
"alternateDescription": "AMAZON CORP",
"memo": "100 PUBLIC SQUARE CLEVELAND OH",
"direction": "CREDIT",
"billingProfile": "standard",
"customAttributes": {
"custom_attribute_1": "value_1",
"custom_attribute_2": "value_2"
}
}
],
"callbackUrl": "https://example.com/callback"
}
'import requests
url = "https://east.sandbox.spade.com/batches/transactions/transfers/enrich"
payload = {
"transactions": [
{
"userId": "user_id_123456789",
"transactionId": "transaction_id_123456789",
"transactionType": "ACH_DEPOSIT",
"description": "AMAZON CORP SYF PAYMNT",
"amount": "283.78",
"currencyCode": "USD",
"occurredAt": "2022-06-15 18:27:51Z",
"organizationId": "organization_id_123",
"accountId": "account_id_123456789",
"transactionTypeDescription": "ACH Withdrawal",
"alternateDescription": "AMAZON CORP",
"memo": "100 PUBLIC SQUARE CLEVELAND OH",
"direction": "CREDIT",
"billingProfile": "standard",
"customAttributes": {
"custom_attribute_1": "value_1",
"custom_attribute_2": "value_2"
}
}
],
"callbackUrl": "https://example.com/callback"
}
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: [
{
userId: 'user_id_123456789',
transactionId: 'transaction_id_123456789',
transactionType: 'ACH_DEPOSIT',
description: 'AMAZON CORP SYF PAYMNT',
amount: '283.78',
currencyCode: 'USD',
occurredAt: '2022-06-15 18:27:51Z',
organizationId: 'organization_id_123',
accountId: 'account_id_123456789',
transactionTypeDescription: 'ACH Withdrawal',
alternateDescription: 'AMAZON CORP',
memo: '100 PUBLIC SQUARE CLEVELAND OH',
direction: 'CREDIT',
billingProfile: 'standard',
customAttributes: {custom_attribute_1: 'value_1', custom_attribute_2: 'value_2'}
}
],
callbackUrl: 'https://example.com/callback'
})
};
fetch('https://east.sandbox.spade.com/batches/transactions/transfers/enrich', 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/batches/transactions/transfers/enrich",
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' => [
[
'userId' => 'user_id_123456789',
'transactionId' => 'transaction_id_123456789',
'transactionType' => 'ACH_DEPOSIT',
'description' => 'AMAZON CORP SYF PAYMNT',
'amount' => '283.78',
'currencyCode' => 'USD',
'occurredAt' => '2022-06-15 18:27:51Z',
'organizationId' => 'organization_id_123',
'accountId' => 'account_id_123456789',
'transactionTypeDescription' => 'ACH Withdrawal',
'alternateDescription' => 'AMAZON CORP',
'memo' => '100 PUBLIC SQUARE CLEVELAND OH',
'direction' => 'CREDIT',
'billingProfile' => 'standard',
'customAttributes' => [
'custom_attribute_1' => 'value_1',
'custom_attribute_2' => 'value_2'
]
]
],
'callbackUrl' => 'https://example.com/callback'
]),
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/batches/transactions/transfers/enrich"
payload := strings.NewReader("{\n \"transactions\": [\n {\n \"userId\": \"user_id_123456789\",\n \"transactionId\": \"transaction_id_123456789\",\n \"transactionType\": \"ACH_DEPOSIT\",\n \"description\": \"AMAZON CORP SYF PAYMNT\",\n \"amount\": \"283.78\",\n \"currencyCode\": \"USD\",\n \"occurredAt\": \"2022-06-15 18:27:51Z\",\n \"organizationId\": \"organization_id_123\",\n \"accountId\": \"account_id_123456789\",\n \"transactionTypeDescription\": \"ACH Withdrawal\",\n \"alternateDescription\": \"AMAZON CORP\",\n \"memo\": \"100 PUBLIC SQUARE CLEVELAND OH\",\n \"direction\": \"CREDIT\",\n \"billingProfile\": \"standard\",\n \"customAttributes\": {\n \"custom_attribute_1\": \"value_1\",\n \"custom_attribute_2\": \"value_2\"\n }\n }\n ],\n \"callbackUrl\": \"https://example.com/callback\"\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/batches/transactions/transfers/enrich")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"transactions\": [\n {\n \"userId\": \"user_id_123456789\",\n \"transactionId\": \"transaction_id_123456789\",\n \"transactionType\": \"ACH_DEPOSIT\",\n \"description\": \"AMAZON CORP SYF PAYMNT\",\n \"amount\": \"283.78\",\n \"currencyCode\": \"USD\",\n \"occurredAt\": \"2022-06-15 18:27:51Z\",\n \"organizationId\": \"organization_id_123\",\n \"accountId\": \"account_id_123456789\",\n \"transactionTypeDescription\": \"ACH Withdrawal\",\n \"alternateDescription\": \"AMAZON CORP\",\n \"memo\": \"100 PUBLIC SQUARE CLEVELAND OH\",\n \"direction\": \"CREDIT\",\n \"billingProfile\": \"standard\",\n \"customAttributes\": {\n \"custom_attribute_1\": \"value_1\",\n \"custom_attribute_2\": \"value_2\"\n }\n }\n ],\n \"callbackUrl\": \"https://example.com/callback\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://east.sandbox.spade.com/batches/transactions/transfers/enrich")
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 \"userId\": \"user_id_123456789\",\n \"transactionId\": \"transaction_id_123456789\",\n \"transactionType\": \"ACH_DEPOSIT\",\n \"description\": \"AMAZON CORP SYF PAYMNT\",\n \"amount\": \"283.78\",\n \"currencyCode\": \"USD\",\n \"occurredAt\": \"2022-06-15 18:27:51Z\",\n \"organizationId\": \"organization_id_123\",\n \"accountId\": \"account_id_123456789\",\n \"transactionTypeDescription\": \"ACH Withdrawal\",\n \"alternateDescription\": \"AMAZON CORP\",\n \"memo\": \"100 PUBLIC SQUARE CLEVELAND OH\",\n \"direction\": \"CREDIT\",\n \"billingProfile\": \"standard\",\n \"customAttributes\": {\n \"custom_attribute_1\": \"value_1\",\n \"custom_attribute_2\": \"value_2\"\n }\n }\n ],\n \"callbackUrl\": \"https://example.com/callback\"\n}"
response = http.request(request)
puts response.read_body{
"batchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"batchSize": 1,
"submittedAt": "2024-11-21T20:07:20.213660Z"
}{
"invalidField": [
"This field is required."
]
}{
"details": "Incorrect authentication credentials."
}{
"details": "Internal server error."
}Authorizations
Query Parameters
When true, returns enriched results inline in the response instead of a batchId. Microbatches are capped to ensure timely processing. See the Microbatch enrichment guide for details.
Body
An array of transactions to enrich. Each transaction must have a unique transactionId. Maximum 50,000 transactions.
50000Show child attributes
Show child attributes
The URL to call when the batch job is complete.
"https://example.com/callback"
Callbacks
Response
Successful operation
- Option 1
- Transfer Enrichment Microbatch Results
Unique identifier for the batch job
Current status of the batch job
pending, running, completed, failed Number of transactions in the batch
x >= 11
Timestamp of when the batch was submitted
"2024-11-21T20:07:20.213660Z"

