Skip to main content
GET
/
v1
/
businesses
/
{businessId}
/
ledger
/
balances
Get ledger balances
curl --request GET \
  --url https://sandbox.layerfi.com/v1/businesses/{businessId}/ledger/balances \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "type": "Ledger_Balances",
    "accounts": [
      {
        "id": {
          "type": "AccountId",
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
        },
        "name": "Current Assets",
        "stable_name": {
          "type": "StableName",
          "stable_name": "CURRENT_ASSETS"
        },
        "account_type": {
          "display_name": "Asset"
        },
        "account_subtype": {
          "display_name": "Current Assets"
        },
        "balance": 123,
        "entries": [
          {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "entry_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "account": {
              "type": "Single_Chart_Account",
              "id": {
                "type": "AccountId",
                "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
              },
              "name": "Current Assets",
              "account_number": "4000",
              "stable_name": {
                "type": "StableName",
                "stable_name": "CURRENT_ASSETS"
              },
              "account_type": {
                "display_name": "Asset"
              },
              "account_subtype": {
                "display_name": "Current Assets"
              }
            },
            "amount": 123,
            "entry_at": "2023-11-07T05:31:56Z",
            "createdAt": "2023-11-07T05:31:56Z"
          }
        ],
        "sub_accounts": "<array>"
      }
    ]
  }
}

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.

Query Parameters

start_date
string<date-time>

Start date for balance calculation (inclusive).

end_date
string<date-time>

End date for balance calculation (exclusive).

reporting_basis
enum<string>
default:ACCRUAL

Reporting basis for the balances (ACCRUAL or CASH).

Available options:
ACCRUAL,
CASH
customer_id
string<uuid>

Filter balances by customer UUID.

customer_external_id
string

Filter balances by customer external ID.

vendor_id
string<uuid>

Filter balances by vendor UUID.

vendor_external_id
string

Filter balances by vendor external ID.

include_entries_before_activation
boolean
default:false

Include entries before business activation date.

Response

Ledger balances.

data
object
required