Rebuild the signed Trust Record for a released action
Rebuilds the signed Execution Trust Record for an action that was released but whose record was never produced (ADR-0012).
curl --request POST \
--url https://parmana-api-real.vercel.app/execution-intents/{businessTransactionId}/finalize \
--header 'Authorization: Bearer <token>'import requests
url = "https://parmana-api-real.vercel.app/execution-intents/{businessTransactionId}/finalize"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://parmana-api-real.vercel.app/execution-intents/{businessTransactionId}/finalize', 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://parmana-api-real.vercel.app/execution-intents/{businessTransactionId}/finalize",
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://parmana-api-real.vercel.app/execution-intents/{businessTransactionId}/finalize"
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://parmana-api-real.vercel.app/execution-intents/{businessTransactionId}/finalize")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://parmana-api-real.vercel.app/execution-intents/{businessTransactionId}/finalize")
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{
"outcome": "ALREADY_FINALIZED",
"businessTransactionId": "b1237ce3-305a-4004-8179-749352fc1ade",
"trustRecordId": "3f8d340d-14c5-4d2e-b692-492fa74b2651",
"trustRecord": "The full Execution Trust Record. See the Execution Trust Record schema."
}{
"error": "authentication required"
}{
"error": "This action requires a caller credential provisioned as a verified human (credentialHolderType: USER).",
"code": "NON_HUMAN_CALLER_DENIED"
}{
"error": "No Execution Intent exists for business transaction 'unknown-transaction'. Transactions created before Execution Intents were introduced have none.",
"code": "EXECUTION_INTENT_NOT_FOUND"
}{
"error": "The Execution Intent for business transaction 'b1237ce3-305a-4004-8179-749352fc1ade' is in state PREPARED and has no saved execution result, so its signed Execution Trust Record cannot be rebuilt. The action may or may not have been released. Establish the outcome from the connector and reconcile it by hand. Nothing was called.",
"code": "EXECUTION_INTENT_RESULT_NOT_RECORDED"
}{
"error": "Execution Intents are not enabled on this deployment.",
"code": "EXECUTION_INTENTS_NOT_ENABLED"
}Authorizations
Caller API key issued by scripts/generate-api-key.ts. Sent as Authorization: Bearer . Verified against a stored SHA-256 hash in constant time by packages/api/src/auth/StaticKeyAuthenticator.ts. Required on every route not listed as exempt in this document's top-level description. See /api-reference/authentication.
Path Parameters
Response
The Trust Record exists. outcome says whether this call rebuilt it (FINALIZED) or it already existed (ALREADY_FINALIZED).
Response returned by POST /execution-intents/{businessTransactionId}/finalize. The finalize operation never calls a connector. It is safe to run more than once: FINALIZED means a Trust Record was rebuilt by this call, ALREADY_FINALIZED means one already existed and nothing was built.
FINALIZED, ALREADY_FINALIZED Identifier of the Execution Trust Record. Equal to trustRecord.trustRecordId.
Canonical immutable record representing everything Parmana knows about a Business Transaction: the authoritative source for replay, verification, audit, and receipt generation. One Execution Trust Record exists per Business Transaction. overrides, executions, verifications, and receipts are append-only: existing entries are never modified or removed.
Show child attributes
Show child attributes
{
"trustRecordId": "759e916e-66d2-48c3-8869-55d557acf155",
"businessTransactionId": "eed2a972-1bf5-4166-8472-761f76fbf1b2",
"transaction": {
"businessTransactionId": "eed2a972-1bf5-4166-8472-761f76fbf1b2",
"metadata": {
"businessTransactionId": "eed2a972-1bf5-4166-8472-761f76fbf1b2",
"correlationId": "6b97caca-1605-4711-bf00-7e5a65434d93",
"sourceSystem": "vendor-payment-service",
"submittedBy": "ap-automation",
"submittedAt": "2026-07-07T16:38:59.285Z"
},
"authority": {
"authorityId": "c0c01c23-04a2-45f2-a821-ef24bfca02d3",
"authorityType": "SERVICE",
"principalId": "ap-automation-svc",
"displayName": "Accounts Payable Automation",
"issuedAt": "2026-07-07T16:38:59.285Z"
},
"authorization": {
"authorizationId": "6e9d6aa6-6d20-40a8-b05d-383516365cc7",
"authorityId": "c0c01c23-04a2-45f2-a821-ef24bfca02d3",
"purpose": "Authorize vendor payment disbursement",
"issuedAt": "2026-07-07T16:38:59.285Z"
},
"intent": {
"intentId": "ae5865f6-181b-409a-90ec-1b4b8b8414ba",
"authorizationId": "6e9d6aa6-6d20-40a8-b05d-383516365cc7",
"action": "payments:execute",
"target": "vendor/V-100",
"parameters": { "amount": 4500, "currency": "USD" },
"createdAt": "2026-07-07T16:38:59.285Z"
},
"policy": {
"name": "vendor-payment",
"version": "2.0.0",
"schemaVersion": "1.0.0"
},
"signals": {
"vendorVerified": true,
"invoiceVerified": true,
"paymentApproved": true,
"sufficientFunds": true,
"paymentAmount": 4500,
"riskScore": 10
},
"status": "RECEIVED",
"createdAt": "2026-07-07T16:38:59.325Z"
},
"overrides": [],
"executions": [
{
"executionId": "2be38c15-f93c-4621-9a1c-7570c130dea0",
"businessTransactionId": "eed2a972-1bf5-4166-8472-761f76fbf1b2",
"decision": {
"decisionId": "9d69dc0b-333a-4be3-b09f-358fece806f3",
"intentId": "ae5865f6-181b-409a-90ec-1b4b8b8414ba",
"policy": {
"name": "vendor-payment",
"version": "2.0.0",
"schemaVersion": "1.0.0"
},
"signals": {
"vendorVerified": true,
"invoiceVerified": true,
"paymentApproved": true,
"sufficientFunds": true,
"paymentAmount": 4500,
"riskScore": 10
},
"outcome": "APPROVED",
"reason": "Vendor payment authorized. Vendor verification, invoice verification, payment approval, funding, and risk assessment requirements were satisfied.",
"evaluatedAt": "2026-07-07T16:38:59.326Z"
},
"status": "COMPLETED",
"mode": "SYNC",
"startedAt": "2026-07-07T16:38:59.328Z",
"metadata": {
"authorizationId": "1dc2d137-fde2-4d9c-b298-79e9f8a0d03e"
},
"evidence": {
"businessTransactionId": "eed2a972-1bf5-4166-8472-761f76fbf1b2",
"action": "payments:execute",
"target": "vendor/V-100",
"parameters": { "amount": 4500, "currency": "USD" },
"success": true,
"executedAt": "2026-07-07T16:38:59.328Z",
"attributes": {
"connector": {
"connectorId": "vendor-payment",
"connectorVersion": "1.0.0",
"capability": "payments:execute",
"sanitizedEndpoint": "vendor/V-100",
"credentialProviderId": "environment",
"requestSummary": {
"businessTransactionId": "eed2a972-1bf5-4166-8472-761f76fbf1b2",
"action": "payments:execute",
"target": "vendor/V-100",
"parameters": { "amount": 4500, "currency": "USD" }
},
"responseSummary": { "success": true, "metadata": {} },
"startedAt": "2026-07-07T16:38:59.328Z",
"completedAt": "2026-07-07T16:38:59.328Z",
"connectorEvidenceHash": "7bcacb3e399a713e44a4f48aa2783de8060ae28591e4fc1256b504bd32cd7aea"
}
}
},
"completedAt": "2026-07-07T16:38:59.329Z"
}
],
"verifications": [
{
"verificationId": "0b96c8b4-9cd8-4162-81fc-086575cf0924",
"businessTransactionId": "eed2a972-1bf5-4166-8472-761f76fbf1b2",
"status": "VERIFIED",
"message": "Execution Trust Record verified successfully.",
"verifiedAt": "2026-07-07T16:38:59.331Z",
"trustRecordHash": "989aef83d595202ec02bb338ac00461abec0541098ea065f965b5cde342d3b25"
}
],
"receipts": [
{
"receiptId": "3073a598-f927-4caf-8bb8-4f083f62b7e9",
"businessTransactionId": "eed2a972-1bf5-4166-8472-761f76fbf1b2",
"trustRecordHash": "989aef83d595202ec02bb338ac00461abec0541098ea065f965b5cde342d3b25",
"receiptHash": "8a5a0e9255dafef5ec588f0834e3c5b81dc7feb98a59f8bfa7083438fa58e231",
"issuedAt": "2026-07-07T16:38:59.331Z",
"algorithm": "ed25519",
"signature": "vzpykBuJhoy/2BdiR1x02KYZqMtKJu39olRJdzM5veSo9nYmoNSYQnt9HELlb2jlGWf07jPhP8ZXlrQnN4KQBA=="
}
],
"createdAt": "2026-07-07T16:38:59.329Z",
"updatedAt": "2026-07-07T16:38:59.329Z",
"trustRecordHash": "989aef83d595202ec02bb338ac00461abec0541098ea065f965b5cde342d3b25",
"signature": {
"algorithm": "ed25519",
"keyId": "default",
"value": "l41lr6nCUbrzEfoil/3+gkXd4zEQ9TR1qFaSwLuE70L/9U6cVz3VXdM1lPsDfELKh6RO4qcDrFWF/S3k4CAxAQ==",
"signedAt": "2026-07-07T16:38:59.330Z"
}
}
curl --request POST \
--url https://parmana-api-real.vercel.app/execution-intents/{businessTransactionId}/finalize \
--header 'Authorization: Bearer <token>'import requests
url = "https://parmana-api-real.vercel.app/execution-intents/{businessTransactionId}/finalize"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://parmana-api-real.vercel.app/execution-intents/{businessTransactionId}/finalize', 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://parmana-api-real.vercel.app/execution-intents/{businessTransactionId}/finalize",
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://parmana-api-real.vercel.app/execution-intents/{businessTransactionId}/finalize"
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://parmana-api-real.vercel.app/execution-intents/{businessTransactionId}/finalize")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://parmana-api-real.vercel.app/execution-intents/{businessTransactionId}/finalize")
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{
"outcome": "ALREADY_FINALIZED",
"businessTransactionId": "b1237ce3-305a-4004-8179-749352fc1ade",
"trustRecordId": "3f8d340d-14c5-4d2e-b692-492fa74b2651",
"trustRecord": "The full Execution Trust Record. See the Execution Trust Record schema."
}{
"error": "authentication required"
}{
"error": "This action requires a caller credential provisioned as a verified human (credentialHolderType: USER).",
"code": "NON_HUMAN_CALLER_DENIED"
}{
"error": "No Execution Intent exists for business transaction 'unknown-transaction'. Transactions created before Execution Intents were introduced have none.",
"code": "EXECUTION_INTENT_NOT_FOUND"
}{
"error": "The Execution Intent for business transaction 'b1237ce3-305a-4004-8179-749352fc1ade' is in state PREPARED and has no saved execution result, so its signed Execution Trust Record cannot be rebuilt. The action may or may not have been released. Establish the outcome from the connector and reconcile it by hand. Nothing was called.",
"code": "EXECUTION_INTENT_RESULT_NOT_RECORDED"
}{
"error": "Execution Intents are not enabled on this deployment.",
"code": "EXECUTION_INTENTS_NOT_ENABLED"
}