> ## 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 group statement

> Returns a running-balance statement of a group wallet's ledger activity for one asset, with opening and closing balances for the window. When program_id is provided, movements and balances are scoped to that program's journal entries.

Returns a running-balance statement for one group and one asset. The `asset_id` query parameter is required. Each row represents one posting and includes the signed movement amount, bucket, journal entry, and running balance.

`from` and `to` select rows by the journal entry's system ingestion time. They do not reset the running-balance calculation. `opening_balance` is the scoped balance immediately before `from`, and `closing_balance` is the scoped balance as of `to`. Pass `bucket` to scope rows and balances to `AVAILABLE`, `HELD`, or `DEFERRED`.

Pass `program_id` to scope movements, opening and closing balances, and running balances to journal entries attributed to that program. This filter follows journal activity attribution, not a lot's original issuer lineage. Journal entries without a `program_id`, such as system-attributed activity, are excluded from a program-scoped statement.

A successful response contains `data`, `opening_balance`, `closing_balance`, and `pagination`. Treat missing or malformed fields as an error rather than substituting an empty movement list or zero balance.

<Note>
  For statement and audit-trail usage, see the [Reporting guide](/guides/reporting).
</Note>


## OpenAPI

````yaml GET /v1/groups/{id}/statement
openapi: 3.0.3
info:
  contact:
    email: support@scrip.dev
    name: Scrip Support
  description: >-
    Scrip is the operating system for rewards programs. Use this REST API to
    define earn and redemption rules, issue and redeem assets, and track every
    movement in a double-entry ledger. Full guides and reference:
    https://docs.scrip.dev


    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
  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/groups/{id}/statement:
    get:
      tags:
        - Groups
      summary: Get group wallet statement
      description: >-
        Returns a running-balance statement of a group wallet's ledger activity
        for one asset, with opening and closing balances for the window. When
        program_id is provided, movements and balances are scoped to that
        program's journal entries.
      operationId: getGroupStatement
      parameters:
        - description: Group ID
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
        - description: Scope movements and balances to this program
          in: query
          name: program_id
          schema:
            format: uuid
            type: string
        - description: Asset to produce the statement for
          in: query
          name: asset_id
          required: true
          schema:
            format: uuid
            type: string
        - description: Scope the statement (rows and running balance) to a single bucket
          in: query
          name: bucket
          schema:
            enum:
              - AVAILABLE
              - HELD
              - DEFERRED
            type: string
        - description: >-
            Start of statement window (RFC 3339) — selects returned rows on
            system ingestion time
          in: query
          name: from
          schema:
            format: date-time
            type: string
        - description: >-
            End of statement window (RFC 3339) — selects returned rows on system
            ingestion time
          in: query
          name: to
          schema:
            format: date-time
            type: string
        - description: Maximum number of results (default 50, max 200)
          in: query
          name: limit
          schema:
            default: 50
            minimum: 1
            type: integer
        - description: Pagination cursor from previous response
          in: query
          name: cursor
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handlers.StatementResponse'
          description: Statement page with running balances
        '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)'
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handlers.ErrForbiddenResponse'
          description: 'Insufficient permissions (code: forbidden)'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handlers.ErrNotFoundResponse'
          description: 'Group or asset not found (code: not_found)'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handlers.ErrInternalResponse'
          description: 'Internal server error (code: internal_error)'
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    handlers.StatementResponse:
      properties:
        asset_id:
          description: Asset the statement covers
          example: 550e8400-e29b-41d4-a716-446655440000
          format: uuid
          type: string
        bucket:
          description: >-
            Bucket scope, when the statement was requested for a single bucket.

            Absent when the statement covers all buckets (running balance is
            then

            the total across buckets).
          example: AVAILABLE
          type: string
        closing_balance:
          description: >-
            Scope balance as of the end of the window (the current balance when
            no

            to is given). Always equals the as-of(to) balance for the same

            entity/asset/bucket scope, regardless of pagination.
          example: '350'
          type: string
        data:
          description: Statement lines, oldest first
          items:
            $ref: '#/components/schemas/handlers.StatementEntryResponse'
          type: array
        from:
          description: Start of the statement window, when provided
          example: '2024-01-01T00:00:00Z'
          type: string
        opening_balance:
          description: >-
            Scope balance immediately before the window ("0" when no from is
            given)
          example: '250'
          type: string
        pagination:
          allOf:
            - $ref: '#/components/schemas/handlers.PaginationResponse'
          description: Pagination metadata for fetching subsequent statement pages
        to:
          description: End of the statement window, when provided
          example: '2024-02-01T00:00:00Z'
          type: string
      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.ErrForbiddenResponse:
      properties:
        code:
          description: Code is the machine-readable error code
          example: forbidden
          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: Insufficient permissions for this action
          type: string
      type: object
    handlers.ErrNotFoundResponse:
      properties:
        code:
          description: Code is the machine-readable error code
          example: not_found
          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: Resource not found
          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.StatementEntryResponse:
      properties:
        action_type:
          description: Originating action type
          example: CREDIT
          type: string
        amount:
          description: Movement amount, negative for debits
          example: '100'
          type: string
        bucket:
          description: Balance bucket this posting hit
          example: AVAILABLE
          type: string
        created_at:
          description: When this movement was recorded
          example: '2024-01-15T10:30:00Z'
          format: date-time
          type: string
        created_by_api_key_id:
          description: API key that initiated this movement, if via API
          example: 770e8400-e29b-41d4-a716-446655440000
          format: uuid
          type: string
        description:
          description: Operation summary
          example: Points earned
          type: string
        event_id:
          description: Event that triggered this movement, if any
          example: 660e8400-e29b-41d4-a716-446655440000
          format: uuid
          type: string
        event_timestamp:
          description: >-
            When the originating event occurred (from event_timestamp), if
            event-driven
          example: '2024-01-15T10:30:00Z'
          format: date-time
          type: string
        journal_entry_id:
          description: Ledger journal entry for this movement
          example: 550e8400-e29b-41d4-a716-446655440000
          format: uuid
          type: string
        posting_id:
          description: Posting this line represents
          example: 880e8400-e29b-41d4-a716-446655440000
          format: uuid
          type: string
        running_balance:
          description: |-
            Scope balance after this movement (computed over the full unfiltered
            history of the statement scope)
          example: '350'
          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

````