> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scrip.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Get ledger summary

> Returns aggregated balances and flows per asset, optionally scoped to a program or asset and a time window.

Returns aggregated balances and flows for each asset: `total_issued`, `total_redeemed`, `total_expired`, `total_forfeited`, `current_balance`, `participant_count`, and the asset's `scale`. All values are computed in real time from the ledger.

Scope with `program_id`, `asset_id`, or both; omit both for org-wide totals. Add `from` and `to` for a per-asset period rollforward. Period redemption figures are gross; all-time `total_redeemed` is net of reversals.

<Note>
  For audit-grade period reporting with no residual bucket, use the [liability rollforward](/api-reference/reporting/get-liability-rollforward). For usage patterns, see the [Reporting guide](/guides/reporting).
</Note>


## OpenAPI

````yaml GET /v1/reports/ledger-summary
openapi: 3.0.3
info:
  contact:
    email: support@scrip.dev
    name: Scrip Support
    url: https://scrip.dev/support
  description: >-
    Universal Incentive Infrastructure API for managing loyalty programs,
    rewards, and participant balances.


    Scrip provides a complete backend for building incentive and loyalty
    programs. Core concepts:

    - **Programs**: Containers for incentive logic (e.g., "Q1 Sales Bonus",
    "Customer Loyalty")

    - **Assets**: The currency or points being tracked (e.g., "Bonus Points",
    "Cash Rewards")

    - **Participants**: Users who earn and spend assets (identified by
    external_id)

    - **Groups**: Collections of participants for team-based incentives

    - **Rules**: Automated reward logic triggered by events

    - **Events**: Actions that trigger rule evaluation (e.g., "purchase",
    "referral")


    Response formats:

    - **Collection endpoints** return: {"data": [...], "pagination":
    {"has_more": true, "next_cursor": "..."}}

    - **Single-resource endpoints** return the resource directly

    - **Errors** return: {"code": "...", "message": "...", "details": {...}} —
    `details` is an optional object, present on input errors only
  license:
    name: Proprietary
    url: https://scrip.dev/license
  termsOfService: https://scrip.dev/terms
  title: Scrip API
  version: '1.0'
servers:
  - url: https://api.scrip.dev
security: []
tags:
  - description: >-
      Manage incentive programs. Programs are the top-level container for all
      incentive logic.
    name: Programs
  - description: >-
      Manage asset types (currencies, points). Assets define what participants
      can earn and spend.
    name: Assets
  - description: >-
      Manage participants and their balances. Participants are identified by
      external_id from your system.
    name: Participants
  - description: Manage participant groups for team-based incentives.
    name: Groups
  - description: >-
      Manage automated reward rules. Rules define conditions and actions
      triggered by events.
    name: Rules
  - description: Ingest events that trigger rule evaluation and reward distribution.
    name: Events
  - description: Transfer assets between participants.
    name: Transfers
  - description: Access ledger summaries and program activity reports.
    name: Reporting
  - description: >-
      Redeem participant balances for rewards. Supports raw amount redemptions
      and catalog item redemptions.
    name: Redemptions
  - description: >-
      Manage the reward catalog. Create and manage redeemable items with
      inventory tracking.
    name: Rewards
  - description: >-
      Schedule and manage automated event dispatching. Automations generate
      events on cron schedules, at specific times, or by evaluating participant
      state.
    name: Automations
  - description: >-
      Manage tier types and levels within programs. Tiers define status
      hierarchies that participants progress through based on qualification
      rules.
    name: Tiers
  - description: Inspect double-entry ledger records for auditing and reconciliation.
    name: Journal Entries
  - description: >-
      Manage webhook endpoints and delivery logs. Webhooks notify your
      application of real-time events via HTTP POST with HMAC-SHA256 signatures.
    name: Webhooks
paths:
  /v1/reports/ledger-summary:
    get:
      tags:
        - Reporting
      summary: Get ledger summary
      description: >-
        Returns aggregated balances and flows per asset, optionally scoped to a
        program or asset and a time window.
      operationId: getLedgerSummary
      parameters:
        - description: Filter by program ID. May be combined with asset_id.
          in: query
          name: program_id
          schema:
            format: uuid
            type: string
        - description: Filter to a single asset. May be combined with program_id.
          in: query
          name: asset_id
          schema:
            format: uuid
            type: string
        - description: Period start (inclusive, RFC3339). Must be provided with `to`.
          in: query
          name: from
          schema:
            format: date-time
            type: string
        - description: Period end (inclusive, RFC3339). Must be provided with `from`.
          in: query
          name: to
          schema:
            format: date-time
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handlers.LedgerSummaryListResponse'
          description: Ledger summaries
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handlers.ErrBadRequestResponse'
          description: 'Invalid query parameters (code: bad_request)'
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handlers.ErrUnauthorizedResponse'
          description: 'Missing or invalid credentials (code: unauthorized)'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handlers.ErrInternalResponse'
          description: 'Internal server error (code: internal_error)'
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    handlers.LedgerSummaryListResponse:
      description: Ledger summary results
      properties:
        data:
          description: Per-asset ledger summaries
          items:
            $ref: '#/components/schemas/handlers.LedgerSummaryResponse'
          type: array
        pagination:
          allOf:
            - $ref: '#/components/schemas/handlers.PaginationResponse'
          description: Pagination metadata for list responses
      type: object
    handlers.ErrBadRequestResponse:
      additionalProperties: false
      properties:
        code:
          description: Code is the machine-readable error code
          example: bad_request
          type: string
        details:
          allOf:
            - $ref: '#/components/schemas/handlers.ErrorDetails'
          description: >-
            Details provides optional structured error context (field errors,
            etc.)
        message:
          description: Message is the human-readable error description
          example: Invalid request parameters
          type: string
      type: object
    handlers.ErrUnauthorizedResponse:
      properties:
        code:
          description: Code is the machine-readable error code
          example: unauthorized
          type: string
        details:
          allOf:
            - $ref: '#/components/schemas/handlers.ErrorDetails'
          description: Details provides optional structured error context
        message:
          description: Message is the human-readable error description
          example: Missing or invalid credentials
          type: string
      type: object
    handlers.ErrInternalResponse:
      properties:
        code:
          description: Code is the machine-readable error code
          example: internal_error
          type: string
        message:
          description: Message is the human-readable error description
          example: An internal error occurred
          type: string
      type: object
    handlers.LedgerSummaryResponse:
      description: Aggregated ledger statistics for a single asset
      properties:
        asset_id:
          description: Unique identifier for this asset
          example: 550e8400-e29b-41d4-a716-446655440000
          format: uuid
          type: string
        asset_name:
          description: Display name for this asset
          example: Loyalty Points
          type: string
        asset_symbol:
          description: Ticker or symbol for this asset (e.g., `POINTS`)
          example: POINTS
          type: string
        closing_balance:
          description: Liability balance at the end of the requested period
          example: '562500.00'
          type: string
        current_balance:
          description: >-
            Net outstanding liability. Reconciles as total_issued −
            total_redeemed − total_forfeited − total_expired +
            other_adjustments_net.
          example: '625000.00'
          type: string
        opening_balance:
          description: Liability balance at the start of the requested period
          example: '500000.00'
          type: string
        other_adjustments_net:
          description: >-
            Net of all liability movements not captured by the
            issued/redeemed/forfeited/expired buckets — manual debits and
            credits, redemption reversals, and similar adjustments. Always
            returned, and closes the rollforward identity: all-time mode
            reconciles against current_balance, period mode against
            opening_balance/closing_balance.
          example: '-905.00'
          type: string
        participant_count:
          description: Number of participants holding a balance in this asset
          example: 15420
          type: integer
        period_expired:
          description: Amount expired during the requested period
          example: '2500.00'
          type: string
        period_forfeited:
          description: Amount manually forfeited during the requested period
          example: '2000.00'
          type: string
        period_issued:
          description: Amount issued during the requested period
          example: '150000.00'
          type: string
        period_redeemed:
          description: >-
            Gross amount redeemed during the requested period; reversals are
            reflected in other_adjustments_net
          example: '85000.00'
          type: string
        scale:
          description: >-
            Number of decimal places for this asset. All amount fields in this
            row are denominated in this asset at this scale; never sum amounts
            across rows with different assets.
          example: 2
          type: integer
        total_expired:
          description: >-
            Cumulative amount expired from participant accounts via lot
            expiration (all-time)
          example: '5000.00'
          type: string
        total_forfeited:
          description: >-
            Cumulative amount forfeited from participant accounts by explicit
            forfeit actions (all-time)
          example: '20000.00'
          type: string
        total_issued:
          description: >-
            Cumulative amount issued to participants from system supply
            (all-time, includes unlimited and prefunded)
          example: '1500000.00'
          type: string
        total_redeemed:
          description: >-
            Cumulative amount redeemed by participants, net of reversals
            (all-time)
          example: '850000.00'
          type: string
      type: object
    handlers.PaginationResponse:
      properties:
        has_more:
          description: Whether more results are available beyond this page
          example: true
          type: boolean
        next_cursor:
          description: Cursor to fetch the next page. Absent when there are no more results
          example: YWJjMTIz
          type: string
      type: object
    handlers.ErrorDetails:
      description: >-
        Optional structured details about the error. Always a JSON object: a
        `fields` array for validation errors, or flat
        field/reason/expected/received properties for other input errors.
      properties:
        expected:
          description: Expected value or format (non-validation input errors)
          example: uuid
          type: string
        field:
          description: Field name that caused the error (non-validation input errors)
          example: asset_id
          type: string
        fields:
          description: >-
            Fields lists each offending input field on validation_error
            responses.
          items:
            $ref: '#/components/schemas/handlers.ErrorFieldDetail'
          type: array
        reason:
          description: Machine-readable reason code (non-validation input errors)
          example: invalid
          type: string
        received:
          description: Value that was received (non-validation input errors)
          example: not-a-uuid
          type: string
      type: object
    handlers.ErrorFieldDetail:
      description: >-
        A single field-level error: which input field failed, why, and (where
        known) the expected and received values.
      properties:
        expected:
          description: >-
            Expected value or format. Usually a string; for "one of" constraints
            it

            is an array of the allowed values.
        field:
          description: Field name that caused the error
          example: amount
          type: string
        message:
          description: Human-readable explanation (validation errors only)
          example: This field is required
          type: string
        reason:
          description: Machine-readable reason code
          example: required
          type: string
        received:
          description: Value that was received
          example: '-10.00'
          type: string
      type: object
  securitySchemes:
    ApiKeyAuth:
      description: API key passed in the X-API-Key header.
      in: header
      name: X-API-Key
      type: apiKey
    BearerAuth:
      description: Bearer token passed in the Authorization header (e.g. "Bearer sk_...").
      in: header
      name: Authorization
      type: apiKey

````