Python
import os
from samplehc import SampleHealthcare
client = SampleHealthcare(
api_key=os.environ.get("SAMPLEHC_API_KEY"), # This is the default and can be omitted
)
document = client.v2.documents.retrieve(
document_id="documentId",
)
print(document){
"id": "<string>",
"fileName": "<string>",
"pdfPageCount": 1,
"presignedUrl": "<string>",
"mimeType": "application/pdf",
"ocrResponse": "<unknown>",
"size": 123
}{
"error": "<string>",
"message": "<string>",
"statusCode": 123,
"details": {}
}{
"error": "<string>"
}{
"error": "<string>"
}Document
Full document details
Retrieves comprehensive details for a specific document, including its content or OCR data if available, and a presigned URL.
GET
/
api
/
v2
/
documents
/
{documentId}
Python
import os
from samplehc import SampleHealthcare
client = SampleHealthcare(
api_key=os.environ.get("SAMPLEHC_API_KEY"), # This is the default and can be omitted
)
document = client.v2.documents.retrieve(
document_id="documentId",
)
print(document){
"id": "<string>",
"fileName": "<string>",
"pdfPageCount": 1,
"presignedUrl": "<string>",
"mimeType": "application/pdf",
"ocrResponse": "<unknown>",
"size": 123
}{
"error": "<string>",
"message": "<string>",
"statusCode": 123,
"details": {}
}{
"error": "<string>"
}{
"error": "<string>"
}Path Parameters
The unique identifier of the document.
Query Parameters
Whether to include file size from S3 (in bytes). Adds a small latency overhead.
Response
Successfully retrieved full document details.
- Option 1
- Option 2
- Option 3
- Option 4
The number of pages in the PDF, or null for non-PDFs and PDFs that have not been counted yet.
Required range:
x >= 0Available options:
application/pdf The size of the file in bytes.