---
id: TST-ACC-BAT-062
title: Batch API subledger entries
kind: api-lifecycle
product_area: accounting
module: batches
revision: 1
status: draft
product_intent: proposed
implementation_evidence: observed
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
repository: services-accounting
files:
  - modules/batches/tests/e2e/subledger-entries.e2e.spec.js
implements:
  - ATS-ACC-BAT-018-01
  - ATS-ACC-BAT-018-02
  - ATS-ACC-BAT-018-03
  - ATS-ACC-BAT-018-05
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 5
isolation: >-
  The suite owns its test workspace or fixed integration fixtures in the
  prepared local database.
assertion_sources:
  - scenario: ATS-ACC-BAT-018-01
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/subledger-entries.e2e.spec.js#refuses
      a caller without the subledger entries read permission, 403
  - scenario: ATS-ACC-BAT-018-02
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/subledger-entries.e2e.spec.js#refuses
      limit=201 with a 400 naming the field (DEF-ACT-0507)
  - scenario: ATS-ACC-BAT-018-02
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/subledger-entries.e2e.spec.js#refuses
      from_date=2026-13-01 with a 400 naming the date, not a 500 (DEF-ACT-0507)
  - scenario: ATS-ACC-BAT-018-03
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/subledger-entries.e2e.spec.js#lists
      the entries of the batch, each with its lines
  - scenario: ATS-ACC-BAT-018-03
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/subledger-entries.e2e.spec.js#names
      the number of the document each entry posts, never its id (DEF-ACT-0531)
  - scenario: ATS-ACC-BAT-018-03
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/subledger-entries.e2e.spec.js#reads
      one entry by its id, with the same header and lines as the list (the
      amounts as Money on the wire)
  - scenario: ATS-ACC-BAT-018-05
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/e2e/subledger-entries.e2e.spec.js#answers
      an entry of another tenant as it answers an absent one: the same status
      and error type
evidence:
  - provenance: observed
    source: >-
      services-accounting:modules/batches/tests/e2e/subledger-entries.e2e.spec.js
    note: >-
      The executable file is inspected at the pinned revision; duration is an
      unmeasured planning estimate.
  - provenance: documented
    source: >-
      services-accounting:modules/batches/tests/e2e/subledger-entries.e2e.spec.js#suite
      header
    note: >-
      Real: the composed handler (the dispatcher, the tenant access gate, the
      application access and licence steps), the routes, the signed
  - provenance: documented
    source: >-
      services-accounting:modules/batches/tests/e2e/subledger-entries.e2e.spec.js#suite
      header
    note: >-
      context's verification, the persistence services and PostgreSQL. Doubled:
      the signing key pair, which is the run's own. The tenant is
unbound_scope: null
---

# Batch API subledger entries

## Verification Boundary

This suite invokes the composed Accounting dispatcher locally against the prepared database. It exercises request mapping, declared authorization checks and the asserted persistence results.

## What This Suite Proves

Public entry reads enforce permission and input boundaries while exposing ordered money-bearing detail. The assertion anchors identify the supported portions of the bound scenarios.

## What It Does Not Prove

Local assertions do not establish deployment configuration, remote delivery guarantees, or unasserted lifecycle and concurrency paths.

## Real Dependencies and Test Doubles

PostgreSQL and the exercised persistence or accounting functions are real. Controlled clocks, imported test fixtures and any suite-specific doubles delimit the asserted behavior.

## Must Not Be Doubled

The database constraints, transaction boundaries and exercised accounting functions must remain real when qualifying the asserted persistence or generation behavior.
