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

claimIdstringRequired
params{ 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

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();

Was this page helpful? Send us feedback

LLM? Read llms.txt.