Retrieve the generated PDF document for a specific output and bundle. The PDF can be returned as a raw file download or as a base64-encoded string in JSON.
All endpoints require authentication. For credentials and access, contact the medWrite team .
Request
GET {{baseUrl}}/api/v1/third-parites/letters/{Output ID}/{Bundle ID}/pdf/
Header Type Required Description Bearer Token string Yes Authentication token. Contact medWrite team. API Key string Yes Service API key. Contact medWrite team.
Path parameters
Parameter Type Required Description Output ID string Yes The unique identifier of the output. Bundle ID string Yes The unique identifier of the bundle.
Query parameters
Parameter Type Required Default Description Return as File string No — Set to true to download the raw PDF file. Omit for base64 JSON.
Response (file download)
Status: 200 OK — Returns a binary PDF file.
Content-Type: application/pdf
Content-Disposition: attachment; filename="<filename>.pdf"
Response (base64)
Status: 200 OK
{
"data" : "<base64_encoded_pdf>" ,
"status" : "success"
}
Error responses
Status Condition 400Missing Output ID or Bundle ID 401Invalid or missing authentication 404Output not found
Next steps
Get Approved Outputs Retrieve approved letters (includes bundle IDs).
Mark Output Completed Acknowledge a letter after processing.