# DOCUMENT_STATUS_LOCKED

Canonical page: https://docs.ovok.com/errors/document-status-locked

**HTTP 409.** Problem type: [`https://docs.ovok.com/errors/document-status-locked`](https://docs.ovok.com/errors/document-status-locked).

## What this means [#what-this-means]

`POST /fhir/R4/DocumentReference/<id>/$update-metadata` asked to change a document whose metadata can no longer change: it is `final` or `amended`, or it was deleted (`entered-in-error`). The same code answers when the document changed while the update was made. Nothing was written.

## Troubleshooting [#troubleshooting]

1. Read the document again: `GET /fhir/R4/DocumentReference/<id>`.
2. If its `docStatus` is still `preliminary` or empty, send the update again.
3. Otherwise send a new document whose `relatesTo` names this one with the code `replaces`.

## Retry safely [#retry-safely]

Safe to send again after reading the document; a final or deleted document keeps answering 409.

## If the problem persists [#if-the-problem-persists]

Share the HTTP status, problem `type`, request path, response timestamp and `traceId` with your administrator or support contact. Remove access tokens, provider secrets and patient data first. The [Error responses guide](/errors) explains the response fields, and the [machine-code registry](/errors/machine-codes) lists every endpoint-specific type.
