Skip to main content
POST
/
v1
/
businesses
/
{businessId}
/
ledger
/
accounts
/
{accountId}
/
create-child-account
Create child ledger account
curl --request POST \
  --url https://sandbox.layerfi.com/v1/businesses/{businessId}/ledger/accounts/{accountId}/create-child-account \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Software Consulting",
  "stable_name": {
    "type": "StableName",
    "stable_name": "CURRENT_ASSETS"
  },
  "account_number": "4010"
}'
{
  "id": {
    "type": "AccountId",
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "name": "Current Assets",
  "account_number": "4000",
  "stable_name": {
    "type": "StableName",
    "stable_name": "CURRENT_ASSETS"
  },
  "normality": "CREDIT",
  "account_type": {
    "value": "ASSET",
    "display_name": "Asset"
  },
  "account_subtype": {
    "value": "BANK_ACCOUNTS",
    "display_name": "Current Assets"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Content-Type
string

Content-Type must be set to application/json

Path Parameters

businessId
string
required

The UUID of the business

accountId
string
required

The ID or stable_name of the parent ledger account

Body

application/json

Parameters for creating a child ledger account. The child inherits account_type, account_subtype, and normality from its parent.

name
string
required

Display name of the child ledger account

Example:

"Software Consulting"

stable_name
object
account_number
string | null

Optional account number for the ledger account

Example:

"4010"

Response

The created child ledger account

A single ledger account without nested children

id
object

ID of the account

  • Account ID
  • Account Stable Name
name
string

Name of the account

Example:

"Current Assets"

account_number
string | null

Account number if configured

Example:

"4000"

stable_name
object
normality
enum<string>
Available options:
CREDIT,
DEBIT
account_type
object
account_subtype
object
I