Skip to main content
Version: v1.0.0(int)

E102: List ledger entries

GET /api/materials-inventory/ledger

Returns materials ledger entries matching the supplied filters, newest first. Triggered from the Materials Inventory Ledger page and the Materials Inventory Transfers page (which filters by ref).

Authentication​

Standard tenant route. Requires Authorization: Bearer <firebase-id-token> and X-Org-Id: <org-id>. Access: Member. Also reachable with an org-scoped PAT.

Request​

No body. All filters are optional and combine with AND:

  • ?materialId= / ?locationId= — exact match.
  • ?eventType= — one of the ledger event types (e.g. TRANSFER, RECEIVE, ADJUST, DISPOSE).
  • ?ref= — a SQL LIKE pattern; use % as the wildcard (e.g. TFR-MI-% for transfer rows). Without a wildcard it is an exact match.
  • ?dateFrom= / ?dateTo= — inclusive bounds on event_date.

The list is unpaginated (the ledger is bounded per org in v1).

Response — 200 OK​

{ "data": [ LedgerEntry ] }

Entries ordered by event_date then created_at, descending. See E103 for the full entry shape.

Errors​

HTTPcodeCondition
422validation_failedeventType is not a recognized ledger event type.

Workflow​

Calls W102 List ledger entries.