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

# Get sub account

> Get the details for a single sub account by ID



## OpenAPI

````yaml GET /sub-account/{subAccountId}
openapi: 3.1.0
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers: []
security:
  - ApiKeyAuth: []
paths:
  /sub-account/{subAccountId}:
    get:
      description: Get the details for a single sub account by ID
      parameters:
        - name: subAccountId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubAccount'
        '400':
          $ref: '#/components/responses/400'
        '403':
          $ref: '#/components/responses/403'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
components:
  schemas:
    SubAccount:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        balance:
          type: object
          properties:
            amountCents:
              type: number
        spend:
          type: object
          properties:
            amountCents:
              type: number
    ErrorWithNoId:
      required:
        - status
        - code
        - message
      type: object
      properties:
        status:
          type: number
        code:
          type: string
        message:
          type: string
  responses:
    '400':
      description: Invalid Body/Query Parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWithNoId'
    '403':
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWithNoId'
    '429':
      description: Too many requests
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWithNoId'
    '500':
      description: Unidentified Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorWithNoId'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````