Donations
Schedule a saved report for recurring delivery
Creates a ScheduledReport row tying a Report to a delivery cadence. Refuses to create a duplicate when the report already has a scheduled-report row (returns HTTP 409). The new schedule inherits the report’s client_id. Requires permission: donations_manage (also satisfied by reports_manage).
POST
/
admin
/
reports
/
schedule
Schedule a saved report for recurring delivery
curl --request POST \
--url https://api.gratona.com/v1/admin/reports/schedule \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"report_id": 88,
"duration": 30,
"frequency": 1,
"start_date": "2026-05-01"
}
'import requests
url = "https://api.gratona.com/v1/admin/reports/schedule"
payload = {
"report_id": 88,
"duration": 30,
"frequency": 1,
"start_date": "2026-05-01"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({report_id: 88, duration: 30, frequency: 1, start_date: '2026-05-01'})
};
fetch('https://api.gratona.com/v1/admin/reports/schedule', 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/reports/schedule",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'report_id' => 88,
'duration' => 30,
'frequency' => 1,
'start_date' => '2026-05-01'
]),
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/reports/schedule"
payload := strings.NewReader("{\n \"report_id\": 88,\n \"duration\": 30,\n \"frequency\": 1,\n \"start_date\": \"2026-05-01\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.gratona.com/v1/admin/reports/schedule")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"report_id\": 88,\n \"duration\": 30,\n \"frequency\": 1,\n \"start_date\": \"2026-05-01\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/reports/schedule")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"report_id\": 88,\n \"duration\": 30,\n \"frequency\": 1,\n \"start_date\": \"2026-05-01\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Report scheduled successfully"
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Not Found",
"status": "error"
}{
"message": "A scheduled report for this report already exists."
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}Authorizations
bearerAuthapiKeyAuth
Passport bearer token authentication for legacy admin sessions.
Body
application/json
Source Report id. Validation: required. 404 when not found.
Example:
88
Reporting window length (interpretation owned by the scheduler). Validation: required.
Example:
30
Delivery cadence code: 0 daily, 1 weekly, 2 monthly, 3 quarterly, 4 semiannual, 5 annual, 6 once, or 14 biweekly. Validation: required.
Available options:
0, 1, 2, 3, 4, 5, 6, 14 Example:
1
First scheduled run date. Validation: required.
Example:
"2026-05-01"
Response
Schedule created.
Example:
"Report scheduled successfully"
⌘I
Schedule a saved report for recurring delivery
curl --request POST \
--url https://api.gratona.com/v1/admin/reports/schedule \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"report_id": 88,
"duration": 30,
"frequency": 1,
"start_date": "2026-05-01"
}
'import requests
url = "https://api.gratona.com/v1/admin/reports/schedule"
payload = {
"report_id": 88,
"duration": 30,
"frequency": 1,
"start_date": "2026-05-01"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({report_id: 88, duration: 30, frequency: 1, start_date: '2026-05-01'})
};
fetch('https://api.gratona.com/v1/admin/reports/schedule', 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/reports/schedule",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'report_id' => 88,
'duration' => 30,
'frequency' => 1,
'start_date' => '2026-05-01'
]),
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/reports/schedule"
payload := strings.NewReader("{\n \"report_id\": 88,\n \"duration\": 30,\n \"frequency\": 1,\n \"start_date\": \"2026-05-01\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.gratona.com/v1/admin/reports/schedule")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"report_id\": 88,\n \"duration\": 30,\n \"frequency\": 1,\n \"start_date\": \"2026-05-01\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/reports/schedule")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"report_id\": 88,\n \"duration\": 30,\n \"frequency\": 1,\n \"start_date\": \"2026-05-01\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Report scheduled successfully"
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Not Found",
"status": "error"
}{
"message": "A scheduled report for this report already exists."
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}