uploaded-files

List uploaded files for a consultation

Returns every file attached to a consultation, newest first (by createdAt). Each file carries its current analysis status and, when extraction failed, the error message. Use this endpoint to render a file list or to poll for the analyzing → analyzed transition after finalizeUpload. Files whose upload was initialized but never finalized are listed with status uploaded. Any member of the workspace can list the files.

get/workspaces/{workspaceId}/consultations/{consultationId}/uploaded-files

Request

  • Base URL
    https://vetnio.com/api/v2
  • URL
    https://vetnio.com/api/v2/workspaces/{workspaceId}/consultations/{consultationId}/uploaded-files
  • Auth
    HTTP bearer

Path parameters

workspaceIdstring required

Opaque identifier of the Vetnio workspace (veterinary clinic) that owns the resource. Scopes every request — callers can only access files under workspaces they are a member of.

Example:furunculotic-loud-chihuahua
consultationIdstring required

Identifier of the consultation (a single veterinary visit) the file is attached to. The consultation must belong to the same workspace as the authenticated caller.

Example:a1b2c3d4-e5f6-7890-abcd-ef1234567890

Response

List of files attached to the consultation. An empty array means no files have been uploaded yet.

fileNamestring required

Stable internal identifier for the file — a server-generated UUID returned by initUpload. Used in every subsequent endpoint (finalize, download, delete). Not intended for display; use originalFileName for that.

originalFileNamestring required

The file name as it was on the uploader's device. Shown to users in the UI. May contain characters that are unsafe for object-storage keys, which is why it is never used as a storage identifier.

mimeTypestring required

MIME type as recorded at upload time.

sizeBytesinteger required

Exact size of the file in bytes. finalizeUpload compares it with the size of the uploaded object and returns 412 until they match, so it must equal the number of bytes you PUT. No maximum is enforced by the API.

status'uploaded' | 'analyzing' | 'analyzed' | 'failed' required

Lifecycle state of the file:

  • uploaded — the upload slot was reserved by initUpload; the bytes may not have been sent yet and no extraction has started. Call finalizeUpload after the PUT.
  • analyzing — extraction is running in the background (usually seconds; longer for large PDFs).
  • analyzed — extraction succeeded; the extracted text is available to document generation and chat features.
  • failed — extraction errored; inspect errorMessage. Calling finalizeUpload again retries the extraction.
createdAtstring required

When the upload was initialized, as an ISO-8601 UTC timestamp. Does not reflect when the bytes arrived or when analysis completed.

errorMessagestring nullable required

Human-readable error from the content extractor. Populated only when status is failed, otherwise null.

Example response

[
  {
    "fileName": "8f1c4a60-7e3b-4b6f-9a9d-6d9f3c8b2e4a",
    "originalFileName": "xray_bella_2024-06-12.pdf",
    "mimeType": "application/pdf",
    "sizeBytes": 184320,
    "status": "analyzed",
    "createdAt": "2026-09-14T08:42:10.000Z"
  }
]

Changes

No recorded changes to this operation across all 1 revision of this API.