Skip to main content
POST
/
v1
/
businesses
/
{businessId}
/
ledger
/
accounts
Create ledger account
curl --request POST \
  --url https://sandbox.layerfi.com/v1/businesses/{businessId}/ledger/accounts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Consulting Revenue",
  "account_number": "4000",
  "normality": "CREDIT",
  "parent_id": {
    "type": "AccountId",
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "stable_name": {
    "type": "StableName",
    "stable_name": "CURRENT_ASSETS"
  },
  "account_type": "ASSET",
  "account_subtype": "BANK_ACCOUNTS"
}'
{
  "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

Body

application/json

Parameters for creating a new ledger account. The stable_name field is used for idempotency.

name
string
required

Display name of the ledger account

Example:

"Consulting Revenue"

normality
enum<string>
required
Available options:
CREDIT,
DEBIT
parent_id
object
required

ID of the account

  • Account ID
  • Account Stable Name
account_type
enum<string>
required
Available options:
ASSET,
LIABILITY,
EQUITY,
REVENUE,
COGS,
EXPENSE
account_subtype
enum<string>
required
Available options:
BANK_ACCOUNTS,
ACCOUNTS_RECEIVABLE,
INVENTORY,
PAYMENT_PROCESSOR_CLEARING_ACCOUNT,
FIXED_ASSET,
ACCUMULATED_DEPRECIATION,
CASH,
UNDEPOSITED_FUNDS,
CURRENT_ASSET,
NON_CURRENT_ASSET,
PREPAID_EXPENSES,
DEVELOPMENT_COSTS,
LOANS_RECEIVABLE,
INTANGIBLE_ASSET,
ACCOUNTS_PAYABLE,
CREDIT_CARD,
TAXES_PAYABLE,
INCOME_TAXES_PAYABLE,
SALES_TAXES_PAYABLE,
OTHER_TAXES_PAYABLE,
PAYROLL_TAXES_PAYABLE,
UNEARNED_REVENUE,
PAYROLL_LIABILITY,
PAYROLL_CLEARING,
LINE_OF_CREDIT,
TIPS,
REFUND_LIABILITIES,
UNDEPOSITED_OUTFLOWS,
OUTGOING_PAYMENT_CLEARING_ACCOUNT,
OTHER_CURRENT_LIABILITY,
LOANS_PAYABLE,
NOTES_PAYABLE,
SHAREHOLDER_LOAN,
NON_CURRENT_LIABILITY,
CONTRIBUTIONS,
DISTRIBUTIONS,
COMMON_STOCK,
PREFERRED_STOCK,
ADDITIONAL_PAID_IN_CAPITAL,
RETAINED_EARNINGS,
ACCUMULATED_ADJUSTMENTS,
OPENING_BALANCE_EQUITY,
OTHER_EQUITY,
SALES,
UNCATEGORIZED_REVENUE,
RETURNS_ALLOWANCES,
DIVIDEND_INCOME,
INTEREST_INCOME,
OTHER_INCOME,
COGS,
OPERATING_EXPENSES,
PAYROLL,
TAXES_LICENSES,
UNCATEGORIZED_EXPENSE,
CHARITABLE_CONTRIBUTIONS,
LOAN_EXPENSES,
FINANCE_COSTS,
INTEREST_EXPENSES,
DEPRECIATION,
AMORTIZATION,
BAD_DEBT,
OTHER_EXPENSES
account_number
string | null

Optional account number for the ledger account

Example:

"4000"

stable_name
object

Response

The created 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