Overview
An expense category is the label an expense is filed under, such as Hotel, Mileage or Domestic per diem. Each category also carries the rules that apply to expenses in it: default tax percent, the accounting and salary accounts used on export, and the kind of expense it creates. The category lifecycle is:- Read the categories an organization already has — list them, or fetch one by its
id. - Create categories your customer needs on top of the ones the organization started with.
- Keep them in sync — update names, tax settings and account mappings, and delete categories that are no longer used.
Prerequisites
- Complete Authentication and obtain an admin-scoped access token.
Key concepts
API endpoints
All endpoints use the Admin API base URL. Examples in this guide use the stage host — switch to the production host (api.findity.com) only when you’re ready to go live.
Required headers
Step 1 — List expense categories
Retrieve the categories of an organization. The response is wrapped in a{meta, data} envelope.
GET /organizations/{organizationId}/expenseservice/categories
Query parameters
cURL
200 OK)
JSON
meta.total is the total number of categories in the organization; meta.count is the number of items returned in this response.
An organization gets its categories from the template it was created from. An organization created from a template that has no categories returns
{ "meta": { "total": 0, "count": 0 }, "data": [] }.Response fields
Every endpoint that returns a category uses the same fields. Fields that have no value are left out of the response, so a per diem category such as Domestic has nodefaultTaxPercent and no accountingNumberId.
Step 2 — Get a single category
Retrieve one category by itsid. The response is the category itself, without the {meta, data} envelope.
GET /organizations/{organizationId}/expenseservice/categories/{categoryId}
cURL
200 OK)
JSON
categoryId returns 404 CATEGORY_NOT_FOUND.
Step 3 — Create a category
Add a category to the organization. Returns201 Created with the new category, including its id.
POST /organizations/{organizationId}/expenseservice/categories
Request body fields
cURL
201 Created)
JSON
name, classType or categoryTemplateId, or that has an unsupported classType, returns 400 without a code.
Step 4 — Update a category
Change a category. Only the fields you send are changed. The request body must include the category’sid, and it must match the categoryId in the URL — otherwise the call returns 400 INVALID_ID. The category’s type can’t be changed: a classType in an update is ignored.
PUT /organizations/{organizationId}/expenseservice/categories/{categoryId}
The body takes the same optional fields as in Step 3.
cURL
200 OK)
JSON
id of the account as accountingNumberId. The response then carries the account in accountingNumber, and accountingNumbers lists it.
Step 5 — Delete a category
Remove a category from the organization. Returns204 No Content with an empty response body on success.
DELETE /organizations/{organizationId}/expenseservice/categories/{categoryId}
A category that expenses already use can’t be deleted. The call returns
400 CATEGORY_IN_USE.cURL
204 No Content)
The response body is empty. After the deletion the category no longer appears in the list, and GET on it returns 404 CATEGORY_NOT_FOUND.
Common integration patterns
Find the categories of one type. The list has no filter. Read the full list and keep the items whosecategoryType (or verificationClassType) matches, for example every SubsistenceAllowanceCategory to find the per diem categories.
Map categories to accounts. Keep the chart of accounts and the categories in line after an accounting change:
GET /organizations/{organizationId}/accountsto read the account ids.GET /organizations/{organizationId}/expenseservice/categories?max=1000and check each category’saccountingNumberId. Per diem and mileage categories have none.PUTthe categories whose mapping must change, with the newaccountingNumberId.
OtherExpenseCategory), and use its categoryTemplateId in POST with the matching classType.
Error handling
Errors return a JSON envelope:JSON
requestId value is useful to include when reporting a problem to Findity support. Some 400 errors have no code.

