curl --request PATCH \
--url https://east.sandbox.spade.com/category-action-triggers \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"operation": "add",
"categoryTriggers": [
{
"id": "groceries-reward",
"categoryId": "005-001-000-000",
"action": {
"type": "REWARD",
"rewardPercent": 2,
"offerId": "groceries-2x"
}
}
]
}
'{
"status": "succeeded",
"version": 5
}{
"status": "succeeded",
"version": 1,
"categoryTriggers": [
{
"id": "travel-reward-1",
"categoryId": "020-001-000-000",
"action": {
"type": "REWARD",
"rewardPercent": 3
}
}
],
"totalCount": 10
}{
"invalidField": [
"This field is required."
]
}{
"details": "Incorrect authentication credentials."
}{
"detail": "An action trigger registration is already in progress for this scope."
}{
"details": "Internal server error."
}Incremental category trigger operations at account scope
Perform incremental operations on category action triggers at the account scope.
Supports two operations:
- add: Register new category triggers or update existing ones. Only the submitted triggers are affected—existing registrations are preserved. If a trigger ID already exists, its registration is replaced (upsert). All registrations are processed synchronously.
- remove: Remove category triggers by trigger ID. Removed triggers are excluded from enrichment lookups. Trigger IDs that are not currently active are silently ignored (idempotent).
Successful add operations return 201; successful remove operations return 200.
Limit: The total number of active triggers at a scope cannot exceed 300. An add operation that would push the total past this limit will receive a 400 error.
Important: Only one operation can be in progress per scope at a time. Concurrent requests return 409.
To learn more about action triggers, please read the Category Action Triggers Guide.
curl --request PATCH \
--url https://east.sandbox.spade.com/category-action-triggers \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"operation": "add",
"categoryTriggers": [
{
"id": "groceries-reward",
"categoryId": "005-001-000-000",
"action": {
"type": "REWARD",
"rewardPercent": 2,
"offerId": "groceries-2x"
}
}
]
}
'{
"status": "succeeded",
"version": 5
}{
"status": "succeeded",
"version": 1,
"categoryTriggers": [
{
"id": "travel-reward-1",
"categoryId": "020-001-000-000",
"action": {
"type": "REWARD",
"rewardPercent": 3
}
}
],
"totalCount": 10
}{
"invalidField": [
"This field is required."
]
}{
"details": "Incorrect authentication credentials."
}{
"detail": "An action trigger registration is already in progress for this scope."
}{
"details": "Internal server error."
}Authorizations
Body
Request body for incremental category action trigger operations.
- For
add:categoryTriggersis required.triggerIdsis optional and ignored if provided. - For
remove:triggerIdsis required and must be a non-empty list.
The operation to perform:
add: Register new category triggers or update existing onesremove: Remove category triggers (excluded from enrichment lookups)
add, remove "add"
List of category triggers to add. Required for the add operation.
If a trigger ID already exists, the old registration is replaced (upsert behavior).
Field requirements:
id,categoryId, andactionare always required
1 - 300 elementsShow child attributes
Show child attributes
List of trigger IDs to remove. Required and must be non-empty for the remove operation.
Trigger IDs that are not currently active are silently ignored (idempotent).
For add operations, this field is optional and ignored if provided — you may pass null, [], or omit it entirely.
512["travel-reward-1", "block-gambling"]

