Initialize a file upload
Reserves a slot for a new file in the consultation and returns a short-lived presigned S3 URL. Three-step flow:
- Call this endpoint to get uploadUrl and fileName.
- PUT the file bytes directly to uploadUrl.
- Call finalizeUpload with the same fileName to start content extraction, then poll GET .../uploaded-files until the status is analyzed or failed.
De-duplication is by SHA-256: a second initUpload with the same sha256 in the same consultation returns 409 CONFLICT, including when the first upload was never completed (delete that file first to retry). The slot is created immediately with status uploaded. If URL generation fails after the slot is created, the slot is removed so the client can safely retry. Returns 403 for archived consultations.
Request
- Base URLhttps://vetnio.com/api/v2
- URLhttps://vetnio.com/api/v2/workspaces/{workspaceId}/consultations/{consultationId}/uploaded-files
- AuthHTTP bearer
Path parameters
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.
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.
Request body
Example request
{
"originalFileName": "xray_bella_2024-06-12.pdf",
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"mimeType": "application/pdf",
"sizeBytes": 184320
}Response
Upload slot reserved; use uploadUrl to send the bytes and fileName to finalize.
Example response
{
"uploadUrl": "https://example-bucket.s3.eu-central-1.amazonaws.com/consultationInformation/furunculotic-loud-chihuahua/uploadedFiles/a1b2c3d4-e5f6-7890-abcd-ef1234567890/8f1c4a60-7e3b-4b6f-9a9d-6d9f3c8b2e4a?X-Amz-Expires=3600&X-Amz-Signature=...",
"s3Key": "consultationInformation/furunculotic-loud-chihuahua/uploadedFiles/a1b2c3d4-e5f6-7890-abcd-ef1234567890/8f1c4a60-7e3b-4b6f-9a9d-6d9f3c8b2e4a",
"fileName": "8f1c4a60-7e3b-4b6f-9a9d-6d9f3c8b2e4a"
}Changes
No recorded changes to this operation across all 1 revision of this API.