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": "<string>",
"transactionId": "transaction_id_123456789",
"transactionType": "<string>",
"description": "<string>",
"amount": 123,
"currencyCode": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"organizationId": "<string>",
"accountId": "<string>",
"transactionTypeDescription": "<string>",
"alternateDescription": "<string>",
"memo": "<string>",
"customAttributes": {}
}
],
"callbackUrl": "<string>"
}
'import requests
url = "https://east.sandbox.spade.com/batches/transactions/transfers/enrich"
payload = {
"transactions": [
{
"userId": "<string>",
"transactionId": "transaction_id_123456789",
"transactionType": "<string>",
"description": "<string>",
"amount": 123,
"currencyCode": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"organizationId": "<string>",
"accountId": "<string>",
"transactionTypeDescription": "<string>",
"alternateDescription": "<string>",
"memo": "<string>",
"customAttributes": {}
}
],
"callbackUrl": "<string>"
}
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: '<string>',
transactionId: 'transaction_id_123456789',
transactionType: '<string>',
description: '<string>',
amount: 123,
currencyCode: '<string>',
occurredAt: '2023-11-07T05:31:56Z',
organizationId: '<string>',
accountId: '<string>',
transactionTypeDescription: '<string>',
alternateDescription: '<string>',
memo: '<string>',
customAttributes: {}
}
],
callbackUrl: '<string>'
})
};
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' => '<string>',
'transactionId' => 'transaction_id_123456789',
'transactionType' => '<string>',
'description' => '<string>',
'amount' => 123,
'currencyCode' => '<string>',
'occurredAt' => '2023-11-07T05:31:56Z',
'organizationId' => '<string>',
'accountId' => '<string>',
'transactionTypeDescription' => '<string>',
'alternateDescription' => '<string>',
'memo' => '<string>',
'customAttributes' => [
]
]
],
'callbackUrl' => '<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://east.sandbox.spade.com/batches/transactions/transfers/enrich"
payload := strings.NewReader("{\n \"transactions\": [\n {\n \"userId\": \"<string>\",\n \"transactionId\": \"transaction_id_123456789\",\n \"transactionType\": \"<string>\",\n \"description\": \"<string>\",\n \"amount\": 123,\n \"currencyCode\": \"<string>\",\n \"occurredAt\": \"2023-11-07T05:31:56Z\",\n \"organizationId\": \"<string>\",\n \"accountId\": \"<string>\",\n \"transactionTypeDescription\": \"<string>\",\n \"alternateDescription\": \"<string>\",\n \"memo\": \"<string>\",\n \"customAttributes\": {}\n }\n ],\n \"callbackUrl\": \"<string>\"\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\": \"<string>\",\n \"transactionId\": \"transaction_id_123456789\",\n \"transactionType\": \"<string>\",\n \"description\": \"<string>\",\n \"amount\": 123,\n \"currencyCode\": \"<string>\",\n \"occurredAt\": \"2023-11-07T05:31:56Z\",\n \"organizationId\": \"<string>\",\n \"accountId\": \"<string>\",\n \"transactionTypeDescription\": \"<string>\",\n \"alternateDescription\": \"<string>\",\n \"memo\": \"<string>\",\n \"customAttributes\": {}\n }\n ],\n \"callbackUrl\": \"<string>\"\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\": \"<string>\",\n \"transactionId\": \"transaction_id_123456789\",\n \"transactionType\": \"<string>\",\n \"description\": \"<string>\",\n \"amount\": 123,\n \"currencyCode\": \"<string>\",\n \"occurredAt\": \"2023-11-07T05:31:56Z\",\n \"organizationId\": \"<string>\",\n \"accountId\": \"<string>\",\n \"transactionTypeDescription\": \"<string>\",\n \"alternateDescription\": \"<string>\",\n \"memo\": \"<string>\",\n \"customAttributes\": {}\n }\n ],\n \"callbackUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"batchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"batchSize": 2,
"submittedAt": "2023-11-07T05:31:56Z"
}{
"invalidField": [
"<string>"
]
}{
"details": "<string>"
}{
"details": "<string>"
}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": "<string>",
"transactionId": "transaction_id_123456789",
"transactionType": "<string>",
"description": "<string>",
"amount": 123,
"currencyCode": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"organizationId": "<string>",
"accountId": "<string>",
"transactionTypeDescription": "<string>",
"alternateDescription": "<string>",
"memo": "<string>",
"customAttributes": {}
}
],
"callbackUrl": "<string>"
}
'import requests
url = "https://east.sandbox.spade.com/batches/transactions/transfers/enrich"
payload = {
"transactions": [
{
"userId": "<string>",
"transactionId": "transaction_id_123456789",
"transactionType": "<string>",
"description": "<string>",
"amount": 123,
"currencyCode": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"organizationId": "<string>",
"accountId": "<string>",
"transactionTypeDescription": "<string>",
"alternateDescription": "<string>",
"memo": "<string>",
"customAttributes": {}
}
],
"callbackUrl": "<string>"
}
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: '<string>',
transactionId: 'transaction_id_123456789',
transactionType: '<string>',
description: '<string>',
amount: 123,
currencyCode: '<string>',
occurredAt: '2023-11-07T05:31:56Z',
organizationId: '<string>',
accountId: '<string>',
transactionTypeDescription: '<string>',
alternateDescription: '<string>',
memo: '<string>',
customAttributes: {}
}
],
callbackUrl: '<string>'
})
};
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' => '<string>',
'transactionId' => 'transaction_id_123456789',
'transactionType' => '<string>',
'description' => '<string>',
'amount' => 123,
'currencyCode' => '<string>',
'occurredAt' => '2023-11-07T05:31:56Z',
'organizationId' => '<string>',
'accountId' => '<string>',
'transactionTypeDescription' => '<string>',
'alternateDescription' => '<string>',
'memo' => '<string>',
'customAttributes' => [
]
]
],
'callbackUrl' => '<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://east.sandbox.spade.com/batches/transactions/transfers/enrich"
payload := strings.NewReader("{\n \"transactions\": [\n {\n \"userId\": \"<string>\",\n \"transactionId\": \"transaction_id_123456789\",\n \"transactionType\": \"<string>\",\n \"description\": \"<string>\",\n \"amount\": 123,\n \"currencyCode\": \"<string>\",\n \"occurredAt\": \"2023-11-07T05:31:56Z\",\n \"organizationId\": \"<string>\",\n \"accountId\": \"<string>\",\n \"transactionTypeDescription\": \"<string>\",\n \"alternateDescription\": \"<string>\",\n \"memo\": \"<string>\",\n \"customAttributes\": {}\n }\n ],\n \"callbackUrl\": \"<string>\"\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\": \"<string>\",\n \"transactionId\": \"transaction_id_123456789\",\n \"transactionType\": \"<string>\",\n \"description\": \"<string>\",\n \"amount\": 123,\n \"currencyCode\": \"<string>\",\n \"occurredAt\": \"2023-11-07T05:31:56Z\",\n \"organizationId\": \"<string>\",\n \"accountId\": \"<string>\",\n \"transactionTypeDescription\": \"<string>\",\n \"alternateDescription\": \"<string>\",\n \"memo\": \"<string>\",\n \"customAttributes\": {}\n }\n ],\n \"callbackUrl\": \"<string>\"\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\": \"<string>\",\n \"transactionId\": \"transaction_id_123456789\",\n \"transactionType\": \"<string>\",\n \"description\": \"<string>\",\n \"amount\": 123,\n \"currencyCode\": \"<string>\",\n \"occurredAt\": \"2023-11-07T05:31:56Z\",\n \"organizationId\": \"<string>\",\n \"accountId\": \"<string>\",\n \"transactionTypeDescription\": \"<string>\",\n \"alternateDescription\": \"<string>\",\n \"memo\": \"<string>\",\n \"customAttributes\": {}\n }\n ],\n \"callbackUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"batchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"batchSize": 2,
"submittedAt": "2023-11-07T05:31:56Z"
}{
"invalidField": [
"<string>"
]
}{
"details": "<string>"
}{
"details": "<string>"
}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"

