Retrieve a kept document's bytes
BIL-015. The whole document, handed over only after its retained bytes were read back and matched the size and SHA-256 fingerprint recorded when it was kept. A pending, missing or altered document, or a store that cannot be reached, is refused with its reason and no byte. **Required permission:** `billing.document:retrieve`
/billing/v1/kept-documents/{documentId}/contentBIL-015. The whole document, handed over only after its retained bytes were read back and matched the size and SHA-256 fingerprint recorded when it was kept. A pending, missing or altered document, or a store that cannot be reached, is refused with its reason and no byte.
Required permission: billing.document:retrieve
Authorization
oauth2 In: header
Response Body
*/*
*/*
curl -X GET "https://example.com/billing/v1/kept-documents/{documentId}/content""string"Read a kept document's details
BIL-015. What the document is, the source revision it was kept for, its size and SHA-256 fingerprint once drawn, its status (PENDING, AVAILABLE, REMOVING, REMOVED), its retention period and end, when it was asked for and made available, the last failure of a pending document, and its removal trace once a removal was asked for. Never its bytes; reading creates nothing. **Required permission:** `billing.document:read`
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`