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

# Retrieve Bank Account Connection

> 
        Retrieve detailed information about a specific bank account connection.

        Returns comprehensive information including:
        - Account details (name, mask, balance, currency)
        - Connection status and sync information
        - Bank link context (provider, business)
        - Account mapping information
        - Timestamps and metadata

        **Access Control:**
        - Only accessible for bank accounts belonging to the authenticated partner's businesses
        



## OpenAPI

````yaml GET /v1/platform/businesses/{business_id}/bank-accounts/{bank_account_id}/
openapi: 3.0.3
info:
  title: Thredfi Accounting Platform API
  version: 1.0.0
  description: >-
    Comprehensive API for accounting, invoice management, open banking, and
    intelligence services.
servers: []
security: []
paths:
  /v1/platform/businesses/{business_id}/bank-accounts/{bank_account_id}/:
    get:
      tags:
        - Bank Accounts Management
      summary: Retrieve Bank Account Connection
      description: |2-

                Retrieve detailed information about a specific bank account connection.

                Returns comprehensive information including:
                - Account details (name, mask, balance, currency)
                - Connection status and sync information
                - Bank link context (provider, business)
                - Account mapping information
                - Timestamps and metadata

                **Access Control:**
                - Only accessible for bank accounts belonging to the authenticated partner's businesses
                
      operationId: retrieve_bank_account
      parameters:
        - in: path
          name: bank_account_id
          schema:
            type: string
            format: uuid
          required: true
        - in: path
          name: business_id
          schema:
            type: string
            format: uuid
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankAccountConnection'
              examples:
                UKBusinessBankAccount(Barclays):
                  value:
                    id: 9f90c3cc-6i00-0h16-eeee-eii81402618g
                    account_key: plaid_acc_Barclays_Checking_1234
                    display_name: Barclays Business Current Account
                    official_name: Barclays Bank PLC - Business Account
                    mask: '1234'
                    balance: 12500.5
                    balance_cents: 1250050
                    currency: GBP
                    is_active: true
                    bank_link_status: active
                    bank_link_id: 8e80c3cc-5h99-9g05-dddd-dhh70291507f
                    business_id: 7d70c3cc-4g88-8f04-cccc-cgg69180406e
                    business_name: The Red Lion Pub Ltd
                    provider: plaid
                    mapped_account: acc-1000-cash
                    created_at: '2024-01-15T10:30:00Z'
                    updated_at: '2024-03-28T14:22:00Z'
                  summary: UK Business Bank Account (Barclays)
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
          description: Validation errors in request data
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Authentication required - missing or invalid API key
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Permission denied - insufficient privileges
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Resource not found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Conflict - resource already exists or invalid state transition
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable entity - business logic validation failed
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal server error
      security:
        - BusinessScopedJWT: []
        - PartnerJWT: []
        - BasicAuth: []
        - BearerUnscoped: []
        - BearerBusinessScoped: []
components:
  schemas:
    BankAccountConnection:
      type: object
      description: |-
        Comprehensive serializer for bank account connections.

        Provides detailed information about connected bank accounts including
        status, balance, sync information, and related business context.
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
          description: Unique bank account connection identifier
        account_key:
          type: string
          description: >-
            Provider-specific account key for identifying this account in their
            system
          maxLength: 255
        display_name:
          type: string
          description: User-friendly account name (e.g., 'Business Current Account')
          maxLength: 255
        official_name:
          type: string
          description: Official bank account name from the financial institution
          maxLength: 255
        mask:
          type: string
          description: Last 4 digits of account number for identification (e.g., '1234')
          maxLength: 10
        balance:
          type: number
          format: double
          nullable: true
          readOnly: true
          description: >-
            Current account balance in decimal format (e.g., 12500.50 for
            £12,500.50) - for backward compatibility
        balance_cents:
          type: integer
          readOnly: true
          description: Current account balance in cents (e.g., 1250050 for £12,500.50)
        currency:
          type: string
          description: Account currency code (GBP, EUR, USD)
          maxLength: 3
        is_active:
          type: boolean
          description: >-
            Whether this account connection is active and syncing transactions
            (false if disconnected)
        bank_link_status:
          type: string
          readOnly: true
          description: Bank link connection status (active, revoked, error)
        bank_link_id:
          type: string
          format: uuid
          readOnly: true
          description: Bank link UUID that this account belongs to
        business_id:
          type: string
          format: uuid
          readOnly: true
          description: Business UUID that owns this bank account
        business_name:
          type: string
          readOnly: true
          description: Business name for display purposes
        provider:
          type: string
          readOnly: true
          description: Banking data provider (e.g., plaid, open_banking)
        mapped_account:
          type: string
          format: uuid
          nullable: true
          description: >-
            Chart of accounts ID this bank account is mapped to (null if not
            mapped)
        created_at:
          type: string
          format: date-time
          readOnly: true
          description: Timestamp when bank account was first connected
        updated_at:
          type: string
          format: date-time
          readOnly: true
          description: Timestamp of last update to account information
      required:
        - account_key
        - balance
        - balance_cents
        - bank_link_id
        - bank_link_status
        - business_id
        - business_name
        - created_at
        - id
        - provider
        - updated_at
    ValidationErrorResponse:
      type: object
      description: Validation error response with field-specific errors
      properties:
        error_code:
          type: string
          description: Error code (e.g., 'validation_error')
        message:
          type: string
          nullable: true
          description: Human-readable error message
        detail:
          type: object
          additionalProperties: {}
          description: Contains field_errors and additional context
        request_id:
          type: string
          description: Request ID for tracing
      required:
        - detail
        - error_code
        - message
    ErrorResponse:
      type: object
      description: Standard error response format
      properties:
        error_code:
          type: string
          description: Error code for programmatic handling
        message:
          type: string
          nullable: true
          description: Human-readable error message
        detail:
          type: object
          additionalProperties: {}
          description: Additional error details including field_errors and debug info
        request_id:
          type: string
          description: Request ID for tracing
      required:
        - error_code
        - message
  securitySchemes:
    BusinessScopedJWT:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Business-scoped JWT token. Token payload includes `business_id` to
        automatically scope requests. Format: `Bearer <your-jwt-token>`


        **Use this for**: Business-specific operations where the business
        context is embedded in the token.
    PartnerJWT:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Partner-level JWT token (unscoped). Token payload includes `partner_id`.
        Business access is validated via partner ownership. Format: `Bearer
        <your-jwt-token>`


        **Use this for**: Multi-business operations where the business_id is
        specified in the URL and partner has access to multiple businesses.
    BasicAuth:
      type: http
      scheme: basic
      description: >-
        Basic authentication for OAuth2 token endpoint. Use partner_uuid:api_key
        as username:password. Example: Authorization: Basic
        base64(partner_uuid:api_key)
    BearerUnscoped:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Partner (unscoped) JWT Bearer token. Obtain via POST
        /v1/platform/oauth2/token with Basic auth (partner_uuid:api_key). Use
        header: Authorization: Bearer {access_token}
    BearerBusinessScoped:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Business-scoped JWT Bearer token. Obtain via POST
        /v1/platform/{business_id}/oauth2/token/ using a partner Bearer token.
        Only valid for endpoints whose URL contains that business_id.

````