Commitments
Shorten a recipient funding period
Requires bearer or API-key authentication, current organization scope and access to every selected recipient program. Gift/funding administration also follows the donations/reports permission policy. The row must have status funded. ended_on must fall inclusively between its current start and end. Keeps history and the original recorded amount; the effective allocation can decrease to the cost through the new end. Updates activity and coverage after commit; does not refund the gift.
POST
/
admin
/
recipient-funding
/
{funding_id}
/
end
Shorten a recipient funding period
curl --request POST \
--url https://api.gratona.com/v1/admin/recipient-funding/{funding_id}/end \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ended_on": "2026-11-15"
}
'import requests
url = "https://api.gratona.com/v1/admin/recipient-funding/{funding_id}/end"
payload = { "ended_on": "2026-11-15" }
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({ended_on: '2026-11-15'})
};
fetch('https://api.gratona.com/v1/admin/recipient-funding/{funding_id}/end', 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/recipient-funding/{funding_id}/end",
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([
'ended_on' => '2026-11-15'
]),
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/recipient-funding/{funding_id}/end"
payload := strings.NewReader("{\n \"ended_on\": \"2026-11-15\"\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/recipient-funding/{funding_id}/end")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ended_on\": \"2026-11-15\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/recipient-funding/{funding_id}/end")
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 \"ended_on\": \"2026-11-15\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"row": {
"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."
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}Authorizations
bearerAuthapiKeyAuth
Passport bearer token authentication for legacy admin sessions.
Path Parameters
Funding id.
Required range:
x >= 1Example:
123
Body
application/json
Request fields accepted by this operation. Omitted optional properties retain the behavior described above.
New inclusive funding end within the current funded interval.
Example:
"2026-11-15"
⌘I
Shorten a recipient funding period
curl --request POST \
--url https://api.gratona.com/v1/admin/recipient-funding/{funding_id}/end \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ended_on": "2026-11-15"
}
'import requests
url = "https://api.gratona.com/v1/admin/recipient-funding/{funding_id}/end"
payload = { "ended_on": "2026-11-15" }
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({ended_on: '2026-11-15'})
};
fetch('https://api.gratona.com/v1/admin/recipient-funding/{funding_id}/end', 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/recipient-funding/{funding_id}/end",
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([
'ended_on' => '2026-11-15'
]),
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/recipient-funding/{funding_id}/end"
payload := strings.NewReader("{\n \"ended_on\": \"2026-11-15\"\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/recipient-funding/{funding_id}/end")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ended_on\": \"2026-11-15\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/recipient-funding/{funding_id}/end")
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 \"ended_on\": \"2026-11-15\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"row": {
"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."
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}