POST
/
v1
/
businesses
/
{business_id}
/
ledger
/
accounts
curl -X POST https://sandbox.layerfi.com/v1/businesses/863ed926-e30d-40f4-8e7e-b0d5387ce4fb/ledger/accounts \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Test Expense Account",
    "normality": "DEBIT",
    "description": "Test account description",
    "account_type": "EXPENSE",
    "account_subtype": "COGS",
    "parent_id": {
      "type": "StableName",
      "stable_name": "COST_OF_GOODS_SOLD"
    }
  }'

{
    "data": {
        "type": "Single_Chart_Account",
        "id": "dc8e8032-494a-441d-a566-613baedc7f00",
        "name": "Test Expense Account",
        "stable_name": null,
        "normality": "DEBIT",
        "account_type": {
            "value": "EXPENSE",
            "display_name": "Expenses"
        },
        "account_subtype": {
            "value": "COGS",
            "display_name": "COGS"
        }
    }
}

Path Parameters

business_id
string
required

ID of the Business the Ledger Account is associated with.

Body

name
string
required

Account name

normality
enum
required

Account balance normality. Values can be: DEBIT, CREDIT

parent_id
string
required

The Account Identifier of the parent account under which this ledger account is categorized.

stable_name
string

The Stable Name for the new account

account_type
enum
required

Type of the ledger account. Values can be: ASSET, LIABILITY, EQUITY, REVENUE, or EXPENSE

account_subtype
enum

Subtype of the ledger account. Values can be: BANK_ACCOUNTS, ACCOUNTS_RECEIVABLE, INVENTORY, PAYMENT_PROCESSOR_CLEARING_ACCOUNT, FIXED_ASSET, CASH, UNDEPOSITED_FUNDS, LIABILITY, ACCOUNTS_PAYABLE, CREDIT_CARD, SHAREHOLDER_LOAN, PAYROLL_LIABILITY, SALES_TAXES_PAYABLE, LINE_OF_CREDIT, NOTES_PAYABLE, TIPS, UNEARNED_REVENUE, UNDEPOSITED_OUTFLOWS, CONTRIBUTIONS, DISTRIBUTIONS, COMMON_STOCK, ADDITIONAL_PAID_IN_CAPITAL, RETAINED_EARNINGS, ACCUMULATED_ADJUSTMENTS, OPENING_BALANCE_EQUITY, REVENUE, SALES, UNCATEGORIZED_REVENUE, RETURNS_ALLOWANCES, EXPENSE, COGS, OPERATING_EXPENSES, PAYROLL, TAXES_LICENSES, BAD_DEBT, or CHARITABLE_CONTRIBUTIONS

Response

Returns the Ledger Account

curl -X POST https://sandbox.layerfi.com/v1/businesses/863ed926-e30d-40f4-8e7e-b0d5387ce4fb/ledger/accounts \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Test Expense Account",
    "normality": "DEBIT",
    "description": "Test account description",
    "account_type": "EXPENSE",
    "account_subtype": "COGS",
    "parent_id": {
      "type": "StableName",
      "stable_name": "COST_OF_GOODS_SOLD"
    }
  }'

{
    "data": {
        "type": "Single_Chart_Account",
        "id": "dc8e8032-494a-441d-a566-613baedc7f00",
        "name": "Test Expense Account",
        "stable_name": null,
        "normality": "DEBIT",
        "account_type": {
            "value": "EXPENSE",
            "display_name": "Expenses"
        },
        "account_subtype": {
            "value": "COGS",
            "display_name": "COGS"
        }
    }
}