Trips
Get trip analytics
Returns organization-scoped trip analytics or a CSV download. Analytics refresh queues a background job but returns200; CSV donations include active-participant designations and the trip fund, participant export includes all participant statuses, and task export covers active participants.
GET
/
admin
/
trips
/
{tripId}
/
analytics
Get trip analytics
curl --request GET \
--url https://api.gratona.com/v1/admin/trips/{tripId}/analytics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gratona.com/v1/admin/trips/{tripId}/analytics"
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/trips/{tripId}/analytics', 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/trips/{tripId}/analytics",
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/trips/{tripId}/analytics"
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/trips/{tripId}/analytics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/trips/{tripId}/analytics")
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": {
"fundraising": {
"goal": 123,
"total_raised": 123,
"average_donation": 123,
"unique_donors": 123,
"donation_count": 123,
"donation_frequency": {
"one_time": 123,
"recurring": 123
}
},
"progress_over_time": {
"labels": [
"<string>"
],
"daily_totals": [
123
],
"daily_counts": [
123
],
"cumulative_totals": [
123
]
},
"participants": {
"total": 123,
"goal_completion_rate": 123,
"top_fundraisers": [
{
"id": 123,
"name": "<string>",
"email": "<string>",
"total_raised": 123,
"goal": 123,
"progress_percent": 123
}
],
"progress": [
{
"id": 123,
"name": "<string>",
"email": "<string>",
"total_raised": 123,
"goal": 123,
"progress_percent": 123
}
]
},
"tasks": {
"overall_completion_percent": 123,
"overdue_task_count": 123,
"per_task": [
{
"id": 123,
"title": "<string>",
"completion_count": 123,
"targeted_participant_count": 123,
"completion_percent": 123
}
]
},
"last_updated_at": "2023-11-07T05:31:56Z"
},
"reloaded": "<string>",
"status": "success"
}{
"message": "Unauthorized",
"status": "error"
}{
"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.
Path Parameters
Trip ID belonging to the authenticated organization.
Query Parameters
Analytics window in days; unsupported values fall back to 7.
Available options:
7, 14, 30, 90 Forces synchronous cache refresh when true.
⌘I
Get trip analytics
curl --request GET \
--url https://api.gratona.com/v1/admin/trips/{tripId}/analytics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gratona.com/v1/admin/trips/{tripId}/analytics"
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/trips/{tripId}/analytics', 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/trips/{tripId}/analytics",
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/trips/{tripId}/analytics"
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/trips/{tripId}/analytics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/trips/{tripId}/analytics")
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": {
"fundraising": {
"goal": 123,
"total_raised": 123,
"average_donation": 123,
"unique_donors": 123,
"donation_count": 123,
"donation_frequency": {
"one_time": 123,
"recurring": 123
}
},
"progress_over_time": {
"labels": [
"<string>"
],
"daily_totals": [
123
],
"daily_counts": [
123
],
"cumulative_totals": [
123
]
},
"participants": {
"total": 123,
"goal_completion_rate": 123,
"top_fundraisers": [
{
"id": 123,
"name": "<string>",
"email": "<string>",
"total_raised": 123,
"goal": 123,
"progress_percent": 123
}
],
"progress": [
{
"id": 123,
"name": "<string>",
"email": "<string>",
"total_raised": 123,
"goal": 123,
"progress_percent": 123
}
]
},
"tasks": {
"overall_completion_percent": 123,
"overdue_task_count": 123,
"per_task": [
{
"id": 123,
"title": "<string>",
"completion_count": 123,
"targeted_participant_count": 123,
"completion_percent": 123
}
]
},
"last_updated_at": "2023-11-07T05:31:56Z"
},
"reloaded": "<string>",
"status": "success"
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Not Found",
"status": "error"
}