How to get the list of Companies
There are two ways to fetch the list of Companies 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 company information whenever needed.
You can refer to accounting APIs here:
https://developers.getknit.dev/reference/get-company-info
Data Model
| Model ID | Event Key | Description |
|---|---|---|
accounting_companies_info | info |
Companies Info
Model ID: accounting_companies_info
| Field | Type | Description |
|---|---|---|
id | String | |
name | String | |
legalName | String | |
taxNumber | String | |
fiscalYearStartMonth | Integer | |
fiscalYearStartDay | Integer | |
createdAt | Date | |
isActive | Boolean | |
currency | String | |
urls | List[String] | |
addresses | List[Address] | |
phones | List[Phone] | |
contact | Contact |
Address
| Field | Type | Description |
|---|---|---|
addressLine1 | String | |
addressLine2 | String | |
city | String | |
state | String | |
country | String | |
zipCode | String | |
addressType | Enum | [SHIPPING, BILLING] |
Phone
| Field | Type | Description |
|---|---|---|
type | Enum | [WORK, MOBILE, HOME] |
phoneNumber | String |
Contact
| Field | Type | Description |
|---|---|---|
id | String | |
email | String |
Event Data Example
{
"info": {
"id": "60021447640",
"name": "Knit Test",
"legalName": "Knit",
"taxNumber": "AHIPU2128J",
"fiscalYearStartMonth": 3,
"fiscalYearStartDay": 5,
"createdAt": "2023-05-15T00:00:00Z",
"isActive": true,
"currency": "INR",
"urls": [
"[email protected]"
],
"addresses": [
{
"addressLine1": "street1",
"addressLine2": "street2",
"city": "Delhi",
"state": "Delhi",
"country": "India",
"zipCode": "110025",
"addressType": "SHIPPING"
}
],
"phones": [
{
"type": "WORK",
"phoneNumber": "89191828229"
}
],
"contact": {
"id": null,
"email": "[email protected]"
}
}
}
