SDK reference · Node SDK

prov.attest.captureRequests.cancel

prov.attest.captureRequests.cancel in Node SDK. Cancel an open request (cancelling a cancelled one returns it unchanged).

Signature

prov.attest.captureRequests.cancel(id: string): Promise<CaptureRequest>

Parameters

idstringRequired

Request fields

Idempotency-Keystringheader
Retry a create safely: the same key + request returns the stored response (24 h, per caller).
idstringpathRequired
The capture request's ID (capr_…).

Returns

Promise<CaptureRequest> The cancelled request.

HTTP operation

POST /v1/attest/capture_requests/{id}/cancel: Cancel a capture request

Errors

Example

const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/attest/capture_requests`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "case_id": "CLM-DOCS-CAPTURE",
    "items": [
      {
        "type": "photo"
      }
    ],
    "delivery": "self"
  }),
})).json();
const captureId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/attest/capture_requests/${captureId}/cancel`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x" },
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.