Preview a sponsorship recipient reassignment
Validates active source/target, target visibility and basic capacity status, plus duplicate donor/recipient relationships. Returns current payment continuity and effective time. The compatibility target_entity_id alias can supply entity_id and omit transition_type; it still needs expected_version for success. expected_version must match; write rechecks detailed capacity and donor state under locks.
curl --request POST \
--url https://api.gratona.com/v1/admin/sponsorships/{donor_entity_id}/reassignment-preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entity_id": 42,
"transition_type": "reassigned",
"expected_version": 1,
"reason_code": "donor_requested_change",
"notes": "Donor requested another recipient.",
"effective_at": "2026-10-20T12:00:00Z"
}
'import requests
url = "https://api.gratona.com/v1/admin/sponsorships/{donor_entity_id}/reassignment-preview"
payload = {
"entity_id": 42,
"transition_type": "reassigned",
"expected_version": 1,
"reason_code": "donor_requested_change",
"notes": "Donor requested another recipient.",
"effective_at": "2026-10-20T12:00:00Z"
}
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({
entity_id: 42,
transition_type: 'reassigned',
expected_version: 1,
reason_code: 'donor_requested_change',
notes: 'Donor requested another recipient.',
effective_at: '2026-10-20T12:00:00Z'
})
};
fetch('https://api.gratona.com/v1/admin/sponsorships/{donor_entity_id}/reassignment-preview', 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/sponsorships/{donor_entity_id}/reassignment-preview",
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([
'entity_id' => 42,
'transition_type' => 'reassigned',
'expected_version' => 1,
'reason_code' => 'donor_requested_change',
'notes' => 'Donor requested another recipient.',
'effective_at' => '2026-10-20T12:00:00Z'
]),
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/sponsorships/{donor_entity_id}/reassignment-preview"
payload := strings.NewReader("{\n \"entity_id\": 42,\n \"transition_type\": \"reassigned\",\n \"expected_version\": 1,\n \"reason_code\": \"donor_requested_change\",\n \"notes\": \"Donor requested another recipient.\",\n \"effective_at\": \"2026-10-20T12:00:00Z\"\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/sponsorships/{donor_entity_id}/reassignment-preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"entity_id\": 42,\n \"transition_type\": \"reassigned\",\n \"expected_version\": 1,\n \"reason_code\": \"donor_requested_change\",\n \"notes\": \"Donor requested another recipient.\",\n \"effective_at\": \"2026-10-20T12:00:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/sponsorships/{donor_entity_id}/reassignment-preview")
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 \"entity_id\": 42,\n \"transition_type\": \"reassigned\",\n \"expected_version\": 1,\n \"reason_code\": \"donor_requested_change\",\n \"notes\": \"Donor requested another recipient.\",\n \"effective_at\": \"2026-10-20T12:00:00Z\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"donor_entity_id": 42,
"donor_id": 42,
"from_entity_id": 42,
"entity_id": 42,
"from_program_id": 42,
"program_id": 42,
"expected_version": 42,
"effective_at": "2026-10-20T12:00:00Z",
"payment_continuity": {
"commitment_count": 1,
"commitment_ids": [
42
],
"amount": "25.00",
"frequency": 1,
"method": 3,
"billing_anchor": "2026-11-01",
"will_preserve_schedule": true
}
}
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Not Found",
"status": "error"
}{
"error": "Conflict",
"error_code": "SPONSORSHIP_LIFECYCLE_VERSION_CONFLICT",
"message": "Reload and review the sponsorship again.",
"expected_version": 42,
"current_version": 42
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}Authorizations
Passport bearer token authentication for legacy admin sessions.
Path Parameters
Record ID in the authenticated organization.
42
Body
- Option 1
- Option 2
Replacement active visible recipient in an accessible program.
x >= 142
Supported transition.
reassigned "reassigned"
Current sponsorship lifecycle_version.
x >= 11
Active context reason; required by catalog policy where configured.
100"donor_requested_change"
Context note; required for reasons configured to need notes.
2000"Donor requested another recipient."
Business effective time; defaults now.
"2026-10-20T12:00:00Z"
Response
Preview a sponsorship recipient reassignment completed.
Show child attributes
Show child attributes
curl --request POST \
--url https://api.gratona.com/v1/admin/sponsorships/{donor_entity_id}/reassignment-preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entity_id": 42,
"transition_type": "reassigned",
"expected_version": 1,
"reason_code": "donor_requested_change",
"notes": "Donor requested another recipient.",
"effective_at": "2026-10-20T12:00:00Z"
}
'import requests
url = "https://api.gratona.com/v1/admin/sponsorships/{donor_entity_id}/reassignment-preview"
payload = {
"entity_id": 42,
"transition_type": "reassigned",
"expected_version": 1,
"reason_code": "donor_requested_change",
"notes": "Donor requested another recipient.",
"effective_at": "2026-10-20T12:00:00Z"
}
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({
entity_id: 42,
transition_type: 'reassigned',
expected_version: 1,
reason_code: 'donor_requested_change',
notes: 'Donor requested another recipient.',
effective_at: '2026-10-20T12:00:00Z'
})
};
fetch('https://api.gratona.com/v1/admin/sponsorships/{donor_entity_id}/reassignment-preview', 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/sponsorships/{donor_entity_id}/reassignment-preview",
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([
'entity_id' => 42,
'transition_type' => 'reassigned',
'expected_version' => 1,
'reason_code' => 'donor_requested_change',
'notes' => 'Donor requested another recipient.',
'effective_at' => '2026-10-20T12:00:00Z'
]),
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/sponsorships/{donor_entity_id}/reassignment-preview"
payload := strings.NewReader("{\n \"entity_id\": 42,\n \"transition_type\": \"reassigned\",\n \"expected_version\": 1,\n \"reason_code\": \"donor_requested_change\",\n \"notes\": \"Donor requested another recipient.\",\n \"effective_at\": \"2026-10-20T12:00:00Z\"\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/sponsorships/{donor_entity_id}/reassignment-preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"entity_id\": 42,\n \"transition_type\": \"reassigned\",\n \"expected_version\": 1,\n \"reason_code\": \"donor_requested_change\",\n \"notes\": \"Donor requested another recipient.\",\n \"effective_at\": \"2026-10-20T12:00:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/sponsorships/{donor_entity_id}/reassignment-preview")
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 \"entity_id\": 42,\n \"transition_type\": \"reassigned\",\n \"expected_version\": 1,\n \"reason_code\": \"donor_requested_change\",\n \"notes\": \"Donor requested another recipient.\",\n \"effective_at\": \"2026-10-20T12:00:00Z\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"donor_entity_id": 42,
"donor_id": 42,
"from_entity_id": 42,
"entity_id": 42,
"from_program_id": 42,
"program_id": 42,
"expected_version": 42,
"effective_at": "2026-10-20T12:00:00Z",
"payment_continuity": {
"commitment_count": 1,
"commitment_ids": [
42
],
"amount": "25.00",
"frequency": 1,
"method": 3,
"billing_anchor": "2026-11-01",
"will_preserve_schedule": true
}
}
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Not Found",
"status": "error"
}{
"error": "Conflict",
"error_code": "SPONSORSHIP_LIFECYCLE_VERSION_CONFLICT",
"message": "Reload and review the sponsorship again.",
"expected_version": 42,
"current_version": 42
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}