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_…). reasonenumqueryconsent_withdrawnwhen the person withdrew their consent: the request is also cancelled if it is still open, and awithdrawnrelease record is added. One ofconsent_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
- authentication_required
- insufficient_scope
- parameter_invalid
- rate_limit_exceeded
- release_unavailable
- resource_missing
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();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/attest/capture_requests", headers={"Authorization": "Bearer prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x"}, json={
"case_id": "CLM-DOCS-CAPTURE",
"session_type": "claim",
"delivery": "self"
}).json()
capture_id = step1["id"]
data = httpx.delete(f"{api}/v1/attest/capture_requests/{capture_id}/media", headers={"Authorization": "Bearer prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x"}).json()