Skip to main content
Retrieve all attachments for a given output, or a single attachment by its identifier.
This endpoint requires a Bearer token. For credentials and access, contact the medWrite team.

Request

GET {{baseUrl}}/api/v1/outputs/{Output ID}/attachments/
GET {{baseUrl}}/api/v1/outputs/{Output ID}/attachments/{Attachment ID}/

Headers

HeaderTypeRequiredDescription
Bearer TokenstringYesAuthentication token. Contact medWrite team.

Path parameters

ParameterTypeRequiredDescription
Output IDstringYesThe unique identifier of the output.
Attachment IDstringNoThe unique identifier of the attachment. Omit to list all.

Response

Status: 200 OK
{
  "data": [
    {
      "id": "...",
      "file_url": "...",
      "file_name": "report.pdf",
      "file_type": "pdf",
      "size": 204800,
      "created_at": "2025-01-15T10:00:00.000000",
      "status": "active"
    }
  ],
  "status": "success"
}
When fetching a single attachment, data is an object instead of an array.

Error responses

StatusCondition
401Invalid or missing authentication
404Output or attachment not found

Next steps

Get PDF Document

Get the PDF for an output and bundle.

Get Approved Outputs

Retrieve approved letters.