Skip to main content
Retrieve a paginated list of approved clinical outputs (letters) for the authenticated organisation. The response is an HL7 FHIR Bundle of Composition resources, each containing the letter content and an embedded PDF.
All endpoints require authentication. For credentials and access, contact the medWrite team.

Request

GET {{baseUrl}}/api/v1/third-parites/letters/

Headers

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

Query parameters

ParameterTypeRequiredDefaultDescription
Speciality IDstringNoFilter outputs by speciality identifier.
Speciality NamestringNoFilter outputs by speciality name.
Page SizeintegerNo1Number of outputs per page.
Page NumberintegerNo1Page number for pagination.
Sort OrderstringNodescSort by creation date. asc or desc.

Response

Status: 200 OK
{
  "data": {
    "resourceType": "Bundle",
    "type": "collection",
    "entry": [
      {
        "resource": {
          "resourceType": "Composition",
          "id": "...",
          "status": "final",
          "subject": { "reference": "Patient/..." },
          "date": "2025-01-15T10:30:00Z",
          "section": [
            {
              "title": "...",
              "id": "<Output ID>/<Bundle ID>",
              "text": { "status": "generated", "div": "<div>...</div>" },
              "extension": [{ "...": "base64 PDF attachment" }]
            }
          ]
        }
      }
    ]
  },
  "status": "success",
  "meta": {
    "pagination": { "batch_size": 10, "page": 1 },
    "letters_count": 42
  }
}

Error responses

StatusCondition
400Invalid sort order (must be asc or desc)
400Speciality not found
401Invalid or missing authentication

Next steps

Mark Output Completed

Acknowledge a letter so it no longer appears in the unread feed.

Get Attachments

Retrieve attachments for an output.