> ## 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 member's accounts

> Get member's accounts based on member id.
Can include member's balance in the response.



## OpenAPI

````yaml openapi/bonus-v1.json GET /v1/members/{memberId}/accounts
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/members/{memberId}/accounts:
    get:
      tags:
        - Service2Service
      summary: Get member's accounts
      description: |-
        Get member's accounts based on member id.
        Can include member's balance in the response.
      parameters:
        - name: memberId
          in: path
          description: The id of the member, max length 36
          required: true
          schema:
            maxLength: 36
            type: string
        - name: includeBalance
          in: query
          description: >-
            Indicates whether to include active and reserved balance in the
            response
          schema:
            type: boolean
        - name: accountType
          in: query
          description: Indicates whether to filter for specific account type (optional)
          schema:
            type: string
        - name: includeExpiringBalance
          in: query
          description: If true, will return the expiring balance
          schema:
            type: boolean
        - name: isActive
          in: query
          description: >-
            If null, will return all accounts. If true, accounts will be
            filtered by isActive value
          schema:
            type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/Accounting.Api.CQRS.Queries.GetAccounts.Account
        '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.GetAccounts.Account:
      required:
        - conversionRate
        - id
        - isActive
        - isAllowedToSpend
        - type
      type: object
      properties:
        id:
          type: integer
          description: Account id
          format: int64
        isActive:
          type: boolean
          description: Flag used to mark if the account is active or not
        isAllowedToSpend:
          type: boolean
          description: Flag used to mark if the account can consume the balance or not
        type:
          minLength: 1
          type: string
          description: Type of the account
        conversionRate:
          type: number
          description: Conversion rate
          format: double
        externalId:
          maxLength: 60
          type: string
          description: External Id of the account
          nullable: true
        availableBalance:
          type: number
          description: Available balance in the account
          format: double
          nullable: true
        reservedBalance:
          type: number
          description: Reserved balance of the account
          format: double
          nullable: true
        expiringBalance:
          $ref: '#/components/schemas/Accounting.Api.CQRS.Dto.ExpiringBalance'
      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.Dto.ExpiringBalance:
      type: object
      properties:
        header:
          type: string
          description: >-
            Header that describes the setup of expiry to be displayed in app.

            Example of value: "Your bonus is valid 1 year from the day you
            earned it."
          nullable: true
        expirationDate:
          type: string
          description: Date of the next expiry
          format: date-time
        amount:
          $ref: '#/components/schemas/Accounting.Api.CQRS.Dto.MoneyDto'
        frequency:
          $ref: '#/components/schemas/Common.System.TimePeriod'
        notificationPeriodExpiration:
          $ref: >-
            #/components/schemas/Accounting.Api.CQRS.Dto.NotificationPeriodExpirationBalance
      additionalProperties: false
    Accounting.Api.CQRS.Dto.MoneyDto:
      required:
        - currency
        - value
      type: object
      properties:
        currency:
          minLength: 1
          type: string
          description: |-
            Currency code ISO 4217.
            Length 3 chars.
            Examples: DKK, ISK
        value:
          type: number
          format: double
      additionalProperties: false
    Common.System.TimePeriod:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/Common.System.PeriodType'
        value:
          type: integer
          format: int32
      additionalProperties: false
    Accounting.Api.CQRS.Dto.NotificationPeriodExpirationBalance:
      type: object
      properties:
        amount:
          $ref: '#/components/schemas/Accounting.Api.CQRS.Dto.MoneyDto'
        label:
          type: string
          description: >-
            Label to be displayed in mobile app to describe the balance that
            will expire during notification period

            Example: Expiring during the next 2 weeks
          nullable: true
      additionalProperties: false
    Common.System.PeriodType:
      enum:
        - Day
        - Week
        - Month
        - Year
      type: string
  securitySchemes:
    Bearer:
      type: apiKey
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        "Authorization: Bearer {token}"
      name: Authorization
      in: header

````