This endpoint requires authentication. Include your API key in the request headers as X-API-Key.
Description
Uploads a PDF file directly to a specific patient. This endpoint is used when you already know which patient the PDF belongs to and want to upload it directly to their record.
Path Parameters
The ID of the patient to upload the PDF for
Request Body
Response
The unique identifier of the uploaded PDF
The URL where the PDF can be accessed
The name of the uploaded file
The timestamp when the file was uploaded
The ID of the patient the PDF was uploaded for
Example Response
{
"id": "pdf_123456",
"url": "https://storage.example.com/pdfs/patient_123456.pdf",
"filename": "medical_record.pdf",
"created_at": "2024-03-20T10:30:00Z",
"patient_id": 123
}
Error Responses
Invalid request. The file must be a valid PDF document and the filename must include the .pdf extension.
Authentication required. Make sure you’ve included a valid API key in the request headers.
Unauthorized access. You can only upload PDFs for patients associated with your account.
Patient not found. The specified patient ID does not exist.
File too large. The PDF file exceeds the maximum allowed size.
The ID of the patient to upload the PDF for
The name to give the uploaded file
PDF uploaded successfully
The unique identifier of the uploaded PDF
The URL where the PDF can be accessed
The name of the uploaded file
The timestamp when the file was uploaded
The ID of the patient the PDF was uploaded for