Commitments
List lifecycle reason standards
Returns all three reason contexts including inactive reasons. Unmaterialized contexts expose their configured starter reasons with null IDs and version zero; this read does not create catalog rows. can_manage reflects the current role. Requires the workspace lifecycle feature. Mutation permission is lifecycle_reasons_manage or manage_settings.
GET
/
admin
/
lifecycle-reason-sets
List lifecycle reason standards
curl --request GET \
--url https://api.gratona.com/v1/admin/lifecycle-reason-sets \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gratona.com/v1/admin/lifecycle-reason-sets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gratona.com/v1/admin/lifecycle-reason-sets', 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.gratona.com/v1/admin/lifecycle-reason-sets",
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.gratona.com/v1/admin/lifecycle-reason-sets"
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.gratona.com/v1/admin/lifecycle-reason-sets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/lifecycle-reason-sets")
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": [
{
"id": 42,
"context_key": "recipient.archive",
"label": "Recipient archive reasons",
"description": "Example",
"domain_key": "sponsorships",
"domain_label": "Commitments & recipients",
"selection_policy": "required",
"template_key": "Example",
"catalog_version": 1,
"materialized": false,
"starter_available": false,
"reasons": [
{
"id": 42,
"code": "donor_cancelled",
"label": "Donor cancelled",
"description": "Example",
"event_transition_type": "recipient_exited",
"is_active": false,
"requires_notes": false,
"source": "starter",
"sort_order": 0
}
]
}
],
"can_manage": false,
"templates": [
{
"key": "sponsorship.v1",
"label": "Commitment starter reasons"
}
]
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Not Found",
"status": "error"
}Authorizations
bearerAuthapiKeyAuth
Passport bearer token authentication for legacy admin sessions.
⌘I
List lifecycle reason standards
curl --request GET \
--url https://api.gratona.com/v1/admin/lifecycle-reason-sets \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gratona.com/v1/admin/lifecycle-reason-sets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gratona.com/v1/admin/lifecycle-reason-sets', 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.gratona.com/v1/admin/lifecycle-reason-sets",
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.gratona.com/v1/admin/lifecycle-reason-sets"
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.gratona.com/v1/admin/lifecycle-reason-sets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/lifecycle-reason-sets")
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": [
{
"id": 42,
"context_key": "recipient.archive",
"label": "Recipient archive reasons",
"description": "Example",
"domain_key": "sponsorships",
"domain_label": "Commitments & recipients",
"selection_policy": "required",
"template_key": "Example",
"catalog_version": 1,
"materialized": false,
"starter_available": false,
"reasons": [
{
"id": 42,
"code": "donor_cancelled",
"label": "Donor cancelled",
"description": "Example",
"event_transition_type": "recipient_exited",
"is_active": false,
"requires_notes": false,
"source": "starter",
"sort_order": 0
}
]
}
],
"can_manage": false,
"templates": [
{
"key": "sponsorship.v1",
"label": "Commitment starter reasons"
}
]
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Not Found",
"status": "error"
}