SmartGare
API referenceEndpoints

Remove a kept document whose keeping time is over

BIL-015. Removes the document's bytes from the store once its retention end has passed and nothing Billing knows still needs it, and keeps the record as the trace: who asked, why and when, then when the store let the bytes go. Asking again answers the same trace. Exported copies and backups are not removed. **Required permission:** `billing.document:remove`

POST/billing/v1/kept-documents/{documentId}/removal

BIL-015. Removes the document's bytes from the store once its retention end has passed and nothing Billing knows still needs it, and keeps the record as the trace: who asked, why and when, then when the store let the bytes go. Asking again answers the same trace. Exported copies and backups are not removed.

Required permission: billing.document:remove

AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*RemoveKeptDocumentRequest

Response Body

*/*

*/*

curl -X POST "https://example.com/billing/v1/kept-documents/{documentId}/removal" \  -H "Content-Type: application/json" \  -d '{    "reason": "string"  }'
{  "document_id": "string",  "kind": "string",  "reason": "string",  "removed_at": "2019-08-24T14:15:22Z",  "replayed": true,  "requested_at": "2019-08-24T14:15:22Z",  "requested_by": "string",  "retain_until": "2019-08-24T14:15:22Z",  "status": "string"}