# The journal

Source: https://amanucci.com/fr/docs/developers/api/ledger/listJournalEntries

## GET /v1/entities/{entityId}/journal-entries

The journal

The journal: this entity's POSTED entries, each with its lines (account name and party), its event, evidence, period, poster and the entries it reverses, is reversed by or replaces. Unbounded by nature — a set of books grows forever — so it pages by cursor rather than taking a hard cap (rule 5), in the walk `order` names. Filters: `period` or `from`/`to` (inclusive), `journal`, `account` (a code any line touches), `q` (a bounded substring), and the review's (`review`, `flagged`, `cleared`, `party`); a filter never changes the order.

Operation ID: `listJournalEntries`

### Parameters

```json
[
  {
    "schema": {
      "type": "string",
      "format": "uuid"
    },
    "required": true,
    "name": "entityId",
    "in": "path"
  },
  {
    "schema": {
      "type": "string",
      "minLength": 1,
      "description": "An account CODE any line of the entry touches."
    },
    "required": false,
    "description": "An account CODE any line of the entry touches.",
    "name": "account",
    "in": "query"
  },
  {
    "schema": {
      "type": "string",
      "enum": [
        "true",
        "false"
      ],
      "description": "`true`: only provisional entries the machine cleared on checked evidence; `false`: only those it did not."
    },
    "required": false,
    "description": "`true`: only provisional entries the machine cleared on checked evidence; `false`: only those it did not.",
    "name": "cleared",
    "in": "query"
  },
  {
    "schema": {
      "type": "string",
      "description": "An opaque position, taken verbatim from a previous response's `nextCursor`. Never construct one: its encoding is an implementation detail and may change within `/v1` (rule 6 governs FIELDS, not the contents of an opaque token)."
    },
    "required": false,
    "description": "An opaque position, taken verbatim from a previous response's `nextCursor`. Never construct one: its encoding is an implementation detail and may change within `/v1` (rule 6 governs FIELDS, not the contents of an opaque token).",
    "name": "cursor",
    "in": "query"
  },
  {
    "schema": {
      "type": "string",
      "enum": [
        "true",
        "false"
      ],
      "description": "`true`: only provisional entries a review flag names."
    },
    "required": false,
    "description": "`true`: only provisional entries a review flag names.",
    "name": "flagged",
    "in": "query"
  },
  {
    "schema": {
      "type": "string",
      "format": "date",
      "description": "The first `entryDate` to list, inclusive (Europe/Brussels business day)."
    },
    "required": false,
    "description": "The first `entryDate` to list, inclusive (Europe/Brussels business day).",
    "name": "from",
    "in": "query"
  },
  {
    "schema": {
      "type": "string",
      "enum": [
        "purchases",
        "sales",
        "bank",
        "misc",
        "migration"
      ],
      "description": "The journal (day book) this entry is filed in. The wire's copy of `journal_entry_journal_vocabulary`; the CHECK is the enforcement."
    },
    "required": false,
    "description": "The journal (day book) this entry is filed in. The wire's copy of `journal_entry_journal_vocabulary`; the CHECK is the enforcement.",
    "name": "journal",
    "in": "query"
  },
  {
    "schema": {
      "type": "integer",
      "minimum": 1,
      "maximum": 200,
      "default": 200,
      "description": "How many rows at most. The hard ceiling is 200; a larger value is refused with 422, never silently reduced."
    },
    "required": false,
    "description": "How many rows at most. The hard ceiling is 200; a larger value is refused with 422, never silently reduced.",
    "name": "limit",
    "in": "query"
  },
  {
    "schema": {
      "type": "string",
      "enum": [
        "id",
        "day",
        "day.desc",
        "day.asc",
        "reference.asc",
        "reference.desc",
        "review"
      ],
      "default": "id",
      "description": "The walk. `id` (the default): uuid v7 and therefore creation order, oldest first — the walk to export; `entry_seq` would be the wrong key twice over, since it restarts each year per journal and is assigned at posting rather than at proposal. `day`: newest `entryDate` first, then newest id. `day.desc` / `day.asc`: the `entryDate`, then the id, in the walk's direction. `reference.asc` / `.desc`: the reference as it reads, journal / year / sequence: the stored journal word (`bank`, `migration`, `misc`, `purchases`, `sales`, in that order; a client's own prefix for it is presentation), then the year of `entryDate`, then `entrySeq`, which restarts each year, then the id. `review`: the review order: more flags first (an `unrecorded` entry before any), the unconfirmed before the confirmed, then `entryDate`, `entrySeq` and the id; an entry that needs no review after every one that does. A cursor resumes only the walk that minted it: change the order and start at the first page."
    },
    "required": false,
    "description": "The walk. `id` (the default): uuid v7 and therefore creation order, oldest first — the walk to export; `entry_seq` would be the wrong key twice over, since it restarts each year per journal and is assigned at posting rather than at proposal. `day`: newest `entryDate` first, then newest id. `day.desc` / `day.asc`: the `entryDate`, then the id, in the walk's direction. `reference.asc` / `.desc`: the reference as it reads, journal / year / sequence: the stored journal word (`bank`, `migration`, `misc`, `purchases`, `sales`, in that order; a client's own prefix for it is presentation), then the year of `entryDate`, then `entrySeq`, which restarts each year, then the id. `review`: the review order: more flags first (an `unrecorded` entry before any), the unconfirmed before the confirmed, then `entryDate`, `entrySeq` and the id; an entry that needs no review after every one that does. A cursor resumes only the walk that minted it: change the order and start at the first page.",
    "name": "order",
    "in": "query"
  },
  {
    "schema": {
      "type": "string",
      "format": "uuid",
      "description": "The event's counterparty."
    },
    "required": false,
    "description": "The event's counterparty.",
    "name": "party",
    "in": "query"
  },
  {
    "schema": {
      "type": "string",
      "description": "The days to list, resolved by the server against today in the books' own day (Europe/Brussels): `7d` and `30d` (the last 7 or 30 days, today included), `month`, `last-month`, `quarter`, `last-quarter` and `year` (the whole calendar unit holding today, or the one before it), a year `2026`, a quarter `2026-q3`, a month `2026-03`, `all` (no bound), or a day range `2026-01-05..2026-02-10` (inclusive, its ends in order). Not with `from` or `to`.",
      "example": "quarter"
    },
    "required": false,
    "description": "The days to list, resolved by the server against today in the books' own day (Europe/Brussels): `7d` and `30d` (the last 7 or 30 days, today included), `month`, `last-month`, `quarter`, `last-quarter` and `year` (the whole calendar unit holding today, or the one before it), a year `2026`, a quarter `2026-q3`, a month `2026-03`, `all` (no bound), or a day range `2026-01-05..2026-02-10` (inclusive, its ends in order). Not with `from` or `to`.",
    "name": "period",
    "in": "query"
  },
  {
    "schema": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "A case-insensitive substring of the description, a line's account code or name, or a line's party name (1..100 characters)."
    },
    "required": false,
    "description": "A case-insensitive substring of the description, a line's account code or name, or a line's party name (1..100 characters).",
    "name": "q",
    "in": "query"
  },
  {
    "schema": {
      "type": "string",
      "enum": [
        "open",
        "marked",
        "reversed"
      ],
      "description": "Only provisional entries in this review state. It narrows and never orders: the list walks the `order` asked, `id` by default; the to-review list is `review=open&order=review` (changed before the contract freezes: `review` alone once walked the review order)."
    },
    "required": false,
    "description": "Only provisional entries in this review state. It narrows and never orders: the list walks the `order` asked, `id` by default; the to-review list is `review=open&order=review` (changed before the contract freezes: `review` alone once walked the review order).",
    "name": "review",
    "in": "query"
  },
  {
    "schema": {
      "type": "string",
      "format": "date",
      "description": "The last `entryDate` to list, inclusive."
    },
    "required": false,
    "description": "The last `entryDate` to list, inclusive.",
    "name": "to",
    "in": "query"
  }
]
```

### Responses

#### 200 One page of the journal.

```json
{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/JournalEntryPage"
    }
  }
}
```

#### 401 Dead or absent credential (`unauthenticated`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 403 Authenticated, present, and refused: a missing grant, a missing seat, or a missing step-up.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 404 Absent, or hidden from this asker — the two are indistinguishable (`not-found`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 422 The request did not satisfy the schema (`invalid-input`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 429 Too many requests on this door's bucket (`rate-limited`); refused before any handler ran, `Retry-After` says when to come back.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 503 Temporarily unavailable; `Retry-After` says when to come back.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```
