> ## 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 details

> Gets account details by id.
Can include balance calculation in response.



## OpenAPI

````yaml openapi/bonus-v1.json GET /v1/accounts/{externalId}
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}:
    get:
      tags:
        - Service2Service
      summary: Get account details
      description: |-
        Gets account details by id.
        Can include balance calculation in response.
      parameters:
        - name: externalId
          in: path
          description: Account externalId
          required: true
          schema:
            maxLength: 60
            type: string
        - name: includeBalance
          in: query
          description: Flag to include balance calculation into response
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Accounting.Api.CQRS.Queries.GetAccount.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.GetAccount.Response:
      required:
        - conversionRate
        - externalId
        - isActive
        - isAllowedToSpend
        - type
      type: object
      properties:
        externalId:
          minLength: 1
          type: string
        isActive:
          type: boolean
        isAllowedToSpend:
          type: boolean
        type:
          minLength: 1
          type: string
        conversionRate:
          type: number
          format: double
        balance:
          $ref: '#/components/schemas/Accounting.Api.CQRS.Queries.GetAccount.Balance'
      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.GetAccount.Balance:
      required:
        - available
        - reserved
      type: object
      properties:
        available:
          type: number
          format: double
        reserved:
          type: number
          format: double
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: apiKey
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        "Authorization: Bearer {token}"
      name: Authorization
      in: header

````