---
title: "Get document processing status"
method: GET
path: "/documents/{id}"
tags: ["Documents"]
---

# Get document processing status

`GET /documents/{id}`

## Request

- Base URL: `https://api.bankstatemently.com/v1`
- URL: `https://api.bankstatemently.com/v1/documents/{id}`
- Auth: API key in header `X-API-Key`

Poll the status of an uploaded document. When status is `completed`, the response includes statement metadata and export URLs. Rate limit: 120 requests per minute.

## Path parameters

- `id` string, uuid, required

## Response `200`

Document status and metadata.

- StatementDetailResponse: Full document status including statement metadata and export URLs when completed.
  - `id` string, uuid, required: Unique document identifier.
  - `status` 'processing' | 'completed' | 'failed' | 'password_required', required: The processing status of a document.
  - `contentHash` string, required: Content-addressable hash of the uploaded file.
  - `createdAt` string, date-time, required: Timestamp when the document was created.
  - `updatedAt` string, date-time, required: Timestamp of the last status update.
  - `document` DocumentMetadata: Metadata about the uploaded document, populated once processing completes.
    - `bank` string, nullable: Detected bank or financial institution name.
    - `country` string, nullable: Detected country code (ISO 3166-1 alpha-2).
    - `currency` string, nullable: Detected currency code (ISO 4217).
    - `documentType` string, nullable: Detected document type (e.g., `bank-statement`, `credit-card-statement`).
    - `pageCount` integer, nullable: Number of pages in the uploaded PDF.
    - `transactionCount` integer: Total number of transactions extracted from the document.
    - `accountCount` integer: Number of bank accounts found in the document.
  - `statements` StatementSummary[], required: Individual bank statements found in the document. Empty until processing completes.
    - `index` integer, required: Zero-based index of this statement within the document.
    - `statementPeriod` StatementPeriod: The date range covered by a single statement within the document.
      - `from` string, date, required: Start date of the statement period (ISO 8601).
      - `to` string, date, required: End date of the statement period (ISO 8601).
    - `transactionCount` integer, nullable: Number of transactions in this statement, or null if not yet counted.
  - `exports` ExportUrls: URLs to download the document in each export format.
    - `json` string, uri, required
    - `csv` string, uri, required
    - `xlsx` string, uri, required
    - `qbo` string, uri, required
    - `xero` string, uri, required
  - `error` string: Human-readable error message. Present only when status is `failed`.
  - `links` object, required
    - `self` string, uri, required: URL for this document resource.
    - `data` string, uri: URL for structured document data. Present only when status is `completed`.
    - `unlock` string, uri: URL to submit a password for unlocking. Present only when status is `password_required`.

## Other responses

- `401`: Authentication failed, API key revoked, or API key expired.
- `404`: Document not found or does not belong to the authenticated user.
- `429`: Too many requests. Wait the number of seconds indicated by the `Retry-After` header.
- `500`: An unexpected server error occurred.

---

[API](https://skmtc.dev/bankstatemently/apis/bankstatemently-api.md) · [All operations](https://skmtc.dev/bankstatemently/apis/bankstatemently-api/llms.txt) · [OpenAPI document](https://skmtc.dev/bankstatemently/apis/bankstatemently-api/revisions/4c3b7fb26edf?raw)
