---
title: "Keep an uploaded bank statement on an open reconciliation as its evidence"
method: POST
path: "/accountant/companies/{customerId}/reconciliations/{id}/statement-document"
tags: ["Accountant Portal"]
---

# Keep an uploaded bank statement on an open reconciliation as its evidence

`POST /accountant/companies/{customerId}/reconciliations/{id}/statement-document`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/accountant/companies/{customerId}/reconciliations/{id}/statement-document`
- Auth: HTTP bearer

PG-p09-012 (migration 675; Augusto "Yes", #4092 c7009332126). The document (uploaded through the normal document upload) must be an assigned `bank_statement` of the bank account's entity, not archived, its stored file scanned clean, a PDF, CSV or text file of at most 10 MB whose bytes match its hash. Only while the reconciliation is open (in progress or reopened); otherwise 409 RECONCILIATION_NOT_OPEN. A later attach replaces it by default. With `preserveExisting`, attaching the current document returns it without a second event and attaching a different one returns 409 STATEMENT_ATTACHMENT_EXISTS. Records a `statement_attached` event with the document id, file name and hash as they are now; nothing else changes. The reconciliation comes back with `statementDocument`, which GET …/reconciliations/{id} also returns. A signed-in person only: the service token gets 403.

## Path parameters

- `customerId` string, uuid, required
- `id` string, uuid, required

## Request body

- object
  - `documentId` string, uuid, required
  - `preserveExisting` boolean

## Response `200`

The reconciliation, with `statementDocument`

- object
  - `statementDocument` ReconciliationStatementDocument, nullable, required: PG-p09-012: the bank statement a reconciliation keeps as evidence before completion, from its latest statement event; name and hash as at attach time. Null when none is kept.
    - `documentId` string, uuid, required
    - `fileName` string, required
    - `contentSha256` string, required
    - `uploadedAt` string, date-time, nullable, required
    - `attachedAt` string, date-time, required
    - `attachedBy` object, required
      - `userId` string, nullable, required
    - `downloadUrl` string, nullable: #5033: a link to the kept statement signed for the reader (as thread attachments sign documents), on the reconciliation read and the attach response; null when there is no reader or the file cannot be served.
    - `downloadUrlExpiresAt` string, date-time, nullable: #5033: when downloadUrl stops working (15 minutes after the read); null with it.

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Resource not found
- `409`: The reconciliation is not open or a guarded attachment would replace a different statement
- `422`: The body is invalid, or the document is not a clean bank statement of this account's entity (STATEMENT_DOCUMENT_INVALID)

## Changes

- **2026-12-04** `191919bd6ae9`: 1 info
  - added the new optional request property `preserveExisting`
- **2026-11-26** `4a2098becaf9`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/medianfi/apis/median-api/changes/accountant/companies/:customerId/reconciliations/:id/statement-document/post.md)

---

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