Skip to main content
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/

Headers

HeaderTypeRequiredDescription
Bearer TokenstringYesAuthentication token. Contact medWrite team.
API KeystringYesService API key. Contact medWrite team.

Path parameters

ParameterTypeRequiredDescription
Output IDstringYesThe unique identifier of the output.
Bundle IDstringYesThe unique identifier of the bundle.

Query parameters

ParameterTypeRequiredDefaultDescription
Return as FilestringNoSet 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

StatusCondition
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.