File Commands

Upgrade a document

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 and Update Book endpoints. For mixed PDFs, use the Upgrade a mixed document 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

ScenarioUse this endpoint?
An Instant document needs Complete accuracyYes - 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 CompleteNo - use Update Book
The file is a mixed documentNo - use Upgrade a mixed document

Upgrade types

upgrade_typeMeaning
INSTANTUpgrade from Classify to Instant capture
COMPLETEUpgrade from Classify or Instant to Complete

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

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

Request body

doc_pkinteger

The <glossary:PK> of the <glossary:Document> that will be upgraded. Mutually exclusive with doc_uuid.

doc_uuidstring

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

Success

statusinteger

A numerical code that indicates the status of the request.

Example response

{
  "status": 200
}

Changes

No recorded changes to this operation across all 1 revision of this API.