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

# Get account journal entry lines

> 
        Returns paginated journal entry lines for the account with running balance.

        **Response includes:**
        - opening_balance_cents: Balance at start of period (or account inception)
        - closing_balance_cents: Balance at end of period (or current)
        - Running balance per line item
        - Source document type for each entry

        **Filtering:**
        - start_date: Filter entries from this date (inclusive)
        - end_date: Filter entries up to this date (inclusive)
        



## OpenAPI

````yaml GET /v1/platform/businesses/{business_id}/general-ledger/chart-of-accounts/{account_id}/entries/
openapi: 3.0.3
info:
  title: Thredfi Accounting Platform API
  version: 1.0.0
  description: >-
    Comprehensive API for accounting, invoice management, open banking, and
    intelligence services.
servers: []
security: []
paths:
  /v1/platform/businesses/{business_id}/general-ledger/chart-of-accounts/{account_id}/entries/:
    get:
      tags:
        - General Ledger
      summary: Get account journal entry lines
      description: |2-

                Returns paginated journal entry lines for the account with running balance.

                **Response includes:**
                - opening_balance_cents: Balance at start of period (or account inception)
                - closing_balance_cents: Balance at end of period (or current)
                - Running balance per line item
                - Source document type for each entry

                **Filtering:**
                - start_date: Filter entries from this date (inclusive)
                - end_date: Filter entries up to this date (inclusive)
                
      operationId: get_account_entries
      parameters:
        - in: path
          name: account_id
          schema:
            type: string
            format: uuid
          description: A UUID string identifying this account.
          required: true
        - in: path
          name: business_id
          schema:
            type: string
            pattern: ^[0-9a-f-]+$
          required: true
        - in: query
          name: end_date
          schema:
            type: string
            format: date
          description: Filter entries up to this date (YYYY-MM-DD, inclusive)
        - in: query
          name: page
          schema:
            type: integer
          description: Page number (1-indexed)
        - in: query
          name: page_size
          schema:
            type: integer
          description: 'Items per page (default: 20, max: 100)'
        - in: query
          name: start_date
          schema:
            type: string
            format: date
          description: Filter entries from this date (YYYY-MM-DD, inclusive)
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountEntriesResponse'
              examples:
                AccountEntriesResponse:
                  value:
                    account_id: 234567ab-cdef-4567-8901-234567890123
                    account_code: '1100'
                    account_name: Business Bank Account
                    opening_balance_cents: 1000000
                    closing_balance_cents: 1250050
                    total_debits_cents: 500000
                    total_credits_cents: 249950
                    entry_count: 15
                    entries:
                      - id: line-uuid-001
                        journal_entry_id: je-uuid-001
                        journal_entry_date: '2024-03-28'
                        journal_entry_reference: JE-2024-0042
                        journal_entry_description: Customer payment received
                        line_number: 1
                        debit_amount_cents: 54000
                        credit_amount_cents: 0
                        description: Payment from Acme Corp - Invoice INV-2024-001
                        external_reference: INV-2024-001
                        running_balance_cents: 1054000
                        source_type: invoice_payment
                        created_at: '2024-03-28T10:15:00Z'
                  summary: Account entries response
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
          description: Validation errors in request data
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Authentication required - missing or invalid API key
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Permission denied - insufficient privileges
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Resource not found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Conflict - resource already exists or invalid state transition
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable entity - business logic validation failed
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal server error
      security:
        - PartnerJWT: []
        - BusinessScopedJWT: []
        - BasicAuth: []
        - BearerUnscoped: []
        - BearerBusinessScoped: []
components:
  schemas:
    AccountEntriesResponse:
      type: object
      description: Response wrapper for account entries with opening/closing balances.
      properties:
        account_id:
          type: string
          format: uuid
        account_code:
          type: string
        account_name:
          type: string
        opening_balance_cents:
          type: integer
          description: Balance at start of requested period (or account inception)
        closing_balance_cents:
          type: integer
          description: Balance at end of requested period (or current)
        total_debits_cents:
          type: integer
        total_credits_cents:
          type: integer
        entry_count:
          type: integer
        entries:
          type: array
          items:
            $ref: '#/components/schemas/AccountEntryLine'
          readOnly: true
      required:
        - account_code
        - account_id
        - account_name
        - closing_balance_cents
        - entries
        - entry_count
        - opening_balance_cents
        - total_credits_cents
        - total_debits_cents
    ValidationErrorResponse:
      type: object
      description: Validation error response with field-specific errors
      properties:
        error_code:
          type: string
          description: Error code (e.g., 'validation_error')
        message:
          type: string
          nullable: true
          description: Human-readable error message
        detail:
          type: object
          additionalProperties: {}
          description: Contains field_errors and additional context
        request_id:
          type: string
          description: Request ID for tracing
      required:
        - detail
        - error_code
        - message
    ErrorResponse:
      type: object
      description: Standard error response format
      properties:
        error_code:
          type: string
          description: Error code for programmatic handling
        message:
          type: string
          nullable: true
          description: Human-readable error message
        detail:
          type: object
          additionalProperties: {}
          description: Additional error details including field_errors and debug info
        request_id:
          type: string
          description: Request ID for tracing
      required:
        - error_code
        - message
    AccountEntryLine:
      type: object
      description: |-
        Serializer for journal entry lines with running balance.
        Used in account entries endpoint.
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        journal_entry_id:
          type: string
          format: uuid
          readOnly: true
        journal_entry_date:
          type: string
          format: date
          readOnly: true
        journal_entry_reference:
          type: string
          readOnly: true
        journal_entry_description:
          type: string
          readOnly: true
        line_number:
          type: integer
          readOnly: true
        debit_amount_cents:
          type: integer
          readOnly: true
        credit_amount_cents:
          type: integer
          readOnly: true
        description:
          type: string
          readOnly: true
        external_reference:
          type: string
          readOnly: true
        running_balance_cents:
          type: integer
          description: Return running balance from annotated attribute.
          readOnly: true
        source_type:
          type: string
          nullable: true
          description: Determine source document type from journal entry attachments.
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
      required:
        - created_at
        - credit_amount_cents
        - debit_amount_cents
        - description
        - external_reference
        - id
        - journal_entry_date
        - journal_entry_description
        - journal_entry_id
        - journal_entry_reference
        - line_number
        - running_balance_cents
        - source_type
  securitySchemes:
    PartnerJWT:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Partner-level JWT token (unscoped). Token payload includes `partner_id`.
        Business access is validated via partner ownership. Format: `Bearer
        <your-jwt-token>`


        **Use this for**: Multi-business operations where the business_id is
        specified in the URL and partner has access to multiple businesses.
    BusinessScopedJWT:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Business-scoped JWT token. Token payload includes `business_id` to
        automatically scope requests. Format: `Bearer <your-jwt-token>`


        **Use this for**: Business-specific operations where the business
        context is embedded in the token.
    BasicAuth:
      type: http
      scheme: basic
      description: >-
        Basic authentication for OAuth2 token endpoint. Use partner_uuid:api_key
        as username:password. Example: Authorization: Basic
        base64(partner_uuid:api_key)
    BearerUnscoped:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Partner (unscoped) JWT Bearer token. Obtain via POST
        /v1/platform/oauth2/token with Basic auth (partner_uuid:api_key). Use
        header: Authorization: Bearer {access_token}
    BearerBusinessScoped:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Business-scoped JWT Bearer token. Obtain via POST
        /v1/platform/{business_id}/oauth2/token/ using a partner Bearer token.
        Only valid for endpoints whose URL contains that business_id.

````