# DOCUMENT_INVALID

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

**HTTP 422.** Problem type: [`https://docs.ovok.com/errors/document-invalid`](https://docs.ovok.com/errors/document-invalid).

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

A `document` Bundle POSTed to the FHIR base breaks a rule every document keeps, so nothing was stored. The message names the rule: the first entry is not a Composition, the Composition has no narrative (`Composition.text`), the Bundle has no identifier with a system and a value or no timestamp, or the Composition's subject or encounter is not an entry in the Bundle that carries an identifier.

## Troubleshooting [#troubleshooting]

1. Put the Composition first in `entry`, with `text.div` holding the human-readable report.
2. Give the Bundle an `identifier` with both `system` and `value`, and a `timestamp`.
3. Reference the Patient and Encounter from the Composition by their `fullUrl` in the Bundle, and give each entry the identifiers Ovok knows them by.

## Retry safely [#retry-safely]

The same document fails the same way. Fix it and send it again; a document stored once is never stored twice.

## 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.
