curl --request GET \
--url https://east.sandbox.spade.com/users/{userId}/cards/{cardId}/merchant-action-triggers \
--header 'X-Api-Key: <api-key>'import requests
url = "https://east.sandbox.spade.com/users/{userId}/cards/{cardId}/merchant-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/users/{userId}/cards/{cardId}/merchant-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/users/{userId}/cards/{cardId}/merchant-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/users/{userId}/cards/{cardId}/merchant-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/users/{userId}/cards/{cardId}/merchant-action-triggers")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://east.sandbox.spade.com/users/{userId}/cards/{cardId}/merchant-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,
"merchantTriggers": [
{
"id": "merchant_123",
"action": {
"type": "REWARD",
"points": 200
}
}
],
"totalCount": 50000
}{
"details": "Incorrect authentication credentials."
}{
"detail": "No action triggers exist for this scope"
}{
"details": "Internal server error."
}Get card-level trigger status
Get the status and version of the latest merchant action trigger registration at the card scope.
Card-level triggers apply only to transactions for the specified card.
Important: Triggers are only applied to enrichment responses when the status is succeeded.
To learn more about action triggers, please read the Merchant Action Triggers Guide.
curl --request GET \
--url https://east.sandbox.spade.com/users/{userId}/cards/{cardId}/merchant-action-triggers \
--header 'X-Api-Key: <api-key>'import requests
url = "https://east.sandbox.spade.com/users/{userId}/cards/{cardId}/merchant-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/users/{userId}/cards/{cardId}/merchant-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/users/{userId}/cards/{cardId}/merchant-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/users/{userId}/cards/{cardId}/merchant-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/users/{userId}/cards/{cardId}/merchant-action-triggers")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://east.sandbox.spade.com/users/{userId}/cards/{cardId}/merchant-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,
"merchantTriggers": [
{
"id": "merchant_123",
"action": {
"type": "REWARD",
"points": 200
}
}
],
"totalCount": 50000
}{
"details": "Incorrect authentication credentials."
}{
"detail": "No action triggers exist for this scope"
}{
"details": "Internal server error."
}Authorizations
Path Parameters
Your unique identifier for the user
512Your unique identifier for the card
512Response
Successful operation
Response containing the status of an action trigger registration.
The current status of the action trigger registration.
pending: Registration received, processing not yet startedrunning: Registration is being processed (for batch registrations with >100 triggers)succeeded: Registration complete, triggers are now activefailed: Registration failed, check your request and retry
pending, running, 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 merchant 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 merchant triggers registered for this scope. Present on GET responses; omitted on PUT and PATCH responses.
50000

