Fetch transaction categories
Bank Transactions
Fetch transaction categories
Retrieves the list of usable transaction categories based on the business’ chart of accounts. This endpoint is used by Layer’s <BankTransactions> embedded component, and can be used to build your own transaction categorization user interface.
GET
Fetch transaction categories
Retrieves the list of usable transaction categories based on the business’ chart of accounts.
This endpoint returns a list of transaction categories that should be used when building your own user interface to display options in a transaction categorization user interface.
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, usedisplay_name to present the category to the user. Use the columns below to choose a stable identifier.
| Category type | AccountId | StableName | Identify with | Notes |
|---|---|---|---|---|
| Optional template account | After instantiation | Yes | StableName (always); AccountId once instantiated | Optional accounts only have an AccountId after first use. Use StableName to reference them before instantiation. |
| User-defined custom account | Yes | No | AccountId only | A new AccountId is created when the account is added; no stable name is assigned. |
| Required template account | Yes | Yes | AccountId or StableName | The stable name is the same as the account name. |
| Exclusion | No | Yes | StableName | The exclusion type acts as the stable name; exclusions have no AccountId. |
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Content-Type must be set to application/json.
Path Parameters
The UUID of the business to fetch the tree of available categories for.
Response
200 - application/json
List of the categories available for a business.