Items Data Models

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

Items Info

Model ID: accounting_items_info

FieldTypeDescription
idString
nameString
codeString
itemTypeEnum[INVENTORY, NON_INVENTORY, SERVICE, PURCHASES, SALES]
statusEnum[ACTIVE, ARCHIVED, DELETED]
descriptionString
totalQuantityDouble
unitPriceDouble
linkedCompanyIdsList[String]List of company Ids associated with object.
createdAtDate
updatedAtDate

Sales Details

Model ID: accounting_item_salesDetails

FieldTypeDescription
unitPriceDouble
accountCodeString
accountIdString
descriptionString
taxRateIdString
taxRateDouble

Purchase Details

Model ID: accounting_item_purchaseDetails

FieldTypeDescription
unitPriceDouble
accountCodeString
accountIdString
descriptionString
taxRateIdString
taxRateDouble

Locations

Model ID: accounting_item_locations

FieldTypeDescription
locationIdString
locationString
quantityDouble

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
    }
  ]
}