Trips
Update organization trip defaults
Organization-scoped trip defaults used when creating and displaying trips. A fixed_amount goal mode requires a goal amount; other modes clear that amount. Background-check validity is controlled by the Checkr integration.
PUT
/
admin
/
trip-settings
Update organization trip defaults
curl --request PUT \
--url https://api.gratona.com/v1/admin/trip-settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"trip_default_participant_goal_mode": "equal_split",
"trip_default_participant_goal_amount": 40,
"trip_show_donation_amounts": false,
"trip_show_donor_names": "full",
"trip_allow_recurring_donations": false,
"trip_completed_accept_donations": false,
"trip_sync_budget_to_goal": false,
"trip_allow_participant_visibility_opt_out": false,
"trip_task_reminder_days": [
0
],
"trip_request_to_join_enabled": false
}
'import requests
url = "https://api.gratona.com/v1/admin/trip-settings"
payload = {
"trip_default_participant_goal_mode": "equal_split",
"trip_default_participant_goal_amount": 40,
"trip_show_donation_amounts": False,
"trip_show_donor_names": "full",
"trip_allow_recurring_donations": False,
"trip_completed_accept_donations": False,
"trip_sync_budget_to_goal": False,
"trip_allow_participant_visibility_opt_out": False,
"trip_task_reminder_days": [0],
"trip_request_to_join_enabled": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
trip_default_participant_goal_mode: 'equal_split',
trip_default_participant_goal_amount: 40,
trip_show_donation_amounts: false,
trip_show_donor_names: 'full',
trip_allow_recurring_donations: false,
trip_completed_accept_donations: false,
trip_sync_budget_to_goal: false,
trip_allow_participant_visibility_opt_out: false,
trip_task_reminder_days: [0],
trip_request_to_join_enabled: false
})
};
fetch('https://api.gratona.com/v1/admin/trip-settings', 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/trip-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'trip_default_participant_goal_mode' => 'equal_split',
'trip_default_participant_goal_amount' => 40,
'trip_show_donation_amounts' => false,
'trip_show_donor_names' => 'full',
'trip_allow_recurring_donations' => false,
'trip_completed_accept_donations' => false,
'trip_sync_budget_to_goal' => false,
'trip_allow_participant_visibility_opt_out' => false,
'trip_task_reminder_days' => [
0
],
'trip_request_to_join_enabled' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gratona.com/v1/admin/trip-settings"
payload := strings.NewReader("{\n \"trip_default_participant_goal_mode\": \"equal_split\",\n \"trip_default_participant_goal_amount\": 40,\n \"trip_show_donation_amounts\": false,\n \"trip_show_donor_names\": \"full\",\n \"trip_allow_recurring_donations\": false,\n \"trip_completed_accept_donations\": false,\n \"trip_sync_budget_to_goal\": false,\n \"trip_allow_participant_visibility_opt_out\": false,\n \"trip_task_reminder_days\": [\n 0\n ],\n \"trip_request_to_join_enabled\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.gratona.com/v1/admin/trip-settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"trip_default_participant_goal_mode\": \"equal_split\",\n \"trip_default_participant_goal_amount\": 40,\n \"trip_show_donation_amounts\": false,\n \"trip_show_donor_names\": \"full\",\n \"trip_allow_recurring_donations\": false,\n \"trip_completed_accept_donations\": false,\n \"trip_sync_budget_to_goal\": false,\n \"trip_allow_participant_visibility_opt_out\": false,\n \"trip_task_reminder_days\": [\n 0\n ],\n \"trip_request_to_join_enabled\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/trip-settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"trip_default_participant_goal_mode\": \"equal_split\",\n \"trip_default_participant_goal_amount\": 40,\n \"trip_show_donation_amounts\": false,\n \"trip_show_donor_names\": \"full\",\n \"trip_allow_recurring_donations\": false,\n \"trip_completed_accept_donations\": false,\n \"trip_sync_budget_to_goal\": false,\n \"trip_allow_participant_visibility_opt_out\": false,\n \"trip_task_reminder_days\": [\n 0\n ],\n \"trip_request_to_join_enabled\": false\n}"
response = http.request(request)
puts response.read_body{
"message": "Saved successfully.",
"data": {
"trip_default_participant_goal_mode": "equal_split",
"trip_default_participant_goal_amount": 499999999.995,
"trip_show_donation_amounts": true,
"trip_show_donor_names": "full",
"trip_allow_recurring_donations": true,
"trip_completed_accept_donations": true,
"trip_sync_budget_to_goal": true,
"trip_allow_participant_visibility_opt_out": true,
"trip_task_reminder_days": [
0
],
"trip_request_to_join_enabled": true,
"trip_background_check_validity_months": 60
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}Authorizations
bearerAuthapiKeyAuth
Passport bearer token authentication for legacy admin sessions.
Body
application/json
Request fields accepted by this operation. Omitted optional properties retain the behavior described above.
Validation: required|in:equal_split,fixed_amount,manual.
Available options:
equal_split, fixed_amount, manual Example:
"equal_split"
Validation: nullable|numeric|min:0|max:999999999.99.
Required range:
0 <= x <= 999999999.99Example:
40
Validation: boolean.
Example:
false
Validation: required|in:full,first_initial,anonymous.
Available options:
full, first_initial, anonymous Example:
"full"
Validation: boolean.
Example:
false
Validation: boolean.
Example:
false
Validation: boolean.
Example:
false
Validation: boolean.
Example:
false
Required range:
-365 <= x <= 365Validation: boolean.
Example:
false
⌘I
Update organization trip defaults
curl --request PUT \
--url https://api.gratona.com/v1/admin/trip-settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"trip_default_participant_goal_mode": "equal_split",
"trip_default_participant_goal_amount": 40,
"trip_show_donation_amounts": false,
"trip_show_donor_names": "full",
"trip_allow_recurring_donations": false,
"trip_completed_accept_donations": false,
"trip_sync_budget_to_goal": false,
"trip_allow_participant_visibility_opt_out": false,
"trip_task_reminder_days": [
0
],
"trip_request_to_join_enabled": false
}
'import requests
url = "https://api.gratona.com/v1/admin/trip-settings"
payload = {
"trip_default_participant_goal_mode": "equal_split",
"trip_default_participant_goal_amount": 40,
"trip_show_donation_amounts": False,
"trip_show_donor_names": "full",
"trip_allow_recurring_donations": False,
"trip_completed_accept_donations": False,
"trip_sync_budget_to_goal": False,
"trip_allow_participant_visibility_opt_out": False,
"trip_task_reminder_days": [0],
"trip_request_to_join_enabled": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
trip_default_participant_goal_mode: 'equal_split',
trip_default_participant_goal_amount: 40,
trip_show_donation_amounts: false,
trip_show_donor_names: 'full',
trip_allow_recurring_donations: false,
trip_completed_accept_donations: false,
trip_sync_budget_to_goal: false,
trip_allow_participant_visibility_opt_out: false,
trip_task_reminder_days: [0],
trip_request_to_join_enabled: false
})
};
fetch('https://api.gratona.com/v1/admin/trip-settings', 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/trip-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'trip_default_participant_goal_mode' => 'equal_split',
'trip_default_participant_goal_amount' => 40,
'trip_show_donation_amounts' => false,
'trip_show_donor_names' => 'full',
'trip_allow_recurring_donations' => false,
'trip_completed_accept_donations' => false,
'trip_sync_budget_to_goal' => false,
'trip_allow_participant_visibility_opt_out' => false,
'trip_task_reminder_days' => [
0
],
'trip_request_to_join_enabled' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gratona.com/v1/admin/trip-settings"
payload := strings.NewReader("{\n \"trip_default_participant_goal_mode\": \"equal_split\",\n \"trip_default_participant_goal_amount\": 40,\n \"trip_show_donation_amounts\": false,\n \"trip_show_donor_names\": \"full\",\n \"trip_allow_recurring_donations\": false,\n \"trip_completed_accept_donations\": false,\n \"trip_sync_budget_to_goal\": false,\n \"trip_allow_participant_visibility_opt_out\": false,\n \"trip_task_reminder_days\": [\n 0\n ],\n \"trip_request_to_join_enabled\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.gratona.com/v1/admin/trip-settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"trip_default_participant_goal_mode\": \"equal_split\",\n \"trip_default_participant_goal_amount\": 40,\n \"trip_show_donation_amounts\": false,\n \"trip_show_donor_names\": \"full\",\n \"trip_allow_recurring_donations\": false,\n \"trip_completed_accept_donations\": false,\n \"trip_sync_budget_to_goal\": false,\n \"trip_allow_participant_visibility_opt_out\": false,\n \"trip_task_reminder_days\": [\n 0\n ],\n \"trip_request_to_join_enabled\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/trip-settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"trip_default_participant_goal_mode\": \"equal_split\",\n \"trip_default_participant_goal_amount\": 40,\n \"trip_show_donation_amounts\": false,\n \"trip_show_donor_names\": \"full\",\n \"trip_allow_recurring_donations\": false,\n \"trip_completed_accept_donations\": false,\n \"trip_sync_budget_to_goal\": false,\n \"trip_allow_participant_visibility_opt_out\": false,\n \"trip_task_reminder_days\": [\n 0\n ],\n \"trip_request_to_join_enabled\": false\n}"
response = http.request(request)
puts response.read_body{
"message": "Saved successfully.",
"data": {
"trip_default_participant_goal_mode": "equal_split",
"trip_default_participant_goal_amount": 499999999.995,
"trip_show_donation_amounts": true,
"trip_show_donor_names": "full",
"trip_allow_recurring_donations": true,
"trip_completed_accept_donations": true,
"trip_sync_budget_to_goal": true,
"trip_allow_participant_visibility_opt_out": true,
"trip_task_reminder_days": [
0
],
"trip_request_to_join_enabled": true,
"trip_background_check_validity_months": 60
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}