Skip to content

API Reference

Quick reference table for all SDK methods.

Method Reference

MethodHTTPPathReturns
sdk.documents.list(params?)GET/api/sdk/v1/documentsListDocumentsResponse
sdk.documents.get(id)GET/api/sdk/v1/documents/:idDocument
sdk.documents.download(id)GET/api/sdk/v1/documents/:id/downloadDownloadResponse
sdk.documents.getDownloadUrl(id, params?)GET/api/sdk/v1/documents/:id/download-urlDownloadUrlResponse
sdk.documents.upload(params)POST/api/sdk/v1/documents/uploadDocument
sdk.documents.delete(id)DELETE/api/sdk/v1/documents/:idDeleteDocumentResponse
sdk.documents.batchDelete(params)POST/api/sdk/v1/documents/deleteBatchDeleteResponse
sdk.documents.export(params)POST/api/sdk/v1/documents/exportDownloadResponse
sdk.documents.getSignatureChain(id)GET/api/sdk/v1/documents/:id/signature-chainSignatureChain
sdk.scopes.getAllowed()GET/api/sdk/v1/scopes-allowedAllowedScopesResponse
sdk.scopes.getAll()GET/api/sdk/v1/scopes-allowed/allScopeCategory[]

Base Path

All resource endpoints are under /api/sdk/v1/:

ResourceBase Path
Documents/api/sdk/v1/documents
Scopes/api/sdk/v1/scopes-allowed

Response Envelope

The Sonar API wraps successful responses in a standard envelope:

{
"success": true,
"data": { ... },
"message": "Optional message"
}

The SDK automatically unwraps this envelope — you always receive the data payload directly. For binary responses (downloads, exports), the raw ArrayBuffer is returned as-is.

Date Handling

When fromDate or toDate parameters receive a Date object, the SDK automatically converts it to an ISO 8601 string via .toISOString(). String values are passed through as-is.