How to get the list of Items
There are two ways to fetch the list of items 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.
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 operations that allow you to retrieve item information whenever needed.
You can refer to accounting APIs here:
https://developers.getknit.dev/reference/get-items
Data Model
| Model ID | Event Key | Description |
|---|---|---|
accounting_items_info | info | |
accounting_item_salesDetails | salesDetails | |
accounting_item_purchaseDetails | purchaseDetails | |
accounting_item_locations | locations |
Items Info
Model ID: accounting_items_info
| Field | Type | Description |
|---|---|---|
id | String | |
name | String | |
code | String | |
itemType | Enum | [INVENTORY, NON_INVENTORY, SERVICE, PURCHASES, SALES] |
status | Enum | [ACTIVE, ARCHIVED, DELETED] |
description | String | |
totalQuantity | Double | |
unitPrice | Double | |
linkedCompanyIds | List[String] | List of company Ids associated with object. |
createdAt | Date | |
updatedAt | Date |
Sales Details
Model ID: accounting_item_salesDetails
| Field | Type | Description |
|---|---|---|
unitPrice | Double | |
accountCode | String | |
accountId | String | |
description | String | |
taxRateId | String | |
taxRate | Double |
Purchase Details
Model ID: accounting_item_purchaseDetails
| Field | Type | Description |
|---|---|---|
unitPrice | Double | |
accountCode | String | |
accountId | String | |
description | String | |
taxRateId | String | |
taxRate | Double |
Locations
Model ID: accounting_item_locations
| Field | Type | Description |
|---|---|---|
locationId | String | |
location | String | |
quantity | Double |
Event Data Example
{
"info": {
"id": "item_001",
"name": "Office Chair",
"code": "CHAIR-001",
"itemType": "INVENTORY",
"status": "ACTIVE",
"description": "Ergonomic office chair",
"totalQuantity": 50,
"unitPrice": 299.99,
"linkedCompanyIds": null,
"createdAt": "2023-05-15T05:49:13Z",
"updatedAt": "2023-05-15T05:49:14Z"
},
"salesDetails": {
"unitPrice": 299.99,
"accountCode": "400",
"accountId": "acc_sales_001",
"description": "Sales of office chair",
"taxRateId": "tax_001",
"taxRate": 18.0
},
"purchaseDetails": {
"unitPrice": 199.99,
"accountCode": "300",
"accountId": "acc_purchase_001",
"description": "Purchase of office chair",
"taxRateId": "tax_002",
"taxRate": 12.0
},
"locations": [
{
"locationId": "loc_001",
"location": "Warehouse A",
"quantity": 30
},
{
"locationId": "loc_002",
"location": "Warehouse B",
"quantity": 20
}
]
}
