PassThrough Requests for getting the Item API related fields

Sample PassThrough requeats for getting the list of possible values of salesDetails.accountId, purchaseDetails.accountId, and assetAccountId fields in create and update Item Apis for QuickBooks.

List Sales Account

Use the Id field, in the response, as the salesDetails.accountId in create and update item apis.

A cURL request could look like this:

curl --location 'https://api.getknit.dev/v1.0/passthrough' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'X-Knit-Integration-Id: <YOUR_INTEGRATION_ID>' \
--data '{
  "method": "GET",
  "path": "query?query=select%20*%20from%20Account%20where%20AccountSubType%20%3D%20%27SalesOfProductIncome%27"
}'

and the response could look like the following:

{
    "success": true,
    "data": {
        "response": {
            "body": "{\"QueryResponse\":{\"Account\":[{\"Name\":\"Sales Account\",\"SubAccount\":false,\"FullyQualifiedName\":\"Sales Account\",\"Active\":true,\"Classification\":\"Revenue\",\"AccountType\":\"Income\",\"AccountSubType\":\"SalesOfProductIncome\",\"CurrentBalance\":0,\"CurrentBalanceWithSubAccounts\":0,\"CurrencyRef\":{\"value\":\"USD\",\"name\":\"United States Dollar\"},\"domain\":\"QBO\",\"sparse\":false,\"Id\":\"1150040004\",\"SyncToken\":\"0\",\"MetaData\":{\"CreateTime\":\"2025-11-26T02:50:16-08:00\",\"LastUpdatedTime\":\"2025-11-26T02:50:16-08:00\"}},{\"Name\":\"Sales of Product Income\",\"SubAccount\":false,\"FullyQualifiedName\":\"Sales of Product Income\",\"Active\":true,\"Classification\":\"Revenue\",\"AccountType\":\"Income\",\"AccountSubType\":\"SalesOfProductIncome\",\"CurrentBalance\":0,\"CurrentBalanceWithSubAccounts\":0,\"CurrencyRef\":{\"value\":\"USD\",\"name\":\"United States Dollar\"},\"domain\":\"QBO\",\"sparse\":false,\"Id\":\"79\",\"SyncToken\":\"0\",\"MetaData\":{\"CreateTime\":\"2025-06-16T10:36:03-07:00\",\"LastUpdatedTime\":\"2025-06-16T10:36:03-07:00\"}},{\"Name\":\"Sales of Product Income\",\"SubAccount\":true,\"ParentRef\":{\"value\":\"82\"},\"FullyQualifiedName\":\"Design income:Sales of Product Income\",\"Active\":true,\"Classification\":\"Revenue\",\"AccountType\":\"Income\",\"AccountSubType\":\"SalesOfProductIncome\",\"CurrentBalance\":0,\"CurrentBalanceWithSubAccounts\":0,\"CurrencyRef\":{\"value\":\"USD\",\"name\":\"United States Dollar\"},\"domain\":\"QBO\",\"sparse\":false,\"Id\":\"92\",\"SyncToken\":\"0\",\"MetaData\":{\"CreateTime\":\"2025-07-21T23:23:56-07:00\",\"LastUpdatedTime\":\"2025-07-21T23:23:56-07:00\"}}],\"startPosition\":1,\"maxResults\":3},\"time\":\"2025-11-28T04:46:48.233-08:00\"}",
            "headers": {
                "Date": "Fri, 28 Nov 2025 12:46:48 GMT",
                "Content-Type": "application/json",
                "Connection": "keep-alive",
                "x-spanid": "c6468400-80b9-1f5b-138f-88b4fcc6b8e6",
                "x-amzn-trace-id": "Root=1-692999b8-688645866b7a571b60351747",
                "X-Content-Type-Options": "nosniff",
                "x-envoy-upstream-service-time": "295",
                "Server": "istio-envoy",
                "x-envoy-decorator-operation": "v3-facade-service-desired-service.dev-devx-v3facadeservice-usw2-stg-ids.svc.cluster.local:8090/*",
                "Strict-Transport-Security": "max-age=31536000",
                "intuit_tid": "1-692999b8-688645866b7a571b60351747",
                "x-request-id": "1-692999b8-688645866b7a571b60351747",
                "content-length": "1553"
            }
        }
    }
}

List Purchase Accounts

Use the Id field, in the response, as the purchaseDetails.accountId in create and update item apis.

A cURL request could look like this:

curl --location 'https://api.getknit.dev/v1.0/passthrough' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'X-Knit-Integration-Id: <YOUR_INTEGRATION_ID>' \
--data '{
  "method": "GET",
  "path": "query?query=select%20*%20from%20Account%20where%20AccountType%20%3D%20%27Cost%20of%20Goods%20Sold%27"
}'

and the response could look like the following:

{
    "success": true,
    "data": {
        "response": {
            "body": "{\"QueryResponse\":{\"Account\":[{\"Name\":\"Cost of Goods Sold\",\"SubAccount\":false,\"FullyQualifiedName\":\"Cost of Goods Sold\",\"Active\":true,\"Classification\":\"Expense\",\"AccountType\":\"Cost of Goods Sold\",\"AccountSubType\":\"SuppliesMaterialsCogs\",\"CurrentBalance\":0,\"CurrentBalanceWithSubAccounts\":0,\"CurrencyRef\":{\"value\":\"USD\",\"name\":\"United States Dollar\"},\"domain\":\"QBO\",\"sparse\":false,\"Id\":\"80\",\"SyncToken\":\"0\",\"MetaData\":{\"CreateTime\":\"2025-06-16T10:36:04-07:00\",\"LastUpdatedTime\":\"2025-06-16T10:36:04-07:00\"}},{\"Name\":\"Inventory Shrinkage\",\"SubAccount\":false,\"FullyQualifiedName\":\"Inventory Shrinkage\",\"Active\":true,\"Classification\":\"Expense\",\"AccountType\":\"Cost of Goods Sold\",\"AccountSubType\":\"SuppliesMaterialsCogs\",\"CurrentBalance\":0,\"CurrentBalanceWithSubAccounts\":0,\"CurrencyRef\":{\"value\":\"USD\",\"name\":\"United States Dollar\"},\"domain\":\"QBO\",\"sparse\":false,\"Id\":\"98\",\"SyncToken\":\"0\",\"MetaData\":{\"CreateTime\":\"2025-11-27T03:31:05-08:00\",\"LastUpdatedTime\":\"2025-11-27T03:31:05-08:00\"}}],\"startPosition\":1,\"maxResults\":2},\"time\":\"2025-11-28T05:00:18.968-08:00\"}",
            "headers": {
                "Date": "Fri, 28 Nov 2025 13:00:19 GMT",
                "Content-Type": "application/json",
                "Connection": "keep-alive",
                "x-spanid": "08880b31-7ec6-15a6-6bf5-bb0a0a88ab3d",
                "x-amzn-trace-id": "Root=1-69299ce2-7d1a37ec555ca43826d31c90",
                "X-Content-Type-Options": "nosniff",
                "x-envoy-upstream-service-time": "292",
                "Server": "istio-envoy",
                "x-envoy-decorator-operation": "v3-facade-service-desired-service.dev-devx-v3facadeservice-usw2-stg-ids.svc.cluster.local:8090/*",
                "Strict-Transport-Security": "max-age=31536000",
                "intuit_tid": "1-69299ce2-7d1a37ec555ca43826d31c90",
                "x-request-id": "1-69299ce2-7d1a37ec555ca43826d31c90",
                "content-length": "1059"
            }
        }
    }
}

List Other Current Asset Accounts

Use the Id field, in the response, as the assetAccountId in create and update item apis.

A cURL request could look like this:

curl --location 'https://api.getknit.dev/v1.0/passthrough' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'X-Knit-Integration-Id: <YOUR_INTEGRATION_ID>' \
--data '{
  "method": "GET",
  "path": "query?query=select%20*%20from%20Account%20where%20AccountType%20%3D%20%27Other%20Current%20Asset%27"
}'

and the response could look like the following:

{
    "success": true,
    "data": {
        "response": {
            "body": "{\"QueryResponse\":{\"Account\":[{\"Name\":\"Inventory Asset\",\"SubAccount\":false,\"FullyQualifiedName\":\"Inventory Asset\",\"Active\":true,\"Classification\":\"Asset\",\"AccountType\":\"Other Current Asset\",\"AccountSubType\":\"Inventory\",\"CurrentBalance\":1046.25,\"CurrentBalanceWithSubAccounts\":1046.25,\"CurrencyRef\":{\"value\":\"USD\",\"name\":\"United States Dollar\"},\"domain\":\"QBO\",\"sparse\":false,\"Id\":\"81\",\"SyncToken\":\"0\",\"MetaData\":{\"CreateTime\":\"2025-06-16T10:36:05-07:00\",\"LastUpdatedTime\":\"2025-11-28T03:24:14-08:00\"}},{\"Name\":\"Prepaid Expenses\",\"SubAccount\":false,\"FullyQualifiedName\":\"Prepaid Expenses\",\"Active\":true,\"Classification\":\"Asset\",\"AccountType\":\"Other Current Asset\",\"AccountSubType\":\"PrepaidExpenses\",\"CurrentBalance\":0,\"CurrentBalanceWithSubAccounts\":0,\"CurrencyRef\":{\"value\":\"USD\",\"name\":\"United States Dollar\"},\"domain\":\"QBO\",\"sparse\":false,\"Id\":\"3\",\"SyncToken\":\"0\",\"MetaData\":{\"CreateTime\":\"2025-06-11T14:42:07-07:00\",\"LastUpdatedTime\":\"2025-07-24T03:56:09-07:00\"}},{\"Name\":\"Uncategorized Asset\",\"SubAccount\":false,\"FullyQualifiedName\":\"Uncategorized Asset\",\"Active\":true,\"Classification\":\"Asset\",\"AccountType\":\"Other Current Asset\",\"AccountSubType\":\"OtherCurrentAssets\",\"CurrentBalance\":0,\"CurrentBalanceWithSubAccounts\":0,\"CurrencyRef\":{\"value\":\"USD\",\"name\":\"United States Dollar\"},\"domain\":\"QBO\",\"sparse\":false,\"Id\":\"32\",\"SyncToken\":\"0\",\"MetaData\":{\"CreateTime\":\"2025-06-11T14:46:30-07:00\",\"LastUpdatedTime\":\"2025-06-11T14:46:30-07:00\"}},{\"Name\":\"Undeposited Funds\",\"SubAccount\":false,\"FullyQualifiedName\":\"Undeposited Funds\",\"Active\":true,\"Classification\":\"Asset\",\"AccountType\":\"Other Current Asset\",\"AccountSubType\":\"UndepositedFunds\",\"CurrentBalance\":2062.52,\"CurrentBalanceWithSubAccounts\":2062.52,\"CurrencyRef\":{\"value\":\"USD\",\"name\":\"United States Dollar\"},\"domain\":\"QBO\",\"sparse\":false,\"Id\":\"4\",\"SyncToken\":\"0\",\"MetaData\":{\"CreateTime\":\"2025-06-11T14:42:07-07:00\",\"LastUpdatedTime\":\"2025-07-18T03:38:42-07:00\"}}],\"startPosition\":1,\"maxResults\":4},\"time\":\"2025-11-28T05:04:28.380-08:00\"}",
            "headers": {
                "Date": "Fri, 28 Nov 2025 13:04:28 GMT",
                "Content-Type": "application/json",
                "Connection": "keep-alive",
                "x-spanid": "50b7e55a-eedf-b280-034b-9dc9f97f643e",
                "x-amzn-trace-id": "Root=1-69299ddc-6d4aa39a6dce86933ef95851",
                "X-Content-Type-Options": "nosniff",
                "x-envoy-upstream-service-time": "447",
                "Server": "istio-envoy",
                "x-envoy-decorator-operation": "v3-facade-service-desired-service.dev-devx-v3facadeservice-usw2-stg-ids.svc.cluster.local:8090/*",
                "Strict-Transport-Security": "max-age=31536000",
                "intuit_tid": "1-69299ddc-6d4aa39a6dce86933ef95851",
                "x-request-id": "1-69299ddc-6d4aa39a6dce86933ef95851",
                "content-length": "1993"
            }
        }
    }
}