Get program website launch context
Returns setup/public-page readiness, current website settings, shared-setting information, additional gift routes, public URLs and Elements embed configuration. No setting access returns403; a missing program returns404. A trip program without a real attached trip has no public page or embed configuration. can_manage reports whether launch settings may be changed. Requires permission: one of programs_view, manage_programs, program-all.
curl --request GET \
--url https://api.gratona.com/v1/admin/program/{program_id}/launch-context \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gratona.com/v1/admin/program/{program_id}/launch-context"
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/program/{program_id}/launch-context', 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/program/{program_id}/launch-context",
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/program/{program_id}/launch-context"
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/program/{program_id}/launch-context")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/program/{program_id}/launch-context")
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{
"program": {
"id": 42,
"client_id": 12,
"name": "Education",
"prefix": "<string>",
"setting_id": 123,
"program_type": "<string>",
"program_type_label": "Number of Sponsors"
},
"readiness": {
"program_id": 42,
"program_name": "Education",
"program_type": "number",
"program_type_label": "Number of Sponsors",
"attached_modules": {
"settings_id": 42,
"donor_hysform_id": 42,
"hysform_id": 42,
"emailset_id": 42,
"smsset_id": 42
},
"email_required": true,
"steps": [
{
"key": "donor_form",
"label": "Donor form",
"state": "complete",
"next_action": "Attach a donor form"
}
],
"next_step_key": "entity_form",
"is_launch_ready": false,
"completion": {
"complete": 5,
"required": 7
}
},
"setting": {
"id": 123,
"name": "<string>",
"linked_programs_count": 1,
"linked_programs": [
{
"id": 42,
"name": "Education",
"prefix": "EDU"
}
],
"is_shared": false,
"can_manage": true,
"advanced_url": "/app/program-settings",
"copy_on_save_default": false
},
"branding": {
"attribution_removed": false
},
"visual_settings": {},
"preview": {
"color_theme": {
"color": "indigo",
"color_level": 600
},
"organization_color_theme": {
"color": "indigo",
"color_level": 600
},
"check_payment_instructions": "Mail checks to the organization."
},
"additional_gift_routing": {
"allow_donor_choice": true,
"available_gifts": [
{
"id": 42,
"name": "School supplies",
"code": "SUPPLIES"
}
],
"target_entities": [
{
"id": 42,
"name": "Education fund",
"program_id": 12
}
],
"target_entities_exist": true,
"routes": {}
},
"public_links": {
"base_url": "https://app.gratona.com",
"primary_url": "<string>",
"items": [
{
"key": "donation_page",
"label": "Donation Page",
"url": "<string>",
"description": "<string>"
}
],
"donor_login": "<string>",
"program_login": "<string>",
"recipient_portal_login": "<string>"
},
"embed": {
"smart": {
"recommended": true,
"config": {
"type": "sponsorship",
"clientId": "12",
"programId": "42",
"programSlug": "<string>",
"tripSlug": "<string>",
"baseUrl": "https://app.gratona.com",
"defaultAmount": null,
"defaultFrequency": "<string>"
},
"preview_url": "<string>"
}
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Not Found",
"status": "error"
}Authorizations
Passport bearer token authentication for legacy admin sessions.
Path Parameters
Program id in the current organization.
Response
Operation result.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Saved launch options use legacy scalar/JSON encodings; payment_methods contains card/check/cash/wire_transfer booleans.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
curl --request GET \
--url https://api.gratona.com/v1/admin/program/{program_id}/launch-context \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gratona.com/v1/admin/program/{program_id}/launch-context"
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/program/{program_id}/launch-context', 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/program/{program_id}/launch-context",
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/program/{program_id}/launch-context"
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/program/{program_id}/launch-context")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/program/{program_id}/launch-context")
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{
"program": {
"id": 42,
"client_id": 12,
"name": "Education",
"prefix": "<string>",
"setting_id": 123,
"program_type": "<string>",
"program_type_label": "Number of Sponsors"
},
"readiness": {
"program_id": 42,
"program_name": "Education",
"program_type": "number",
"program_type_label": "Number of Sponsors",
"attached_modules": {
"settings_id": 42,
"donor_hysform_id": 42,
"hysform_id": 42,
"emailset_id": 42,
"smsset_id": 42
},
"email_required": true,
"steps": [
{
"key": "donor_form",
"label": "Donor form",
"state": "complete",
"next_action": "Attach a donor form"
}
],
"next_step_key": "entity_form",
"is_launch_ready": false,
"completion": {
"complete": 5,
"required": 7
}
},
"setting": {
"id": 123,
"name": "<string>",
"linked_programs_count": 1,
"linked_programs": [
{
"id": 42,
"name": "Education",
"prefix": "EDU"
}
],
"is_shared": false,
"can_manage": true,
"advanced_url": "/app/program-settings",
"copy_on_save_default": false
},
"branding": {
"attribution_removed": false
},
"visual_settings": {},
"preview": {
"color_theme": {
"color": "indigo",
"color_level": 600
},
"organization_color_theme": {
"color": "indigo",
"color_level": 600
},
"check_payment_instructions": "Mail checks to the organization."
},
"additional_gift_routing": {
"allow_donor_choice": true,
"available_gifts": [
{
"id": 42,
"name": "School supplies",
"code": "SUPPLIES"
}
],
"target_entities": [
{
"id": 42,
"name": "Education fund",
"program_id": 12
}
],
"target_entities_exist": true,
"routes": {}
},
"public_links": {
"base_url": "https://app.gratona.com",
"primary_url": "<string>",
"items": [
{
"key": "donation_page",
"label": "Donation Page",
"url": "<string>",
"description": "<string>"
}
],
"donor_login": "<string>",
"program_login": "<string>",
"recipient_portal_login": "<string>"
},
"embed": {
"smart": {
"recommended": true,
"config": {
"type": "sponsorship",
"clientId": "12",
"programId": "42",
"programSlug": "<string>",
"tripSlug": "<string>",
"baseUrl": "https://app.gratona.com",
"defaultAmount": null,
"defaultFrequency": "<string>"
},
"preview_url": "<string>"
}
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Not Found",
"status": "error"
}