---
title: "Finalize Image Group"
method: POST
path: "/v1/book/upload/image/done"
tags: ["File Uploads"]
---

# Finalize Image Group

`POST /v1/book/upload/image/done`

## Request

- Base URL: `https://api.ocrolus.com`
- URL: `https://api.ocrolus.com/v1/book/upload/image/done`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://auth.ocrolus.com/oauth/token`

Finalize an image group and construct a <<glossary:Document>> from its images.

---

After you have [uploaded images](ref:upload-image), call this endpoint to finalize an <<glossary:Image group>> and construct a <<glossary:Document>> from its content.

## Request body

- object
  - `book_uuid` string: The unique identifer of the <<glossary:Book>> that the newly-constructed <<glossary:Document>> will be saved to. Mutually exclusive with `pk`.
  - `pk` integer: The primary key <<glossary:PK>> of the Book that the newly-constructed Document will be saved to. Mutually exclusive with `book_uuid`.
  - `form_type` string: The code identifying the type of <<glossary:Document>> that the uploaded images represent.

## Response `200`

Success

- union
  - object
    - `status` integer: A numerical code that indicates the status of the request.
    - `message` string: A textual description that indicates details about this response's status.
    - `response` object: An object received from the server that potentially contains data.
      - `image_bucket_uuid` string: UUID of the finalized image group.
      - `image_group_pk` integer: Primary key of the finalized image group.
      - `uploaded_doc_uuid` string: UUID of the <<glossary:Document>> constructed from the image group. Present only when `form_type` was provided in the request.
  - object
    - `status` integer: A numerical code that indicates the status of the request.
    - `message` string: A textual description that indicates details about this response's status.
    - `response` object: An object received from the server that potentially contains data.
      - `image_bucket_uuid` string: UUID of the finalized image group.
      - `image_group_pk` integer: Primary key of the finalized image group.
      - `mixed_doc_uuid` string: UUID of the Mixed Document constructed from the image group for classification. Present only when `form_type` was omitted from the request.

## Other responses

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

---

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