Keep reviewed outgoing gift groups in Gratona
Accepts 1 to 100 distinct safe_to_keep_local groups in one currency using current tokens/counts/totals. Rechecks full payment topology, source mappings and all related outgoing work before installing durable per-record keep-local controls and marking reviewed work skipped. Those controls prevent later edits from recreating outgoing work for this connection. Gift owners, payments and provider records are unchanged. Requires the integration platform global/configured client feature gate (normally integration_platform_foundation). Requires permission: one of access_account_settings.
curl --request POST \
--url https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/outbound-donation-owner-decisions/keep-local \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"current_owner_id": 1,
"expected_record_count": 1,
"expected_total_amount": 25,
"review_token": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
]
}
'import requests
url = "https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/outbound-donation-owner-decisions/keep-local"
payload = { "items": [
{
"current_owner_id": 1,
"expected_record_count": 1,
"expected_total_amount": 25,
"review_token": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
] }
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({
items: [
{
current_owner_id: 1,
expected_record_count: 1,
expected_total_amount: 25,
review_token: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
}
]
})
};
fetch('https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/outbound-donation-owner-decisions/keep-local', 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/integrations/hub/connections/{connection_id}/outbound-donation-owner-decisions/keep-local",
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([
'items' => [
[
'current_owner_id' => 1,
'expected_record_count' => 1,
'expected_total_amount' => 25,
'review_token' => 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
]
]
]),
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/integrations/hub/connections/{connection_id}/outbound-donation-owner-decisions/keep-local"
payload := strings.NewReader("{\n \"items\": [\n {\n \"current_owner_id\": 1,\n \"expected_record_count\": 1,\n \"expected_total_amount\": 25,\n \"review_token\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n }\n ]\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/integrations/hub/connections/{connection_id}/outbound-donation-owner-decisions/keep-local")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"current_owner_id\": 1,\n \"expected_record_count\": 1,\n \"expected_total_amount\": 25,\n \"review_token\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/outbound-donation-owner-decisions/keep-local")
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 \"items\": [\n {\n \"current_owner_id\": 1,\n \"expected_record_count\": 1,\n \"expected_total_amount\": 25,\n \"review_token\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"run_id": 42,
"resolution_count": 2,
"record_count": 2,
"donation_ids": [
42
],
"outbox_event_ids": [
42
],
"control_ids": [
42
],
"total_amount": "125.00",
"currency": "Example",
"side_effects": {
"gifts_changed": 2,
"donors_created": 0,
"donations_created": 0,
"payments_changed": 0,
"messages_sent": 0,
"provider_requests_sent": 0,
"sync_cursors_changed": 0,
"refunds_held_for_review": 2
},
"preview": {
"connection_id": 42,
"decision_count": 2,
"safe_decision_count": 2,
"record_count": 2,
"total_amount": "125.00",
"currency": "Example",
"decisions": [
{
"current_owner": {
"id": 42,
"name": "Example",
"email": "Example",
"username": "Example",
"archived_at": "2023-11-07T05:31:56Z",
"profile": {
"display_name": "Example",
"email": "Example",
"username": "Example",
"organization_name": "Example"
}
},
"record_count": 2,
"total_amount": "125.00",
"currency": "Example",
"currencies": [
"<string>"
],
"date_from": "2023-11-07T05:31:56Z",
"date_to": "2023-11-07T05:31:56Z",
"donation_ids": [
42
],
"outbox_event_ids": [
42
],
"candidates": [
{
"id": 42,
"name": "Example",
"email": "Example",
"username": "Example",
"provider_object_id": "Example",
"mapping_id": 42,
"mapping_updated_at": "2023-11-07T05:31:56Z",
"profile": {
"display_name": "Example",
"email": "Example",
"username": "Example",
"organization_name": "Example"
},
"match_signals": [
"display_name"
],
"has_open_identity_conflict": true,
"safe_to_select": true
}
],
"safe_to_select": true,
"safe_to_keep_local": true,
"blockers": [
"<string>"
],
"keep_local_blockers": [
"<string>"
],
"review_token": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
],
"side_effects": {
"gifts_changed": 2,
"donors_created": 0,
"donations_created": 0,
"payments_changed": 0,
"messages_sent": 0,
"provider_requests_sent": 0,
"sync_cursors_changed": 0,
"refunds_held_for_review": 2
},
"recent_resolution": {
"run_id": 42,
"decision": "keep_local",
"record_count": 2,
"total_amount": "125.00",
"currency": "Example",
"created_at": "2023-11-07T05:31:56Z"
}
}
},
"message": "Example"
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Not Found",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}Authorizations
Passport bearer token authentication for legacy admin sessions.
Path Parameters
Connection id in the current organization.
Body
Validated request fields for this operation.
Items. Validation: required, array, min:1, max:100.
1 - 100 elementsShow child attributes
Show child attributes
curl --request POST \
--url https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/outbound-donation-owner-decisions/keep-local \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"current_owner_id": 1,
"expected_record_count": 1,
"expected_total_amount": 25,
"review_token": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
]
}
'import requests
url = "https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/outbound-donation-owner-decisions/keep-local"
payload = { "items": [
{
"current_owner_id": 1,
"expected_record_count": 1,
"expected_total_amount": 25,
"review_token": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
] }
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({
items: [
{
current_owner_id: 1,
expected_record_count: 1,
expected_total_amount: 25,
review_token: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
}
]
})
};
fetch('https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/outbound-donation-owner-decisions/keep-local', 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/integrations/hub/connections/{connection_id}/outbound-donation-owner-decisions/keep-local",
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([
'items' => [
[
'current_owner_id' => 1,
'expected_record_count' => 1,
'expected_total_amount' => 25,
'review_token' => 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
]
]
]),
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/integrations/hub/connections/{connection_id}/outbound-donation-owner-decisions/keep-local"
payload := strings.NewReader("{\n \"items\": [\n {\n \"current_owner_id\": 1,\n \"expected_record_count\": 1,\n \"expected_total_amount\": 25,\n \"review_token\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n }\n ]\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/integrations/hub/connections/{connection_id}/outbound-donation-owner-decisions/keep-local")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"current_owner_id\": 1,\n \"expected_record_count\": 1,\n \"expected_total_amount\": 25,\n \"review_token\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/outbound-donation-owner-decisions/keep-local")
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 \"items\": [\n {\n \"current_owner_id\": 1,\n \"expected_record_count\": 1,\n \"expected_total_amount\": 25,\n \"review_token\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"run_id": 42,
"resolution_count": 2,
"record_count": 2,
"donation_ids": [
42
],
"outbox_event_ids": [
42
],
"control_ids": [
42
],
"total_amount": "125.00",
"currency": "Example",
"side_effects": {
"gifts_changed": 2,
"donors_created": 0,
"donations_created": 0,
"payments_changed": 0,
"messages_sent": 0,
"provider_requests_sent": 0,
"sync_cursors_changed": 0,
"refunds_held_for_review": 2
},
"preview": {
"connection_id": 42,
"decision_count": 2,
"safe_decision_count": 2,
"record_count": 2,
"total_amount": "125.00",
"currency": "Example",
"decisions": [
{
"current_owner": {
"id": 42,
"name": "Example",
"email": "Example",
"username": "Example",
"archived_at": "2023-11-07T05:31:56Z",
"profile": {
"display_name": "Example",
"email": "Example",
"username": "Example",
"organization_name": "Example"
}
},
"record_count": 2,
"total_amount": "125.00",
"currency": "Example",
"currencies": [
"<string>"
],
"date_from": "2023-11-07T05:31:56Z",
"date_to": "2023-11-07T05:31:56Z",
"donation_ids": [
42
],
"outbox_event_ids": [
42
],
"candidates": [
{
"id": 42,
"name": "Example",
"email": "Example",
"username": "Example",
"provider_object_id": "Example",
"mapping_id": 42,
"mapping_updated_at": "2023-11-07T05:31:56Z",
"profile": {
"display_name": "Example",
"email": "Example",
"username": "Example",
"organization_name": "Example"
},
"match_signals": [
"display_name"
],
"has_open_identity_conflict": true,
"safe_to_select": true
}
],
"safe_to_select": true,
"safe_to_keep_local": true,
"blockers": [
"<string>"
],
"keep_local_blockers": [
"<string>"
],
"review_token": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
],
"side_effects": {
"gifts_changed": 2,
"donors_created": 0,
"donations_created": 0,
"payments_changed": 0,
"messages_sent": 0,
"provider_requests_sent": 0,
"sync_cursors_changed": 0,
"refunds_held_for_review": 2
},
"recent_resolution": {
"run_id": 42,
"decision": "keep_local",
"record_count": 2,
"total_amount": "125.00",
"currency": "Example",
"created_at": "2023-11-07T05:31:56Z"
}
}
},
"message": "Example"
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Not Found",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}