sdkDeterministic

Reconcile treg usage

pipeline.reconcileTregUsage

Reconcile saved workspace Treg operations against the authoritative 30-day ledger, check funding health and recover saved terminal results from the call archive. Optional operationId requests one exact saved operation; otherwise recovery is bounded to two due operations. Settles a reservation only when the archived result is terminal and cost is known. Returns funding status, not account balances or other customers' usage. Requires full Integrations access and write scope. Never resubmits a paid lookup, polls a provider task or changes funding settings.

Parameters

workspaceIdrequired
string
No description.
credentialIdrequired
string
No description.
operationId
string
No description.

Example

TypeScripttypescript
await pipeline.reconcileTregUsage({
"workspaceId": "00000000-0000-4000-8000-000000000000",
"credentialId": "00000000-0000-4000-8000-000000000000"
})

Response

Success response schemajson schema
{
"type": "object",
"properties": {
"updated": {
"type": "integer",
"minimum": 0
},
"hasUnattributedSpend": {
"type": "boolean"
},
"checkedAt": {
"type": "string",
"format": "date-time"
},
"windowDays": {
"type": "integer",
"enum": [
30
]
},
"holdsReleased": {
"type": "boolean"
},
"balance": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"healthy",
"low",
"empty"
]
},
"checkedAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"status",
"checkedAt"
]
},
"recovered": {
"type": "integer",
"minimum": 0
},
"unavailable": {
"type": "integer",
"minimum": 0
}
},
"required": [
"updated",
"hasUnattributedSpend",
"checkedAt",
"windowDays",
"holdsReleased"
]
}

Exceptions

PipelineError
Thrown for validation, authentication, JSON-RPC, HTTP, and network failures. Inspect code and data when present.
Pipeline TypeScript SDK documentation | Pipeline