Purchase Order is request of goods or services from vendor. It has details about item, quantity and amount etc.
How to get the list of Purchase Orders
There are two ways to fetch the list of purchase orders 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 purchase order information whenever needed.
You can refer to accounting APIs here: https://developers.getknit.dev/reference/list-purchase-orders#/
Data Model
| Model ID | Event Key | Description |
|---|---|---|
accounting_purchaseOrder_info | info | |
accounting_purchaseOrder_lineItems | lineItems |
Purchase Order Info
Model ID: accounting_purchaseOrder_info
| Field | Type | Description |
|---|---|---|
id | String | |
purchaseOrderNumber | String | |
status | Enum | [DRAFT, SUBMITTED, AUTHORISED, BILLED, DELETED, OPENED, CANCELLED, ON_HOLD, APPROVED, NOT_SPECIFIED] |
createdAt | Date | |
updatedAt | Date | |
issueDate | Date | |
deliveryDate | Date | |
totalAmount | Double | |
totalTax | Double | |
totalDiscount | Double | |
customerContactId | String | |
vendorContactId | String | |
companyId | String | |
linkedCompanyIds | List[String] | List of company Ids associated with object. (Applicable for multi subsidiary apps like Netsuite.) |
description | String | |
currency | String | Currency codes like USD, INR |
exchangeRate | String | |
addresses | List[Address] | Please refer to Address Model |
Purchase Order entries
Model ID: accounting_purchaseOrder_lineItems
| Field | Type | Description |
|---|---|---|
lineItems | list[PurchaseOrderLineItem] |
PurchaseOrderLineItem
| Field | Type | Description |
|---|---|---|
lineItemId | String | |
itemId | String | |
itemCode | String | |
itemName | String | |
description | String | |
taxRateId | String | |
accountId | String | |
taxAmount | Double | |
totalAmount | Double | |
quantity | Double | |
unitRate | Double | |
discountAmount | Double | |
discountPercentage | Double | |
trackingCategories | List[TrackingCategoryInfo] | Please refer to TrackingCategory |
Event Data Example
{
"info": {
"id": "ab148a49-e2da-48c0-a13b-6a1f894c573d",
"purchaseOrderNumber": "PO-0001",
"status": "AUTHORISED",
"createdAt": "2024-05-20T00:00:00Z",
"updatedAt": "2024-05-20T17:18:11Z",
"issueDate": "2024-05-20T00:00:00Z",
"deliveryDate": "2024-05-29T00:00:00Z",
"totalAmount": 1800.0,
"totalTax": 0.0,
"totalDiscount": 200.0,
"customerContactId": "ac19c8f9-ac19c8f9",
"vendorContactId": "ac19c8f9-4db3",
"companyId": "ac19c8f9-a901-4db3-bef1-5aaca2a7c15a",
"description": "Black Tshirt for employees",
"currency": "USD",
"exchangeRate": "1.0",
"addresses": [
{
"addressLine1": "72/1A Church Street",
"addressLine2": "Texas USA",
"city": "Texas",
"state": "Atlanta",
"country": "USA",
"zipCode": "20203939",
"addressType": "BILLING"
}
]
},
"lineItems": [
{
"lineItemId": "68b2f2d1-b52f-40da-aa8b-5392d6ae2fe4",
"itemId": null,
"itemCode": "T02",
"itemName": null,
"description": "Tshirt of medium size and black color from Knit Pvt. Ltd.",
"taxRateId": "NONE",
"accountId": "7050",
"taxAmount": 0.0,
"totalAmount": 1800.0,
"quantity": 20.0,
"unitRate": 100.0,
"discountAmount": null,
"discountPercentage": 10,
"trackingCategories": [
{
"categoryId": "2340d-cdwwr",
"categoryName": "ASIA",
"parentCategoryId": "a12302-2334",
"parentCategoryName": "Region"
}
]
}
]
}