Read companies reports
Changed onGenerated minimal contract (#1940): parameters, auth, and status codes are authoritative; see the route handler for the exact body/response shape. Enrichment tracked by the x-median-spec-stage marker.
Request
- Base URLhttps://api.medianfi.com/api/v1
- Auth
- HTTP bearer
- or API key in header X-API-Key
Path parameters
Query parameters
Basis the statements are calculated on (#2911). Omitted or accrual: the accrual calculation, unchanged. cash: a cash-basis view built at read time from the posted ledger under recognition policy cash-basis-v2; nothing is written to the ledger. The company's configured basis (configuredBasis) never selects this; only this parameter does. A cash statement is returned only when it can be proven: otherwise it is refused with CASH_BASIS_UNAVAILABLE and its reasons, and accrual figures are never returned in its place. Until the policy's review is recorded, every cash request is refused with reason policy_unreviewed. Accepted on the accountant reports bundle and the accountant general-ledger drill-downs; the customer P&L, account drilldown, balance sheet, cash flow and trial balance take CustomerBasisQueryParam instead (#4962, #4981). Any other value is a 422.
A signed Accountant Review session can read a typed P&L, balance sheet, cash flow, or trial balance for the eligible entity in the Review roster. The assignment scope omits class, tag, and consolidated views.
Restrict supported statements to one legal entity within the selected company.
Return and load only the selected statement or aging report. Typed balance sheet, trial balance and aging reads rebuild stale balances in memory without updating the monthly cache.
Accounting tag filter (#1166), P&L only: requires type=profit-and-loss. Comma-separated or repeated (max 50); keeps the posted lines owned by a transaction carrying ANY listed tag, each line once, and echoes profitAndLoss.tagFilter. Refused with 400 on the full bundle, every other type, with groupBy=class, with a consolidated scope, and on the general-ledger routes. untagged is refused on reports.
Response
Success envelope; see the route handler for the payload shape
Statements and aging of one customer. With type, only the requested section is present beside type and customerId. Without a customer the payload lists availableReports instead. The four statements share the request's basis; A/R and A/P aging have no basis. A typed cash flow includes the resolved startDate and endDate when available. A typed trial balance includes the effective movement startDate and asOfDate when available. On the monthly-cache path, the movement starts on the first day of the first included month.
Changes
- info
added the new optional
queryrequest parameteraccess
- info
- info
added the new optional
queryrequest parameterentityId
- info