Integrations
Review SAP export readiness
Synchronously reviews metadata, accounting context, ownership conflicts and up to25 latest donations (default10), plus up to10 commitments when enabled. May persist open ownership conflicts and local templates. Predicted create/update counters and completed review status do not represent SAP writes. Requires the integration platform global/configured client feature gate (normally integration_platform_foundation). Requires permission: one of access_account_settings.
POST
/
integrations
/
hub
/
connections
/
{connection_id}
/
sap
/
dry-run
Review SAP export readiness
curl --request POST \
--url https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/sap/dry-run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"refresh_metadata": true,
"sample_size": 1
}
'import requests
url = "https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/sap/dry-run"
payload = {
"refresh_metadata": True,
"sample_size": 1
}
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({refresh_metadata: true, sample_size: 1})
};
fetch('https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/sap/dry-run', 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}/sap/dry-run",
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([
'refresh_metadata' => true,
'sample_size' => 1
]),
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}/sap/dry-run"
payload := strings.NewReader("{\n \"refresh_metadata\": true,\n \"sample_size\": 1\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}/sap/dry-run")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"refresh_metadata\": true,\n \"sample_size\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/sap/dry-run")
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 \"refresh_metadata\": true,\n \"sample_size\": 1\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"sync_run_id": 42,
"sync_run": {
"id": 42,
"connection_id": 42,
"provider_key": "Example",
"run_type": "Example",
"trigger_source": "Example",
"direction": "Example",
"status": "Example",
"object_types_json": [
"<string>"
],
"counters_json": {
"created": 2,
"updated": 2,
"skipped": 2,
"failed": 2,
"conflicted": 2,
"retried": 2
},
"summary_json": {
"metadata_snapshot_id": 42,
"metadata_snapshot_version": 2,
"context": {
"company_code": "Example",
"ledger": "Example",
"document_type": "Example",
"default_currency": "Example",
"fund_target_mode": "Example",
"recipient_target_mode": "Example",
"default_offset_gl_account": "Example",
"default_revenue_gl_account": "Example",
"default_fund_target_key": "Example",
"default_recipient_target_key": "Example",
"export_refunds": true,
"export_commitments": true,
"require_balanced_documents": true
},
"context_errors": [
{
"code": "Example",
"message": "Example"
}
],
"mapping_reviews": [
{
"mapping_id": 42,
"hys_object_type": "Example",
"provider_object_type": "Example",
"status": "ready",
"warnings": [
"SAP company_code is required."
],
"errors": [
"SAP company_code is required."
],
"conflicts": [
"SAP company_code is required."
]
}
],
"record_previews": {
"donation": [
{
"status": "create",
"hys_object_type": "Example",
"hys_object_id": 42,
"provider_object_type": "Example",
"provider_object_id": "Example",
"warnings": [
"SAP company_code is required."
],
"errors": [
"SAP company_code is required."
],
"payload_preview": {
"amount": 25,
"currency": "USD",
"designation": "<unknown>",
"transaction_id": "Example",
"document_type": "SA"
}
}
],
"commitment": [
{
"status": "create",
"hys_object_type": "Example",
"hys_object_id": 42,
"provider_object_type": "Example",
"provider_object_id": "Example",
"warnings": [
"SAP company_code is required."
],
"errors": [
"SAP company_code is required."
],
"payload_preview": {
"amount": 25,
"currency": "USD",
"designation": "<unknown>",
"transaction_id": "Example",
"document_type": "SA"
}
}
]
}
},
"context_json": {},
"error_summary_json": {
"reviews_with_errors": 2,
"items": [
{
"mapping_id": 42,
"provider_object_type": "Example",
"object_type": "Example",
"object_id": 42,
"issues": [
"SAP company_code is required."
]
}
]
},
"started_at": "2026-10-20T12:00:00Z",
"finished_at": "2026-10-20T12:00:00Z",
"created_at": "2026-10-20T12:00:00Z",
"updated_at": "2026-10-20T12:00:00Z"
}
},
"message": "Example"
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Not Found",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}Authorizations
bearerAuthapiKeyAuth
Passport bearer token authentication for legacy admin sessions.
Path Parameters
Connection id in the current organization.
Body
application/json
Validated request fields for this operation.
⌘I
Review SAP export readiness
curl --request POST \
--url https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/sap/dry-run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"refresh_metadata": true,
"sample_size": 1
}
'import requests
url = "https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/sap/dry-run"
payload = {
"refresh_metadata": True,
"sample_size": 1
}
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({refresh_metadata: true, sample_size: 1})
};
fetch('https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/sap/dry-run', 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}/sap/dry-run",
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([
'refresh_metadata' => true,
'sample_size' => 1
]),
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}/sap/dry-run"
payload := strings.NewReader("{\n \"refresh_metadata\": true,\n \"sample_size\": 1\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}/sap/dry-run")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"refresh_metadata\": true,\n \"sample_size\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/sap/dry-run")
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 \"refresh_metadata\": true,\n \"sample_size\": 1\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"sync_run_id": 42,
"sync_run": {
"id": 42,
"connection_id": 42,
"provider_key": "Example",
"run_type": "Example",
"trigger_source": "Example",
"direction": "Example",
"status": "Example",
"object_types_json": [
"<string>"
],
"counters_json": {
"created": 2,
"updated": 2,
"skipped": 2,
"failed": 2,
"conflicted": 2,
"retried": 2
},
"summary_json": {
"metadata_snapshot_id": 42,
"metadata_snapshot_version": 2,
"context": {
"company_code": "Example",
"ledger": "Example",
"document_type": "Example",
"default_currency": "Example",
"fund_target_mode": "Example",
"recipient_target_mode": "Example",
"default_offset_gl_account": "Example",
"default_revenue_gl_account": "Example",
"default_fund_target_key": "Example",
"default_recipient_target_key": "Example",
"export_refunds": true,
"export_commitments": true,
"require_balanced_documents": true
},
"context_errors": [
{
"code": "Example",
"message": "Example"
}
],
"mapping_reviews": [
{
"mapping_id": 42,
"hys_object_type": "Example",
"provider_object_type": "Example",
"status": "ready",
"warnings": [
"SAP company_code is required."
],
"errors": [
"SAP company_code is required."
],
"conflicts": [
"SAP company_code is required."
]
}
],
"record_previews": {
"donation": [
{
"status": "create",
"hys_object_type": "Example",
"hys_object_id": 42,
"provider_object_type": "Example",
"provider_object_id": "Example",
"warnings": [
"SAP company_code is required."
],
"errors": [
"SAP company_code is required."
],
"payload_preview": {
"amount": 25,
"currency": "USD",
"designation": "<unknown>",
"transaction_id": "Example",
"document_type": "SA"
}
}
],
"commitment": [
{
"status": "create",
"hys_object_type": "Example",
"hys_object_id": 42,
"provider_object_type": "Example",
"provider_object_id": "Example",
"warnings": [
"SAP company_code is required."
],
"errors": [
"SAP company_code is required."
],
"payload_preview": {
"amount": 25,
"currency": "USD",
"designation": "<unknown>",
"transaction_id": "Example",
"document_type": "SA"
}
}
]
}
},
"context_json": {},
"error_summary_json": {
"reviews_with_errors": 2,
"items": [
{
"mapping_id": 42,
"provider_object_type": "Example",
"object_type": "Example",
"object_id": 42,
"issues": [
"SAP company_code is required."
]
}
]
},
"started_at": "2026-10-20T12:00:00Z",
"finished_at": "2026-10-20T12:00:00Z",
"created_at": "2026-10-20T12:00:00Z",
"updated_at": "2026-10-20T12:00:00Z"
}
},
"message": "Example"
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Not Found",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}