SmartGare
API referenceEndpoints

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`

GET/billing/v1/kept-documents/{documentId}

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

AuthorizationBearer <token>

In: header

Response Body

*/*

curl -X GET "https://example.com/billing/v1/kept-documents/{documentId}"
{  "available_at": "2019-08-24T14:15:22Z",  "failed_at": "2019-08-24T14:15:22Z",  "failure": "string",  "id": "string",  "kind": "string",  "media_type": "string",  "removal": {    "reason": "string",    "removed_at": "2019-08-24T14:15:22Z",    "requested_at": "2019-08-24T14:15:22Z",    "requested_by": "string"  },  "requested_at": "2019-08-24T14:15:22Z",  "retain_until": "2019-08-24T14:15:22Z",  "retention": "string",  "sha256": "string",  "size": 0,  "source_id": "string",  "source_revision": 0,  "status": "string"}