---
title: "Get document details"
method: GET
path: "/v1/applications/{applicationId}/documents/{documentId}"
tags: ["Documents"]
---

# Get document details

`GET /v1/applications/{applicationId}/documents/{documentId}`

## Path parameters

- `applicationId` string, required
- `documentId` string, required

## Response `200`

Success

- Document — **Documents** are the primary way to bring financial data into an Application for analysis. A document represents a single PDF file containing one or more financial statements relevant to the application. When a document is uploaded to an Application, Akahu Apply will process the information from the document and convert it to a standardised format. Documents can be added to an application using the Akahu Apply portal, via API, or by your applicant directly using a Sharing Request. Note: Documents and their associated data expire 1 year after creation.
  - `_id` string, required
  - `_application` string, required — The application that this document belongs to.
  - `name` string, required — The filename of this document.
  - `status` 'pending' | 'processing' | 'completed' | 'failed', required — The status of a document: - `pending` The document record exists, but the file has not yet been fully uploaded. - `processing` Akahu Apply is extracting and enriching the data from this document. - `completed` This document has been successfully processed. - `failed` This document has not been successfully processed. See the `failure_reason` for more detail.
  - `failure_reason` object — If this document has failed to be processed, this field provides additional detail about what went wrong.
    - `code` 'internal_error' | 'invalid_input' | 'password_protected' | 'timeout' | 'malware_scan_failed' | 'malware_detected', required
    - `message` string
  - `channel` union, required — The channel that was used to create the document along with any relevant metadata for that channel. This field can be used to determine whether the document was created via a Sharing Request, API, or the Akahu Apply portal.
    - DocumentChannelSharingRequest — The document was uploaded via sharing request.
      - `type` 'sharing_request', required
      - `_id` string, required — The ID of the sharing request that this document was used to add this document.
    - DocumentChannelApi — The document was uploaded via API.
      - `type` 'api', required
    - DocumentChannelPortal — The document was uploaded via the Akahu Apply portal.
      - `type` 'portal', required
    - DocumentChannelReferral — The document was copied from a referral.
      - `type` 'referral', required
      - `_id` string, required — The ID of the referral that was used to add this document.
  - `source` union, required — How the document file was ingested by Akahu Apply. This field can be used to determine whether the document was uploaded directly from an external source, or sourced from an open banking connection.
    - DocumentSourceDirectUpload — The documented was uploaded to Akahu Apply from an external source.
      - `type` 'direct_upload', required
    - DocumentSourceOneoffObConnection — The document was sourced directly from an open banking connection.
      - `type` 'oneoff_ob_connection', required
      - `_id` string, required — The ID of the one-off open banking connection that this document was sourced from.
  - `content_details` DocumentContentDetails
    - `page_count` number, required
    - `processed_count` number, required
    - `skipped_count` number, required
    - `unprocessed_count` number, required
    - `ranges` DocumentContentRange[], required
      - `start` number, required
      - `end` number, required
      - `outcome` 'processed' | 'unprocessed' | 'skipped', required — The outcome from processing a range of pages: - `processed`: The pages were processed and data has been successfully extracted. - `skipped`: The pages skipped processing. This usually occurs because any data in the document was not required in the generation of the report (eg. a blank page). - `unprocessed`: The pages were unable to be processed. This occurs if the content is not supported by Akahu Apply, or if an error occurred during processing.
      - `inferred_content` 'blank' | 'passport' | 'drivers_license' | 'financial_statement' | 'income_statement' | 'unknown', required — The inferred type of content on a given document page: - `blank`: A blank page - `financial_statement`: A financial statement - `passport`: A passport - `drivers_license`: A drivers license - `income_statement`: An income summary or statement - `unknown`: Unknown
  - `created_at` string, date-time, required — The date that this document was created.
  - `updated_at` string, date-time, required — The date that this document was last updated at.
  - `expires_at` string, date-time — Expiry for the document, after which the record will be deleted. Expiry varies as the document progresses through its lifecycle: - While the document has a status of `pending`, expiry is short lived, ensuring that the record is cleaned up quickly if a file is never uploaded. - After the document upload has been received, a 1 year expiry is set, after which the document and all associated data will be permanently deleted.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `429` — Too Many Requests
- `500` — Internal Server Error

---

[API](https://skmtc.dev/akahu/apis/akahu-enduring-api.md) · [All operations](https://skmtc.dev/akahu/apis/akahu-enduring-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/akahu/akahu-enduring-api/revisions/b2de9915920d/schema)
