v1

latestOpenAPI 3.1.02026-07-227350156.5 KB
Category Action Triggers

Register category triggers at card scope

Register category action triggers at the card scope.

Card-level triggers apply only to transactions for the specified card.

Field requirements:

  • id, categoryId, and action are required for each trigger
  • categoryId must be a valid Spade category ID (use GET /categories to discover valid IDs)

Limit: A maximum of 300 categoryTriggers can be submitted per request. All registrations are processed synchronously.

Important: Triggers are only applied to enrichment responses when the status is succeeded.

To learn more about action triggers, please read the Category Action Triggers Guide.

put/users/{userId}/cards/{cardId}/category-action-triggers

Request body

Example request

{
  "categoryTriggers": [
    {
      "id": "travel-reward-1",
      "categoryId": "020-001-000-000",
      "action": {
        "type": "REWARD",
        "rewardPercent": 3,
        "offerId": "travel-3x-promo"
      }
    }
  ]
}

Response

Registration created successfully

status'succeeded' | 'failed'

The current status of the action trigger registration. Category trigger registrations are processed synchronously, so the status is always one of:

  • succeeded: Registration complete, triggers are now active
  • failed: Registration failed, check your request and retry
versioninteger

The version number of this registration. Increments with each PUT, PATCH, or DELETE request to this scope.

totalCountinteger

The total number of active category triggers registered for this scope. Present on GET responses; omitted on PUT and PATCH responses.

Example response

{
  "status": "succeeded",
  "version": 1,
  "categoryTriggers": [
    {
      "id": "travel-reward-1",
      "categoryId": "020-001-000-000",
      "action": {
        "type": "REWARD",
        "rewardPercent": 3
      }
    }
  ],
  "totalCount": 10
}