---
title: "Upgrade a document"
method: POST
path: "/v1/document/upgrade"
tags: ["File Commands"]
---

# Upgrade a document

`POST /v1/document/upgrade`

## Request

- Base URL: `https://api.ocrolus.com`
- URL: `https://api.ocrolus.com/v1/document/upgrade`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://auth.ocrolus.com/oauth/token`

Upgrades the processing type of a <<glossary:Document>> from Classify to Instant, or from Instant to Complete, without changing the Book’s `book_class`.

---

Use this endpoint when only some documents need a higher processing tier and you want new uploads to continue following the Book’s current class.

For Book-level class changes, use the [Book Upgrades](https://docs.ocrolus.com/docs/book-upgrade) and [Update Book](https://docs.ocrolus.com/reference/update-book) endpoints. For mixed PDFs, use the [Upgrade a mixed document](https://docs.ocrolus.com/reference/upgrade-mixed-doc) endpoint.

### Prerequisites

- Document-level upgrades must be enabled for your organization. If not, contact your Ocrolus account manager.
- The document must finish its current processing before you upgrade it.
- Child documents that belong to a mixed document cannot be upgraded with this endpoint. Upgrade the mixed document instead.
- If the Book is already Complete, or a Book upgrade already covers the same target, the document upgrade is rejected.
- On success, the document re-enters processing under the new tier. Re-fetch Capture or Analyze data after verification completes.

### When to use this endpoint

| Scenario | Use this endpoint? |
|---|---|
| An Instant document needs Complete accuracy | Yes - `upgrade_type: COMPLETE` |
| A classified document needs Instant capture (Book class is `INSTANT_CLASSIFY_ISO_CAPTURE`) | Yes -  `upgrade_type: INSTANT` |
| The entire Book should move to Complete | No -  use [Update Book](https://docs.ocrolus.com/reference/update-book) |
| The file is a mixed document | No - use [Upgrade a mixed document](https://docs.ocrolus.com/reference/upgrade-mixed-doc) |

### Upgrade types

| `upgrade_type` | Meaning |
|---|---|
| `INSTANT` | Upgrade from Classify to Instant capture |
| `COMPLETE` | Upgrade from Classify or Instant to Complete |

Document upgrades are **forward-only**. You cannot downgrade a document from Complete back to Instant.

## Request body

- object
  - `doc_pk` integer: The <<glossary:PK>> of the <<glossary:Document>> that will be upgraded. Mutually exclusive with `doc_uuid`.
  - `doc_uuid` string: The universal unique identifier of the <<glossary:Document>> that will be upgraded. Mutually exclusive with `doc_pk`.
  - `upgrade_type` 'INSTANT' | 'COMPLETE': The type of processing to upgrade the <<glossary:Document>> to.

## Response `200`

Success

- object
  - `status` integer: A numerical code that indicates the status of the request.
  - `response` object: An object received from the server that potentially contains data.
    - `pk` integer: The <<glossary:PK>> of the <<glossary:Document>> that will be upgraded.
    - `uuid` string: The universal unique identifier of the <<glossary:Document>> that will be upgraded.
    - `name` string: The name of the <<glossary:Document>> that will be upgraded.
    - `document_status` string: The verification status of the <<glossary:Document>>.
    - `book_pk` integer: The <<glossary:PK>> of the <<glossary:Book>> that this <<glossary:Document>> is uploaded to.
    - `processing_type` string: The type of processing to upgrade the <<glossary:Document>> to. (INSTANT/COMPLETE)

## Other responses

- `400`: Client Errors
- `500`: Internal server error

---

[API](https://skmtc.dev/ocrolus/apis/file-commands.md) - [All operations](https://skmtc.dev/ocrolus/apis/file-commands/llms.txt) - [OpenAPI document](https://skmtc.dev/ocrolus/apis/file-commands/revisions/387371d96db7?raw)
