SDK reference · Node SDK
prov.attest.cases.transition
prov.attest.cases.transition in Node SDK. Move the case along the workflow graph.
Signature
prov.attest.cases.transition(claimId: string, params: { toStatus: CaseStatus; reasonCode?: CaseReasonCode; note?: string }): Promise<CaseSummary>Parameters
claimIdstringRequiredparams{ toStatus: CaseStatus; reasonCode?: CaseReasonCode; note?: string }Required
Request fields
Idempotency-Keystringheader- Retry a create safely: the same key + request returns the stored response (24 h, per caller).
claim_idstringpathRequired- The claim, or case in another vertical, the asset belongs to.
to_statusenumRequired- The status to move to. One of
in_review,approved,denied,escalated,reopened. reason_codeenum- A structured reason, from the fixed list. One of
provenance_verified,risk_accepted,signature_invalid,suspected_fraud,insufficient_evidence,policyholder_withdrew,OTHER. notestring- A note for the record.
Returns
Promise<CaseSummary> The updated case.
HTTP operation
POST /v1/attest/cases/{claim_id}/transition: Change a case's status
Errors
- authentication_required
- invalid_json
- parameter_invalid
- parameter_missing
- rate_limit_exceeded
- resource_missing
Example
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/attest/cases/VER-SANDBOX-INSPECTION/transition`, {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ "to_status": "in_review", "note": "Checking the inspector's GPS" }),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/attest/cases/VER-SANDBOX-INSPECTION/transition", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}, json={
"to_status": "in_review",
"note": "Checking the inspector's GPS"
}).json()