Initiate a document upload

Step 1 of the three-step upload flow. Declares the file you are about to upload and
returns a presigned URL to send the bytes to.

After this call:

  1. HTTP PUT the raw file bytes to uploadUrl, with a Content-Type header of
    exactly requiredContentType — the URL is signed for that content type and S3
    rejects anything else. Send no Precursor auth headers on the PUT.
  2. Call POST /api/v1/patients/{patientId}/documents/{documentId}/complete to
    validate and file the document. Nothing is visible to anyone until complete
    succeeds.

The upload URL expires at uploadExpiresAt (about an hour). Accepted formats and the
100 MB cap are listed in the API overview; the declared fileName extension decides
the required content type. category, when sent, must be one of Pathology,
Imaging, Immunisation or Other (case-insensitive; defaults to Other); date,
when sent, must be yyyy-MM-dd. Returns 403 documents_locked while the patient's
vault is locked, and 404 when the patient has no booking with you.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The patient's identifier, as returned by the bookings and patients endpoints. Opaque — treat it as a string.

Body Params
string
required

The file's name including its extension. The extension determines the required upload content type and must be an accepted format (see the API overview).

int64
required

The file's size in bytes. Maximum 104857600 (100 MB).

string

A display name for the document. Defaults to the file name without its extension.

string
enum

The document's category. Case-insensitive; defaults to Other when absent or blank. Any other value is rejected with invalid_category.

Allowed:
string

An optional free-text sub-type, shown alongside the category.

string
^\d{4}-\d{2}-\d{2}$

The clinical date of the document, yyyy-MM-dd.

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json