Preview a correction to historical QuickBooks sync
Requires a backfill/correction execution whose provider checkpoints have all finished. Creates a zero-write correction preview from current sources; processed create/update/link checkpoints become corrective updates, while unprocessed writes become conflicts. Separate approval is required. Requires a connected QuickBooks company for mutations. Current user/group permissions must include manage_settings, access_account_settings or group_all in addition to route access. 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}/quickbooks/historical/runs/{run_id}/correction-preview \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/quickbooks/historical/runs/{run_id}/correction-preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/quickbooks/historical/runs/{run_id}/correction-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/integrations/hub/connections/{connection_id}/quickbooks/historical/runs/{run_id}/correction-preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/integrations/hub/connections/{connection_id}/quickbooks/historical/runs/{run_id}/correction-preview"
req, _ := http.NewRequest("POST", 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.post("https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/quickbooks/historical/runs/{run_id}/correction-preview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/quickbooks/historical/runs/{run_id}/correction-preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": 42,
"run_type": "dry_run",
"status": "Example",
"object_types": [
"customer"
],
"counters": {
"total": 2,
"create": 2,
"update": 2,
"link": 2,
"skip": 2,
"conflict": 2,
"pending": 2,
"queued": 2,
"processing": 2,
"failed": 2,
"needs_review": 2,
"skipped": 2,
"processed": 2
},
"summary": {
"snapshot_hash": "Example",
"record_count": 2,
"zero_provider_writes": true,
"requires_approval": true,
"checkpointed": true,
"resumable": true,
"provider_complete": true,
"reviewable_count": 2
},
"context": {
"purpose": "Example",
"filters": {
"program_ids": [
42
],
"object_types": [
"<string>"
],
"date_from": "2023-12-25",
"date_to": "2023-12-25",
"source_run_id": 42
},
"plan_version": 2,
"cursor": {
"strategy": "frozen_plan_v1",
"record_count": 2,
"objects": {}
},
"realm_key": "Example",
"zero_provider_writes": true,
"snapshot_hash": "Example",
"preview_run_id": 42,
"source_run_id": 42,
"approved_by": 42,
"approved_at": "2026-10-20T12:00:00Z",
"requires_approval": true
},
"created_at": "2026-10-20T12:00:00Z",
"started_at": "2026-10-20T12:00:00Z",
"finished_at": "2026-10-20T12:00:00Z",
"events": [
{
"id": 42,
"status": "Example",
"hys_object_type": "Example",
"hys_object_id": 42,
"provider_object_type": "Example",
"retryable": true,
"error_code": "Example",
"plan": {
"hys_object_type": "donor",
"hys_object_id": 42,
"provider_object_type": "customer",
"action": "create",
"reason_code": "Example",
"source_fingerprint": "Example",
"accounting_projection": {},
"destructive_or_corrective": true
},
"outbox_event_id": 42
}
]
}
}{
"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.
Run id in the current organization.
curl --request POST \
--url https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/quickbooks/historical/runs/{run_id}/correction-preview \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/quickbooks/historical/runs/{run_id}/correction-preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/quickbooks/historical/runs/{run_id}/correction-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/integrations/hub/connections/{connection_id}/quickbooks/historical/runs/{run_id}/correction-preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/integrations/hub/connections/{connection_id}/quickbooks/historical/runs/{run_id}/correction-preview"
req, _ := http.NewRequest("POST", 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.post("https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/quickbooks/historical/runs/{run_id}/correction-preview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/integrations/hub/connections/{connection_id}/quickbooks/historical/runs/{run_id}/correction-preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": 42,
"run_type": "dry_run",
"status": "Example",
"object_types": [
"customer"
],
"counters": {
"total": 2,
"create": 2,
"update": 2,
"link": 2,
"skip": 2,
"conflict": 2,
"pending": 2,
"queued": 2,
"processing": 2,
"failed": 2,
"needs_review": 2,
"skipped": 2,
"processed": 2
},
"summary": {
"snapshot_hash": "Example",
"record_count": 2,
"zero_provider_writes": true,
"requires_approval": true,
"checkpointed": true,
"resumable": true,
"provider_complete": true,
"reviewable_count": 2
},
"context": {
"purpose": "Example",
"filters": {
"program_ids": [
42
],
"object_types": [
"<string>"
],
"date_from": "2023-12-25",
"date_to": "2023-12-25",
"source_run_id": 42
},
"plan_version": 2,
"cursor": {
"strategy": "frozen_plan_v1",
"record_count": 2,
"objects": {}
},
"realm_key": "Example",
"zero_provider_writes": true,
"snapshot_hash": "Example",
"preview_run_id": 42,
"source_run_id": 42,
"approved_by": 42,
"approved_at": "2026-10-20T12:00:00Z",
"requires_approval": true
},
"created_at": "2026-10-20T12:00:00Z",
"started_at": "2026-10-20T12:00:00Z",
"finished_at": "2026-10-20T12:00:00Z",
"events": [
{
"id": 42,
"status": "Example",
"hys_object_type": "Example",
"hys_object_id": 42,
"provider_object_type": "Example",
"retryable": true,
"error_code": "Example",
"plan": {
"hys_object_type": "donor",
"hys_object_id": 42,
"provider_object_type": "customer",
"action": "create",
"reason_code": "Example",
"source_fingerprint": "Example",
"accounting_projection": {},
"destructive_or_corrective": true
},
"outbox_event_id": 42
}
]
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Not Found",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}