---
title: "One document's history (#2587 p11)"
method: GET
path: "/accountant/companies/{customerId}/documents/{documentId}/history"
tags: ["Accountant Portal"]
---

# One document's history (#2587 p11)

`GET /accountant/companies/{customerId}/documents/{documentId}/history`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/accountant/companies/{customerId}/documents/{documentId}/history`
- Auth: HTTP bearer

Oldest first: received (with the derived source), extracted or extraction_failed, match_proposed, matched, unmatched and match_rejected (each with `matchedTo`, the row's id and description), held and hold_released, and edited (MI-071: each field a person or the system edited, from the document's correction history, with `detail.field` and the person's name). MI-091: a document that was deleted reads one `deleted` event instead (its `document.deleted` audit row: who, when and `detail.reason` with its `reasonLabel`), since its row is gone. `actor` is `penny` for the bookkeeping service identities or the engine, `person` for any other user, `system` otherwise. A stale proposed match the sweep deleted is not in the history. 404 for a document the client does not hold (and never deleted) or the accountant document queue hides (unassigned, Drive, rejected, pruned). Read-only. A signed-in person only (404 for every API key).

## Path parameters

- `customerId` string, uuid, required
- `documentId` string, uuid, required

## Response `200`

The document's events

- object
  - `success` true, required
  - `data` object, required
    - `documentId` string, uuid, required
    - `events` object[], required
      - `at` string, date-time, required
      - `kind` 'received' | 'extracted' | 'extraction_failed' | 'match_proposed' | 'matched' | 'unmatched' | 'match_rejected' | 'held' | 'hold_released' | 'deleted' | 'edited', required
      - `actor` 'penny' | 'person' | 'system' | 'null', nullable, required
      - `actorName` string, nullable, required
      - `detail` object, nullable, required

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Resource not found

## Changes

- **2026-11-26** `4a2098becaf9`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/medianfi/apis/median-api/changes/accountant/companies/:customerId/documents/:documentId/history/get.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)
