Commitments
Read a recipient funding history and current coverage
Requires bearer or API-key authentication, organization scope and current recipient program access. Includes archived recipients. Returns all row history ordered by coverage end descending, the current/upcoming coverage summary and configured monetary or slot need. Staff funder names are returned alongside their anonymous display preference; that preference controls recipient-facing presentation.
GET
/
admin
/
program
/
entities
/
{id}
/
funding
Read a recipient funding history and current coverage
curl --request GET \
--url https://api.gratona.com/v1/admin/program/entities/{id}/funding \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gratona.com/v1/admin/program/entities/{id}/funding"
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/entities/{id}/funding', 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/entities/{id}/funding",
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/entities/{id}/funding"
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/entities/{id}/funding")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/program/entities/{id}/funding")
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{
"coverage": {
"covered_through": "2023-12-25",
"active": true,
"monthly_minor": 123,
"ended_on": "2023-12-25",
"ended": true,
"ended_reason": "<string>",
"funders": [
{
"donor_id": 123,
"name": "<string>",
"anonymous": true
}
]
},
"need": {
"kind": "money",
"monthly_minor": 1,
"program_type": "<string>"
},
"rows": [
{
"id": 123,
"entity_id": 123,
"recipient_name": "<string>",
"program_id": 123,
"funder_donor_id": 123,
"funder_name": "<string>",
"donation_id": 123,
"source_type": "gift",
"currency_code": "<string>",
"covered_from": "2023-12-25",
"covered_through": "2023-12-25",
"status": "pledged",
"display_funder": "inherit",
"active": true,
"created_at": "2023-11-07T05:31:56Z",
"reversed_at": "2023-11-07T05:31:56Z",
"ended_reason": "<string>",
"amount": "35.00",
"original_amount": "35.00",
"recorded_amount": "35.00"
}
]
}{
"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.
Path Parameters
Record ID within the organization and any parent resource in this route.
Required range:
x >= 1Example:
4711
⌘I
Read a recipient funding history and current coverage
curl --request GET \
--url https://api.gratona.com/v1/admin/program/entities/{id}/funding \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gratona.com/v1/admin/program/entities/{id}/funding"
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/entities/{id}/funding', 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/entities/{id}/funding",
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/entities/{id}/funding"
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/entities/{id}/funding")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/program/entities/{id}/funding")
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{
"coverage": {
"covered_through": "2023-12-25",
"active": true,
"monthly_minor": 123,
"ended_on": "2023-12-25",
"ended": true,
"ended_reason": "<string>",
"funders": [
{
"donor_id": 123,
"name": "<string>",
"anonymous": true
}
]
},
"need": {
"kind": "money",
"monthly_minor": 1,
"program_type": "<string>"
},
"rows": [
{
"id": 123,
"entity_id": 123,
"recipient_name": "<string>",
"program_id": 123,
"funder_donor_id": 123,
"funder_name": "<string>",
"donation_id": 123,
"source_type": "gift",
"currency_code": "<string>",
"covered_from": "2023-12-25",
"covered_through": "2023-12-25",
"status": "pledged",
"display_funder": "inherit",
"active": true,
"created_at": "2023-11-07T05:31:56Z",
"reversed_at": "2023-11-07T05:31:56Z",
"ended_reason": "<string>",
"amount": "35.00",
"original_amount": "35.00",
"recorded_amount": "35.00"
}
]
}{
"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."
}