File Uploads

Upload Mixed Document PDF to Book

Upload a PDF file containing more than one <glossary:Document> to a <glossary:Book>.


You can upload a file to this endpoint as a multipart/form-data encoded payload. To learn more, see multipart/form-data guide.

Direct document upload is not permitted for Books configured with the Classify-only processing type. Attempting to upload to such a Book returns an error indicating that direct document upload is not allowed for that Book type.

📘 The maximum file size for upload is 200 MB.

post/v1/book/upload/mixed

Request

  • Base URL
    https://api.ocrolus.com
  • URL
    https://api.ocrolus.com/v1/book/upload/mixed
  • Auth
    OAuth 2
    Client credentials
    Token URL: https://auth.ocrolus.com/oauth/token

Request body multipart/form-data

uploadstring binary required

The PDF file to upload.

book_uuidstring

The unique identifier of the <glossary:Book> that the uploaded <glossary:Document>s will be saved to. Mutually exclusive with pk.

pkinteger

Unique primary key of the Book that the uploaded Mixed Document will be saved to. Mutually exclusive with book_uuid

doc_namestring

The name of the Mixed <glossary:Document> that will be created from the imported file. Defaults to the name of the file if not given.

Example request

{
  "pk": 30219565,
  "book_uuid": "19aab921-25a5-4beb-a59e-ac72320061d6",
  "doc_name": "example_documents"
}

Response

200

OR
OR

Example response

{
  "status": 200,
  "response": {
    "mixed_uploaded_docs": [
      {
        "pk": 51542103,
        "id": 51542103,
        "uuid": "05afcf59-cd34-44a6-a8e3-efaa6de24512",
        "name": "mixed-bank-statement.pdf",
        "page_count": 5,
        "checksum": "23296283534fbcf4bdae4902d2453373",
        "created_ts": "2023-11-21T21:48:12Z"
      }
    ]
  },
  "message": "OK"
}

Changes

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