Skip to main content
GET
/
users
/
{userId}
/
cards
/
{cardId}
/
category-action-triggers
Get card-level category trigger status
curl --request GET \
  --url https://east.sandbox.spade.com/users/{userId}/cards/{cardId}/category-action-triggers \
  --header 'X-Api-Key: <api-key>'
import requests

url = "https://east.sandbox.spade.com/users/{userId}/cards/{cardId}/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/users/{userId}/cards/{cardId}/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/users/{userId}/cards/{cardId}/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/users/{userId}/cards/{cardId}/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/users/{userId}/cards/{cardId}/category-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}/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
{
  "version": 123,
  "categoryTriggers": [
    {
      "id": "<string>",
      "categoryId": "<string>",
      "action": {}
    }
  ],
  "totalCount": 123
}
{
"details": "<string>"
}
{
"detail": "<string>"
}
{
"details": "<string>"
}

Authorizations

X-Api-Key
string
header
required

Path Parameters

userId
string
required

Your unique identifier for the user

Maximum string length: 512
cardId
string
required

Your unique identifier for the card

Maximum string length: 512

Response

Successful operation

Response containing the status of a category action trigger registration.

status
enum<string>

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
Available options:
succeeded,
failed
Example:

"succeeded"

version
integer

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

Example:

1

categoryTriggers
object[]

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

totalCount
integer

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

Example:

10