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

# Get a bank account

> Retrieves a specified bank account.



## OpenAPI

````yaml /openapi.json get /bankaccounts/{id}
openapi: 3.0.1
info:
  title: API
  version: '1.0'
servers:
  - url: https://api.smokeball.com
  - url: https://api.smokeball.com.au
  - url: https://api.smokeball.co.uk
  - url: https://stagingapi.smokeball.com
  - url: https://stagingapi.smokeball.com.au
  - url: https://stagingapi.smokeball.co.uk
security:
  - api-key: []
    token: []
paths:
  /bankaccounts/{id}:
    get:
      tags:
        - Bank Accounts
      summary: Get a bank account
      description: Retrieves a specified bank account.
      operationId: GetBankAccountById
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: When request is successful. Returns a 'BankAccount' object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankAccount'
        '400':
          description: When an unsupported request is made.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: >-
            When bank account with specified id is not associated with
            authenticated client.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: When bank account with specified id does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    BankAccount:
      type: object
      properties:
        href:
          type: string
          nullable: true
        relation:
          type: string
          nullable: true
        method:
          type: string
          default: GET
          nullable: true
        self:
          allOf:
            - $ref: '#/components/schemas/Link'
          nullable: true
        id:
          type: string
          description: Unique identifier of the bank account.
          nullable: true
          example: b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2
        type:
          type: string
          description: >-
            The type of the bank account (Operating, Trust, Credit,
            ControlledMoney).
          example: Trust
        status:
          allOf:
            - $ref: '#/components/schemas/AccountState'
          description: The status of the account (Open, Closed).
        matter:
          allOf:
            - $ref: '#/components/schemas/Link'
          description: "The Matter associated to the account. \r\n\r\nApplies to 'ControlledMoney' accounts only."
          nullable: true
        accountType:
          type: integer
          description: "The type of the bank account (Operating = 0, Trust = 1, Credit = 2, ControlledMoney = 3).\r\n\r\nThis field is deprecated and scheduled for removal - use the Type field instead."
          format: int32
          example: 0
        accountName:
          type: string
          description: Account Name.
          nullable: true
          example: John Smith
        accountNumber:
          type: string
          description: Account Number.
          nullable: true
          example: '10436489'
        bankName:
          type: string
          description: Bank Name.
          nullable: true
          example: Commonwealth Bank
        branchNumber:
          type: string
          description: Branch Number.
          nullable: true
          example: '062201'
        branchName:
          type: string
          description: Branch Name.
          nullable: true
          example: Sydney
        balance:
          type: number
          description: Total balance of the bank account.
          format: double
          example: 1000
        contactBalances:
          type: array
          items:
            $ref: '#/components/schemas/BankAccountContactBalance'
          description: "List of contact balances.\r\n\r\nIf balances are stored by matter, not by contact, then there can be\r\na contact balance with no contact id. In this case, MatterBalances are used instead.\r\n\r\nOnly supported in US."
          nullable: true
        matterBalances:
          type: array
          items:
            $ref: '#/components/schemas/BankAccountMatterBalance'
          description: "List of matter balances.\r\n\r\nA matter balance will be equal to the sum of all contact balances with the same MatterId."
          nullable: true
      additionalProperties: false
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    Link:
      type: object
      properties:
        id:
          type: string
          nullable: true
        href:
          type: string
          nullable: true
        relation:
          type: string
          nullable: true
        method:
          type: string
          default: GET
          nullable: true
      additionalProperties: false
    AccountState:
      enum:
        - 0
        - 1
      type: integer
      format: int32
    BankAccountContactBalance:
      type: object
      properties:
        matter:
          allOf:
            - $ref: '#/components/schemas/Link'
          description: The associated matter.
          nullable: true
        contact:
          allOf:
            - $ref: '#/components/schemas/Link'
          description: The associated contact.
          nullable: true
        balance:
          type: number
          description: The balance belonging for the specified matter contact.
          format: double
          example: 1000
        protectedBalance:
          type: number
          description: The protected balance for the specified matter and contact.
          format: double
          example: 1000
        availableBalance:
          type: number
          description: "The available balance for the specified matter and contact.\r\n            \r\nThis value is calculated as the total balance minus the protected balance."
          format: double
          example: 1000
        lastUpdated:
          type: string
          description: Date and time that the balance was last updated.
          format: date-time
          nullable: true
      additionalProperties: false
    BankAccountMatterBalance:
      type: object
      properties:
        matter:
          allOf:
            - $ref: '#/components/schemas/Link'
          description: The associated matter.
          nullable: true
        balance:
          type: number
          description: The balance belonging for the specified matter.
          format: double
          example: 1000
        protectedBalance:
          type: number
          description: The protected balance for the specified matter.
          format: double
          example: 1000
        availableBalance:
          type: number
          description: "The available balance for the specified matter.\r\n            \r\nThis value is calculated as the total balance minus the protected balance."
          format: double
          example: 1000
        unpresentedChequesBalance:
          type: number
          description: "Balance of the unpresented cheques for this matter. A cheque is considered \r\nunpresented if the related transaction has not been reconciled. If this balance is not zero,\r\nsome actions on the matter are restricted (e.g. closing or cancelling the matter)."
          format: double
          example: 0
        lastUpdated:
          type: string
          description: Date and time that the balance was last updated.
          format: date-time
          nullable: true
      additionalProperties: false
  securitySchemes:
    api-key:
      type: apiKey
      name: x-api-key
      in: header
    token:
      type: apiKey
      name: Authorization
      in: header
      x-amazon-apigateway-authtype: cognito_user_pools

````