The Expense object represents a direct purchase by a business, typically made with a check, credit card, or cash. Each Expense object groups related expenses, with individual expenses recorded in the lines object.
How to get the list of Expenses
There are two ways to fetch the list of expenses from your integrations:
1. Syncs (Webhook-based Bulk Reads)
Syncs provide an automated, push-based approach for bulk data retrieval. Once you set up a sync for an integration, Knit polls the source app for changes and sends updates straight to your webhook. This webhook-based model eliminates the need for you to continuously pull data.
Note: The data models sync does not start automatically. To initiate the synchronization process, you must explicitly call the Sync Start API for the initial sync.
Read more about syncs and webhooks here: https://developers.getknit.dev/docs/register-webhook-url#/
2. Read APIs (On-demand Individual Reads)
Read APIs provide on-demand access to specific data through request-response calls. These are standard GET/List operations that allow you to retrieve expense information whenever needed.
You can refer to accounting APIs here: https://developers.getknit.dev/reference/list-expenses#/
Data Model
| Model ID | Event Data Key | Description |
|---|---|---|
accounting_expenses_info | info | |
accounting_expense_lineItems | lineItems |
Expense Info
Model ID: accounting_expenses_info
| Name | Type | Description |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
One of among Currency Codes (ISO 4217) like- |
|
|
|
|
|
|
|
|
Expense Entries
Model ID: accounting_expense_lineItems
| Name | Type | Description |
|---|---|---|
lineItems | List[ExpsnseLineItem] |
ExpenseLineItem
| Name | Type | Description |
|---|---|---|
id | String | |
amount | String | |
accounId | Double | |
description | String | |
contactId | String | |
taxRateId | String | |
trackingCategories | List[TrackingCategoryInfo] | Please refer to TrackingCategory |
Event Data Example
{
"info": {
"id": "104916",
"transactionDate": "2025-02-18T00:00:00Z",
"employeeId": "9547",
"contactId": "123",
"companyId": "3",
"linkedCompanyIds": [
"123",
"456"
],
"totalAmount": 100,
"description": "Misc Expenses",
"currency": "USD",
"exchangeRate": 1,
"createdAt": "2025-02-19T21:37:00Z",
"updatedAt": "2025-02-19T21:37:00Z"
},
"lineItems": [
{
"id": "912",
"amount": 100,
"accountId": "99",
"description": "Office Furniture Expense",
"contactId": "123",
"taxRateId": "101",
"trackingCategories": [
{
"categoryId": "20",
"categoryName": "Accessories",
"parentCategoryId": "21",
"parentCategoryName": "Inventory"
}
]
}
]
}