Skip to main content
POST
/
transactions
/
universal
/
enrich
Enrich a universal transaction
curl --request POST \
  --url https://east.sandbox.spade.com/transactions/universal/enrich \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "userId": "<string>",
  "description": "<string>",
  "amount": 123,
  "currencyCode": "<string>",
  "occurredAt": "2023-11-07T05:31:56Z",
  "accountId": "<string>",
  "transactionId": "<string>",
  "direction": "CREDIT",
  "customAttributes": {}
}
'
{
  "transactionInfo": {
    "type": "spending",
    "subType": null,
    "spendingInfo": null,
    "thirdParties": [
      {
        "id": "ac48cef2-0d7f-4159-865e-e92b152262bc",
        "name": "Paypal",
        "type": "payment_processor",
        "logo": "https://static.v2.spadeapi.com/logos/9063bc0f0a3f4b1fbf644f9862e17002/light.png",
        "website": "https://www.paypal.com/"
      }
    ],
    "recurrenceInfo": null,
    "display": {
      "name": "<string>",
      "categoryName": "<string>",
      "graphic": "<string>",
      "graphicSource": "<string>"
    },
    "transferInfo": {
      "direction": "outgoing",
      "transferMethod": "ach",
      "transferType": "external",
      "isAdjustmentOrRefund": true
    },
    "atmInfo": {
      "sponsorName": "<string>",
      "ownerName": "<string>"
    },
    "isAccountVerification": true,
    "isPeerToPeer": true,
    "isDigitalWallet": true,
    "transactionId": "<string>",
    "riskInsights": {
      "irregularWebPresenceDetected": true,
      "negativeOnlineSentiment": true,
      "highRiskEntity": true,
      "riskyIndustry": true,
      "cardAcceptanceHistory": "extensive"
    }
  },
  "counterparty": [
    {
      "location": [
        {
          "id": "fdf79470-3deb-4638-956a-6859e473b9d8",
          "address": "1234 W 5th Ave Suite 100",
          "addressLine1": "1234 W 5th Ave",
          "addressLine2": "Suite 100",
          "city": "New York",
          "region": "NY",
          "country": "USA",
          "postalCode": "10001",
          "latitude": 45,
          "longitude": 120,
          "phoneNumber": "+18664862360",
          "matchScore": 93.5
        }
      ],
      "possibleCounterpartyAlternate": null,
      "id": "704bbd58-fb12-4bdb-9aae-2786704ea92a",
      "name": "Amazon",
      "legalName": "Amazon Inc.",
      "industry": [
        {
          "id": "011-000-000-000",
          "name": "Retail",
          "icon": "https://static.v2.spadeapi.com/categories/ee4ee39fd5474d31ac42f9e606b9040a/light.png"
        }
      ],
      "matchScore": 93.5,
      "logo": "https://static.v2.spadeapi.com/logos/de33f8973bc934c5b368a5b27155db02/light.png",
      "phoneNumber": "+18664862360",
      "website": "https://www.amazon.com"
    }
  ],
  "enrichmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "mobileAppInfo": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "url": "<string>",
    "logo": "<string>",
    "developerName": "<string>",
    "developerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "category": "<string>",
    "hasGamblingOrRewards": true,
    "hasSimulatedGambling": true,
    "ageRating": "<string>"
  },
  "customAttributes": {}
}

Authorizations

X-Api-Key
string
header
required

Body

application/json
userId
string
required

Anonymous ID representing your user. This will be used for summary features, and recurrence flagging purposes.

Maximum string length: 512
description
string
required

The full transaction description. Typically, this will be a string containing the name of the merchant or institution involved in the transaction plus information related to the type of transaction such as "ACCT VERIFY", "WEB PMT", "ETRANSFER", etc...

Maximum string length: 1024
amount
required

Value of the transaction in the given currency. Negative values indicate incoming money.

currencyCode
string
required
Maximum string length: 16
occurredAt
string<date-time>
required

The time the transaction occurred. Formatted as an ISO 8601 date time.

accountId
string

Anonymous ID representing the account of the user (NOT the account number).

Maximum string length: 512
transactionId
string

Your ID representing this transaction

Maximum string length: 512
direction
enum<string>

The direction of the transaction. Will take precedence over the direction inferred from the amount field.

Available options:
CREDIT,
DEBIT
Maximum string length: 8
customAttributes
object

A dictionary containing custom attributes that you would like to be returned in the response. Please ensure this object does not contain any PII. Restrictions include: customAttributes must be an object, up 30 custom attributes are allowed, each key must be a string <= 40 characters in length, and each value must be a string <= 250 characters in length.

Response

Successful operation

transactionInfo
object
counterparty
object[]

An array of counterparties matched to the transaction, ordered by descending match score.

enrichmentId
string<uuid>

Our ID representing the enrichment, not to be confused with your provided transactionId.

mobileAppInfo
object

The mobile app information for the transaction. This object is only non-null if the transaction was matched to a mobile app.

This is a premium Spade field available depending on your product package.

customAttributes
object

A dictionary containing the custom attributes that were included in the enrichment request (if any).