---
updatedAt: 2025-11-05T15:04:31.000Z
agentTools:
  projectIndex: https://cake-capital.readme.io/llms.txt
---

# Fetch Sub-Account by id

This API fetches the details of a sub-account by its unique identifier.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "authenticated-apis",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://sandbox.cakecapital.com/api/v1"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/enterprise/sub-accounts/{sub_account_id}/": {
      "get": {
        "summary": "Fetch Sub-Account by id",
        "description": "This API fetches the details of a sub-account by its unique identifier.",
        "operationId": "enterprise-fetch-sub-account-by-id",
        "parameters": [
          {
            "name": "sub_account_id",
            "in": "path",
            "description": "The unique identifier of the sub-account (e.g., aa05905b-3d5b-4cdd-8811-215ea43d47bc)",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "For status PENDING or PROCESSING": {
                    "value": {
                      "id": "aa05905b-3d5b-4cdd-8811-215ea43d47bc",
                      "subaccount_id": "cc_c7f1d2153caad64c72eaba90d6c7b6ab",
                      "name": "Central Perk",
                      "dba_name": "Central Perk Coffee Co.",
                      "financial_accounts": [
                        {
                          "id": "d8423c3a-d464-402c-aaa7-d332621804b9",
                          "name": "USD Account",
                          "status": "ACTIVE",
                          "currency": "USD",
                          "account_number": "336501282766",
                          "routing_number": "999999999",
                          "bic": "NBCNUS62",
                          "available_balance": 295721,
                          "total_balance": 50545721,
                          "institution": {
                            "name": "SANDBOX BANK",
                            "address": "12 Charming street, Santa Rosa, California, USA - 95403",
                            "country_code": "United States"
                          },
                          "created_at": 1740999229097
                        }
                      ],
                      "created_at": 1720529553097,
                      "status": "PENDING"
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "aa05905b-3d5b-4cdd-8811-215ea43d47bc"
                    },
                    "subaccount_id": {
                      "type": "string",
                      "example": "cc_c681110f8f4526b64c5fc76cbc5dfd3c"
                    },
                    "name": {
                      "type": "string",
                      "example": "Central Perk"
                    },
                    "dba_name": {
                      "type": "string",
                      "example": "Central Perk Coffee Co."
                    },
                    "financial_accounts": {
                      "type": "array"
                    },
                    "created_at": {
                      "type": "integer",
                      "example": 1720529553097,
                      "default": 0
                    },
                    "status": {
                      "type": "string",
                      "example": "PENDING"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"error\": true,\n    \"message\": \"Invalid UUID\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Invalid UUID"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"error\": true,\n    \"message\": \"No details found for this sub-account\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "message": {
                      "type": "string",
                      "example": "No details found for this sub-account"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl --location 'https://sandbox.cakecapital.com/api/v1/enterprise/sub-accounts/{sub_account_id}/' \\\n--header 'Authorization: Bearer <AUTH_TOKEN>'"
            },
            {
              "language": "javascript",
              "code": "import axios from 'axios';\n\naxios.request({\n  url: 'https://sandbox.cakecapital.com/api/v1/enterprise/sub-accounts/{sub_account_id}/',\n  method: 'get',\n  headers: {\n    'Content-Type': 'application/json',\n    'Authorization': 'Bearer <AUTH_TOKEN>',\n  },\n})\n.then(({ data }) => { ... })\n.catch(error => { ... });"
            },
            {
              "language": "python",
              "code": "import requests\n\nurl = \"https://sandbox.cakecapital.com/api/v1/enterprise/sub-accounts/{sub_account_id}/\"\n\nrequest_headers = {\n    \"Content-Type\": \"application/json\",\n    \"Authorization\": \"Bearer <AUTH_TOKEN>\"\n}\n\nresp = requests.get(url, headers = request_headers)\n\nprint(resp.text)"
            }
          ],
          "samples-languages": [
            "curl",
            "javascript",
            "python"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```