Skip to main content

Get a document as public user

GET /document/public/{token}
devhttps://api.sandbox.ovok.com

Public file download

Information such as id, contentType, fileName, publicToken can be fetched by querying /fhir/DocumentReference.

Parameters

ParameterInDescriptionExample
tokenparamsThe DocumentReference public token found in the extension of the resourceexample.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY
widthqueryThe width of the image to resize the image to (optional)100
heightqueryThe height of the image to resize the image to (optional)100
fitqueryThe fit of the image to resize the image to (optional) Seecover

Useful for embedding images with <img> tags on websites, predefined HTML files. Note that anyone with the url will be able to access the file without any Authorization.

Parameters

NameInTypeRequiredDescription
tokenpathstringyesPublic access JWT minted for the document and stored as an extension on the DocumentReference. Anyone with this token can read the file, so treat it as the shareable link itself.
ETagheaderstringnoThe ETag of the file for GET requests. If provided, the server will check the value of the ETag against the value of the ETag in the request headers. If the values match, the server will return a 304 Not Modified response. If the values do not match, the server will return a 200 OK response and the file content, if the file exists.
widthquerystringnoThe width of the binary resource if the resource is an image.
heightquerystringnoThe height of the binary resource if the resource is an image.
fitquerystringnoThe fit of the image. See https://sharp.pixelplumbing.com/api-resize#fit for more information.

Responses

CodeDescription
200Success.
400The request could not be operated by the server.
401The resource owner or authorization server denied the request.
404The requested resource could not be found.
422The request could not be validated by the server.
500The server encountered an unexpected condition. Please try again later.

200RedirectResponseDto (application/json)

No JSON body — endpoint replies with HTTP 307 redirect to a short-lived signed object-storage URL. Body is empty; follow the Location header. The redirect target expires (typical TTL: a few minutes).

Additional properties allowed.