Skip to main content
GET
Fetch transaction categories
If you are primarily using Layer’s embedded components, you likely won’t need to use this API endpoint directly.

Filtering by mode

Use the mode query parameter to control which subset of categories is returned:

Types

There are three types of categories you’ll find in the category list: AccountNested, OptionalAccountNested, and ExclusionNested.

AccountNested

AccountNested represents a required template account in the business’s chart of accounts.

OptionalAccountNested

OptionalAccountNested represents an optional template account in the business’s chart of accounts.

ExclusionNested

ExclusionNested represents an exclusion type that can be used to exclude a transaction from the business’s accounting.

Interpreting the category list

In all cases, use display_name to present the category to the user. Use the columns below to choose a stable identifier.

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 to fetch the tree of available categories for.

Query Parameters

mode
enum<string>
default:DEFAULT

Controls which subset of categories is returned. DEFAULT uses the business's configured category list (see category_list_type on the accounting configuration). ALL returns all accounts and optional categories. EXPENSES returns expense categories only. REVENUE returns revenue categories only.

Available options:
DEFAULT,
ALL,
EXPENSES,
REVENUE

Response

200 - application/json
data
object
required

List of the categories available for a business.