SDK reference · Node SDK

prov.attest.captureRequests.deleteMedia

prov.attest.captureRequests.deleteMedia in Node SDK. Delete the images now; the attestations and checks stay on the case.

Signature

prov.attest.captureRequests.deleteMedia(id: string): Promise<{ object: "capture_media_deletion"; captureRequestId: string; deleted: number; imagesDeletedAt: string | null }>

Parameters

idstringRequired

Request fields

idstringpathRequired
The capture request's ID (capr_…).
reasonenumquery
consent_withdrawn when the person withdrew their consent: the request is also cancelled if it is still open, and a withdrawn release record is added. One of consent_withdrawn.

Returns

Promise<{ object: "capture_media_deletion"; captureRequestId: string; deleted: number; imagesDeletedAt: string | null }> What was deleted.

HTTP operation

DELETE /v1/attest/capture_requests/{id}/media: Delete the images

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",
    "session_type": "claim",
    "delivery": "self"
  }),
})).json();
const captureId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/attest/capture_requests/${captureId}/media`, {
  method: "DELETE",
  headers: { Authorization: "Bearer prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x" },
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.