curl --request GET \
--url https://api.affinity.co/v2/lists/{listId}/required-fields-triggers \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.affinity.co/v2/lists/{listId}/required-fields-triggers"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.affinity.co/v2/lists/{listId}/required-fields-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://api.affinity.co/v2/lists/{listId}/required-fields-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 => [
"Authorization: Bearer <token>"
],
]);
$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://api.affinity.co/v2/lists/{listId}/required-fields-triggers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.affinity.co/v2/lists/{listId}/required-fields-triggers")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.affinity.co/v2/lists/{listId}/required-fields-triggers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"dropdownOptionId": 2,
"fieldIds": [
"field-105",
"field-106"
]
},
{
"dropdownOptionId": 3,
"fieldIds": [
"field-107"
]
}
],
"pagination": {
"prevUrl": null,
"nextUrl": null
}
}Get the Required Fields Triggers on a List
| ⚠️ This endpoint is currently in BETA |
|---|
Returns the Required Fields Triggers on a List, ordered by dropdownOptionId. A Required Fields Trigger makes a set of Fields required when a List Entry’s status changes to an option of the List’s Status Field. A List with no Status Field has no triggers.
Use this endpoint before you set a List Entry’s status. If a trigger exists for the new status, the Fields in fieldIds need a value. The API does not check these Fields when you set the status. To get the Fields that need a value on every List Entry, use GET /v2/lists/{listId}/fields?filter=isRequired=true.
The response does not include relational Fields, because the API does not serve them. A trigger that requires only relational Fields is not returned.
A collaborator who sees the List through a shared saved view gets a 403.
Use the includes query parameter to add optional properties to each trigger. Pass includes more than once to request multiple values.
| Value | Adds to each trigger |
|---|---|
fields | The metadata of each Field in fieldIds |
dropdownOption | The dropdown option that fires the trigger |
curl --request GET \
--url https://api.affinity.co/v2/lists/{listId}/required-fields-triggers \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.affinity.co/v2/lists/{listId}/required-fields-triggers"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.affinity.co/v2/lists/{listId}/required-fields-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://api.affinity.co/v2/lists/{listId}/required-fields-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 => [
"Authorization: Bearer <token>"
],
]);
$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://api.affinity.co/v2/lists/{listId}/required-fields-triggers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.affinity.co/v2/lists/{listId}/required-fields-triggers")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.affinity.co/v2/lists/{listId}/required-fields-triggers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"dropdownOptionId": 2,
"fieldIds": [
"field-105",
"field-106"
]
},
{
"dropdownOptionId": 3,
"fieldIds": [
"field-107"
]
}
],
"pagination": {
"prevUrl": null,
"nextUrl": null
}
}Authorizations
Query Parameters
Was this page helpful?