curl --request GET \
--url https://east.sandbox.spade.com/programs/{programId}/category-action-triggers \
--header 'X-Api-Key: <api-key>'import requests
url = "https://east.sandbox.spade.com/programs/{programId}/category-action-triggers"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://east.sandbox.spade.com/programs/{programId}/category-action-triggers', 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/programs/{programId}/category-action-triggers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://east.sandbox.spade.com/programs/{programId}/category-action-triggers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://east.sandbox.spade.com/programs/{programId}/category-action-triggers")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://east.sandbox.spade.com/programs/{programId}/category-action-triggers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "succeeded",
"version": 1,
"categoryTriggers": [
{
"id": "travel-reward-1",
"categoryId": "020-001-000-000",
"action": {
"type": "REWARD",
"rewardPercent": 3
}
}
],
"totalCount": 10
}{
"details": "Incorrect authentication credentials."
}{
"detail": "No action triggers exist for this scope"
}{
"details": "Internal server error."
}Get program-level category trigger status
Get the status and version of the latest category action trigger registration at the program scope.
Program-level triggers apply to all enrichment requests where the programId field matches this program.
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.
curl --request GET \
--url https://east.sandbox.spade.com/programs/{programId}/category-action-triggers \
--header 'X-Api-Key: <api-key>'import requests
url = "https://east.sandbox.spade.com/programs/{programId}/category-action-triggers"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://east.sandbox.spade.com/programs/{programId}/category-action-triggers', 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/programs/{programId}/category-action-triggers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://east.sandbox.spade.com/programs/{programId}/category-action-triggers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://east.sandbox.spade.com/programs/{programId}/category-action-triggers")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://east.sandbox.spade.com/programs/{programId}/category-action-triggers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "succeeded",
"version": 1,
"categoryTriggers": [
{
"id": "travel-reward-1",
"categoryId": "020-001-000-000",
"action": {
"type": "REWARD",
"rewardPercent": 3
}
}
],
"totalCount": 10
}{
"details": "Incorrect authentication credentials."
}{
"detail": "No action triggers exist for this scope"
}{
"details": "Internal server error."
}Authorizations
Path Parameters
Your unique identifier for the program
512Response
Successful operation
Response containing the status of a category action trigger registration.
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 activefailed: Registration failed, check your request and retry
succeeded, failed "succeeded"
The version number of this registration. Increments with each PUT, PATCH, or DELETE request to this scope.
1
The list of active category triggers registered for this scope. Present on GET responses; omitted on PUT and PATCH responses.
Show child attributes
Show child attributes
The total number of active category triggers registered for this scope. Present on GET responses; omitted on PUT and PATCH responses.
10

