> ## 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 account's statements in descending order using the account's externalId



## OpenAPI

````yaml openapi/bonus-v1.json GET /v1/accounts/{externalId}/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/{externalId}/statements:
    get:
      tags:
        - Service2Service
      summary: Get account statements
      description: >-
        Get account's statements in descending order using the account's
        externalId
      parameters:
        - name: externalId
          in: path
          description: Account externalId
          required: true
          schema:
            maxLength: 60
            type: string
        - 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
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Accounting.Api.CQRS.Queries.GetStatements.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.GetStatements.Response:
      required:
        - items
      type: object
      properties:
        items:
          type: array
          items:
            $ref: >-
              #/components/schemas/Accounting.Api.CQRS.Queries.GetStatements.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.GetStatements.Statement:
      required:
        - amount
        - createdAt
        - id
        - state
        - stateDisplayName
        - type
        - typeDisplayName
      type: object
      properties:
        id:
          type: integer
          format: int64
        amount:
          type: number
          format: double
        type:
          minLength: 1
          type: string
        typeDisplayName:
          minLength: 1
          type: string
        state:
          $ref: '#/components/schemas/Accounting.Domain.Entities.TransactionState'
        stateDisplayName:
          minLength: 1
          type: string
        createdAt:
          type: string
          format: date-time
        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

````