Record what happened to an action whose outcome is unknown
const url = 'https://api.katara.com/katara/v1/orgs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/environments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/actions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reconciliation';const options = { method: 'POST', headers: { 'Idempotency-Key': 'example', 'X-Katara-CSRF': '1', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"outcome":"completed","reference":"example","note":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.katara.com/katara/v1/orgs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/environments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/actions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reconciliation \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: example' \ --header 'X-Katara-CSRF: 1' \ --data '{ "outcome": "completed", "reference": "example", "note": "example" }'Owner or admin, as a person whose sign-in is under five minutes old; requires locus:actions:reconcile, which no key carries. An API key, a service account or a workload is refused with human_session_required, and an older sign-in with reauthentication_required. The record is written once and never changed, and it settles the action’s tool unit in the same transaction: completed charges it at the price the action was admitted at, not_completed releases it. A repeat with the same key and body returns the record; the same key with another body, or any second resolution of the action, is a 409 conflict, and the money stays where the first record put it. Nothing calls the tool again.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Browser cookie mutations require value 1 and an allowed Origin. Session bearer clients may omit this header.
Required for cookie-authenticated changes. Use the UUID of the account that loaded the application. A different current cookie account returns account_changed before the handler runs. Session bearer and API key clients do not require this header.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Completed: the effect happened, and the unit is charged at the price the action was admitted at. not_completed: it did not, and the unit is released.
Where the evidence is: a ticket, the provider’s log entry, a case number.
What was found.
Responses
Section titled “Responses”The resolution is recorded and the unit settled.
An external runtime’s action whose outcome is unknown, and its resolution once there is one. It carries identifiers, states, amounts and times, never the action’s input or the tool’s output. unit is absent when the action had no tool unit.
object
The call ended without a reply anyone could trust, so nobody knows whether the effect happened.
The action’s one tool unit as its budget holds it.
object
The tool tariff the action was admitted at, in atomic credit units (nine decimal places).
Held: reserved and not yet decided. unknown: reserved and marked as awaiting reconciliation once no call could still be running. charged: the unit was spent. released: it was returned to the budget.
What the owner or admin who resolved the action recorded. Written once and never changed.
object
What the record did to the unit. Absent when the action had none.
Example
{ "mode": "test", "effect": "read_only", "outcome": "unknown", "unit": { "state": "held" }, "resolution": { "outcome": "completed", "unit_outcome": "charged" }}The body is malformed, names a field the contract lacks, or the key is missing.
Human_session_required: the caller is not a person. reauthentication_required: the sign-in is older than five minutes. permission_denied: the role is not owner or admin.
The action is unavailable in this environment.
The action does not await reconciliation, it already has one, its unit was settled another way, or the key was used for another request. The first record stands; a key with wider permissions does not change this.
The action or its authority could not be checked.