Skip to main content
POST
/
batches
/
transactions
/
cards
/
enrich
Enrich a batch of card transactions
curl --request POST \
  --url https://east.sandbox.spade.com/batches/transactions/cards/enrich \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "transactions": [
    {
      "userId": "<string>",
      "transactionId": "transaction_id_123456789",
      "amount": 123,
      "currencyCode": "<string>",
      "occurredAt": "2023-11-07T05:31:56Z",
      "categoryCode": "<string>",
      "categoryType": "MCC",
      "location": {
        "country": "<string>",
        "address": "<string>",
        "city": "<string>",
        "region": "<string>",
        "postalCode": "<string>",
        "latitude": 123,
        "longitude": 123
      },
      "merchantName": "<string>",
      "cardId": "<string>",
      "cardFirstSix": "<string>",
      "cardLastFour": "<string>",
      "acquirerId": "<string>",
      "customAttributes": {}
    }
  ],
  "callbackUrl": "<string>"
}
'
{
  "batchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "pending",
  "batchSize": 2,
  "submittedAt": "2023-11-07T05:31:56Z"
}

Authorizations

X-Api-Key
string
header
required

Body

application/json
transactions
object[]
required

An array of transactions to enrich. Each transaction must have a unique transactionId. Maximum 50,000 transactions.

Maximum array length: 50000
callbackUrl
string<url>

Set this URL if you want to receive a notification when the batch job is complete.

Example:

"https://example.com/callback"

Response

Successful operation

batchId
string<uuid>
required

Unique identifier for the batch job

status
enum<string>
required

Current status of the batch job

Available options:
pending,
running,
completed,
failed
batchSize
integer
required

Number of transactions in the batch

Required range: x >= 1
Example:

1

submittedAt
string<date-time>
required

Timestamp of when the batch was submitted

Example:

"2024-11-21T20:07:20.213660Z"