documents.delete
documents.delete(id: string): Promise<void> Soft-delete a stored document. The PDF is purged from storage; metadata is retained for audit. Spec §6.4. DELETE /v1/documents/:id.
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id | string | required | (no description) |
Returns
Section titled “Returns”Promise<void>
Errors
Section titled “Errors”| Code | When |
|---|---|
DOCUMENT_NOT_FOUND | See [errors](../../../production/errors/) for the full description. |
INVALID_API_KEY | See [errors](../../../production/errors/) for the full description. |
INTERNAL_ERROR | See [errors](../../../production/errors/) for the full description. |
Example
Section titled “Example”// Demonstrates: client.documents.delete(id) — soft-delete a stored document.import { PoliPage } from '@poli-page/sdk';
const client = new PoliPage({ apiKey: process.env.POLI_PAGE_API_KEY! });
await client.documents.delete('doc_abc123');
// Returns void. The PDF is purged; metadata is retained for audit.console.log('Deleted.');