Skip to main content

Update document metadata

PATCH /document/{id}
devhttps://api.sandbox.ovok.com

Update document metadata

Updates the name and/or publicity settings of an uploaded document.

Parameters

ParameterInDescriptionExample
idpathThe id of the DocumentReference resource to update023f2f-
fileNamebodyThe new filename for the document (optional)cat.png
isPublicbodyWhether the document should be publicly accessible (optional, true or false)false

Request Body

{
"fileName": "updated-image.png",
"isPublic": "false"
}

Response

Returns the updated document information in the same format as the create endpoint:

{
"id": "12345",
"meta": {
"lastUpdated": "2000-01-01T00:00:00.000Z"
},
"author": {
"reference": "Practitioner/...",
"display": "Max Mustermann"
},
"fileName": "updated-image.png",
"contentType": "image/png",
"publicToken": null
}

Parameters

NameInTypeRequiredDescription
idpathstringyesFHIR DocumentReference id whose metadata should be updated (e.g. file name, author, content type). The binary itself is not changed — use POST /document/:id to replace the file.

Request body

Content-Type: application/json

  • fileName: string — The new name of the file.
  • isPublic: boolean — Whether the file should be public or private.
  • contentType: string — The MIME type of the file.

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.

200FileEntryDto (application/json)

  • id: string (required) — The ID of the DocumentReference resource.
  • meta: object — The metadata of the document.
    • lastUpdated: string (required) — The last updated date of the document.
  • author: object — The author of the document.
    • reference: string — The reference of the author.
    • display: string — The display name of the author.
  • fileName: string — The name of the document.
  • contentType: string — The content type of the document.
  • uploadOptions: object — The upload options of the document.
    • url: string (required) — The upload URL of the document.
    • fields: object (required) — The fields of the document.
  • publicToken: string — The public token of the document.

Example

{
"id": "87ea5dfc-8b8e-384d-8489-79496e706390",
"fileName": "test.txt",
"contentType": "text/plain",
"publicToken": "example.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NzkzNTA5NzEsImV4cCI6MTc3OTM1NDU3MX0.PO6ZkOtyOEugGyNuZUyg_YxUt3ozpJ_QOdJuriC14uY",
"uploadOptions": {
"url": "https://example.com/upload",
"fields": {
"key": "value"
}
}
}