---
title: "Signal that a direct upload has finished"
method: POST
path: "/documents/{document_id}/complete"
tags: ["Documents"]
---

# Signal that a direct upload has finished

`POST /documents/{document_id}/complete`

## Request

- Base URL: `https://api.aginera.ai/partner/v1`
- URL: `https://api.aginera.ai/partner/v1/documents/{document_id}/complete`
- Auth: OAuth 2 (authorization code, authorization URL `https://auth.aginera.ai/oauth/authorize`, token URL `https://auth.aginera.ai/oauth/token`; client credentials, token URL `https://login.microsoftonline.com/65f567a9-6e6a-4f81-863c-aea4ece1f8eb/oauth2/v2.0/token`, scopes: `documents:write`)

## Path parameters

- `document_id` string, required

## Response `202`

OK

- Document
  - `id` string, required
  - `project_id` string, required
  - `filename` string, required
  - `kind` 'drawing' | 'specification' | 'schedule', required
  - `status` 'awaiting_upload' | 'ingesting' | 'ready' | 'failed', required
  - `external_ref` string, nullable, required
  - `page_count` integer, nullable, required
  - `pages` DocumentPage[]
    - `number` integer, required
    - `sheet_number` string, nullable, required
    - `sheet_title` string, nullable, required
    - `has_text` boolean, required
    - `rotation` integer, required
    - `size_pt` object, required
      - `width` number, required
      - `height` number, required
    - `disciplines_detected` Trade[]
  - `size_bytes` integer, nullable, required
  - `failure` Failure
    - `code` 'document_unreadable' | 'unsupported_content' | 'no_pages_selected' | 'capacity' | 'cancelled' | 'internal', required
    - `message` string, required
  - `metadata` object, required
  - `created_at` string, date-time, required
  - `ready_at` string, date-time, nullable, required
  - `retain_until` string, date-time, nullable, required

## Other responses

- `default`: Error (RFC 7807)

---

[API](https://skmtc.dev/aginera/apis/aginera-takeoff-estimation-api.md) · [All operations](https://skmtc.dev/aginera/apis/aginera-takeoff-estimation-api/llms.txt) · [OpenAPI document](https://skmtc.dev/aginera/apis/aginera-takeoff-estimation-api/revisions/39115958da1e?raw)
