Purchase Order Data Models

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


Purchase Order Info

Model ID: accounting_purchaseOrder_info

FieldTypeDescription
idString
purchaseOrderNumberString
statusEnum[DRAFT, SUBMITTED, AUTHORISED, BILLED, DELETED, OPENED, CANCELLED, ON_HOLD, APPROVED, NOT_SPECIFIED]
createdAtDate
updatedAtDate
issueDateDate
deliveryDateDate
totalAmountDouble
totalTaxDouble
totalDiscountDouble
customerContactIdString
vendorContactIdString
companyIdString
linkedCompanyIdsList[String]List of company Ids associated with object. (Applicable for multi subsidiary apps like Netsuite.)
descriptionString
currencyStringCurrency codes like USD, INR
exchangeRateString
addressesList[Address]Please refer to Address Model

Purchase Order entries

Model ID: accounting_purchaseOrder_lineItems

FieldTypeDescription
lineItemslist[PurchaseOrderLineItem]

PurchaseOrderLineItem

FieldTypeDescription
lineItemIdString
itemIdString
itemCodeString
itemNameString
descriptionString
taxRateIdString
accountIdString
taxAmountDouble
totalAmountDouble
quantityDouble
unitRateDouble
discountAmountDouble
discountPercentageDouble
trackingCategoriesList[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"
        }
      ]
    }
  ]
}