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

# Get account statements

> Get detailed statements of an account based on account Id.
The sort of statements is done in descending order based on the creation date.
The statements includes running balance and all partitions.



## OpenAPI

````yaml openapi/bonus-v1.json GET /v1/accounts/{accountId}/detailed-statements
openapi: 3.0.4
info:
  title: Accounting.Api
  version: v1
servers:
  - url: https://{host}/bonus
    description: Your Lobyco environment
    variables:
      host:
        default: your-environment.lobyco.net
        description: >-
          The API host for your Lobyco environment. Replace it with the host you
          were given — this placeholder does not resolve.
security:
  - Bearer: []
paths:
  /v1/accounts/{accountId}/detailed-statements:
    get:
      tags:
        - Service2Service
      summary: Get account statements
      description: >-
        Get detailed statements of an account based on account Id.

        The sort of statements is done in descending order based on the creation
        date.

        The statements includes running balance and all partitions.
      parameters:
        - name: accountId
          in: path
          description: The id of account
          required: true
          schema:
            type: integer
            format: int64
        - name: limit
          in: query
          description: Items count to take
          required: true
          schema:
            maximum: 2147483647
            minimum: 1
            type: integer
            format: int32
        - name: cursor
          in: query
          description: >-
            Pointer to a specific item in the data set received from the
            previous request
          schema:
            maximum: 9223372036854776000
            minimum: 1
            type: integer
            format: int64
        - name: includeRunningBalance
          in: query
          description: Option to disable running balance calculation if not needed
          schema:
            type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Accounting.Api.CQRS.Queries.GetDetailedStatements.Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/LoopFoundation.Commons.Contracts.WebServiceError
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/LoopFoundation.Commons.Contracts.WebServiceError
components:
  schemas:
    Accounting.Api.CQRS.Queries.GetDetailedStatements.Response:
      required:
        - items
      type: object
      properties:
        items:
          type: array
          items:
            $ref: >-
              #/components/schemas/Accounting.Api.CQRS.Queries.GetDetailedStatements.Statement
          description: Items
        nextCursor:
          type: integer
          description: |-
            Should be passed as cursor in the subsequent request.
            If there is no value then there are no more items to be fetched
          format: int64
          nullable: true
      additionalProperties: false
    LoopFoundation.Commons.Contracts.WebServiceError:
      required:
        - message
        - name
      type: object
      properties:
        name:
          minLength: 1
          type: string
        message:
          minLength: 1
          type: string
        details:
          nullable: true
      additionalProperties: false
    Accounting.Api.CQRS.Queries.GetDetailedStatements.Statement:
      required:
        - amount
        - createdAt
        - entryId
        - partitionType
        - settlementDate
        - state
        - transactionId
        - type
      type: object
      properties:
        transactionId:
          type: integer
          format: int64
        entryId:
          type: integer
          format: int64
        createdAt:
          type: string
          format: date-time
        settlementDate:
          type: string
          format: date-time
        state:
          $ref: '#/components/schemas/Accounting.Domain.Entities.TransactionState'
        amount:
          type: number
          format: double
        type:
          minLength: 1
          type: string
        partitionType:
          minLength: 1
          type: string
        balance:
          type: number
          format: double
          nullable: true
        metadata:
          type: object
          additionalProperties:
            nullable: true
          nullable: true
      additionalProperties: false
    Accounting.Domain.Entities.TransactionState:
      enum:
        - Waiting
        - Successful
        - Cancelled
      type: string
  securitySchemes:
    Bearer:
      type: apiKey
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        "Authorization: Bearer {token}"
      name: Authorization
      in: header

````