@tenkeybridge/mcp 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -9,19 +9,25 @@ import { mkdirSync, readFileSync, writeFileSync } from "fs";
9
9
  import { homedir } from "os";
10
10
  import { dirname, join } from "path";
11
11
  var PORTAL_URL = "https://api.tenkeybridge.com/portal";
12
- function defaultTokenFile(realmId) {
13
- return join(homedir(), ".tenkeybridge", `mcp-tokens-${realmId}.json`);
12
+ function defaultTokenFile(companyId) {
13
+ return join(homedir(), ".tenkeybridge", `mcp-tokens-${companyId}.json`);
14
14
  }
15
15
  function loadConfig(env) {
16
- const realmId = env.TKB_REALM_ID;
17
- if (!realmId) {
16
+ const fromNew = env.TKB_COMPANY_ID;
17
+ const fromOld = env.TKB_REALM_ID;
18
+ if (fromNew && fromOld && fromNew !== fromOld) {
19
+ throw new Error("TKB_COMPANY_ID and TKB_REALM_ID (deprecated) disagree \u2014 set TKB_COMPANY_ID only.");
20
+ }
21
+ const companyId = fromNew || fromOld;
22
+ if (!companyId) {
18
23
  throw new Error(
19
- `TKB_REALM_ID is required \u2014 the realm id of the connected company file (shown in the portal: ${PORTAL_URL}).`
24
+ `TKB_COMPANY_ID is required \u2014 the Company ID of the connected QuickBooks company file (shown in the portal: ${PORTAL_URL}).`
20
25
  );
21
26
  }
27
+ const deprecations = !fromNew && fromOld ? ["TKB_REALM_ID is deprecated; set TKB_COMPANY_ID instead."] : [];
22
28
  const baseUrl = env.TKB_BASE_URL;
23
29
  if (env.TKB_ACCESS_TOKEN) {
24
- return { realmId, ...baseUrl ? { baseUrl } : {}, auth: { accessToken: env.TKB_ACCESS_TOKEN } };
30
+ return { companyId, deprecations, ...baseUrl ? { baseUrl } : {}, auth: { accessToken: env.TKB_ACCESS_TOKEN } };
25
31
  }
26
32
  const clientId = env.TKB_CLIENT_ID;
27
33
  const clientSecret = env.TKB_CLIENT_SECRET;
@@ -33,13 +39,14 @@ function loadConfig(env) {
33
39
  !refreshToken && "TKB_REFRESH_TOKEN"
34
40
  ].filter(Boolean).join(", ");
35
41
  throw new Error(
36
- `Missing ${missing}. Set either TKB_ACCESS_TOKEN, or all of TKB_CLIENT_ID + TKB_CLIENT_SECRET + TKB_REFRESH_TOKEN (create an OAuth client in the portal: ${PORTAL_URL}).`
42
+ `Missing ${missing}. Set either TKB_ACCESS_TOKEN, or all of TKB_CLIENT_ID + TKB_CLIENT_SECRET + TKB_REFRESH_TOKEN (create an OAuth app in the portal: ${PORTAL_URL}).`
37
43
  );
38
44
  }
39
- const tokenFile = env.TKB_TOKEN_FILE ?? defaultTokenFile(realmId);
45
+ const tokenFile = env.TKB_TOKEN_FILE ?? defaultTokenFile(companyId);
40
46
  const stored = readStoredRefreshToken(tokenFile);
41
47
  return {
42
- realmId,
48
+ companyId,
49
+ deprecations,
43
50
  ...baseUrl ? { baseUrl } : {},
44
51
  tokenFile,
45
52
  auth: { clientId, clientSecret, refreshToken: stored ?? refreshToken }
@@ -169,14 +176,14 @@ var CATALOG = {
169
176
  "group": "gaps",
170
177
  "read": "none",
171
178
  "write": "none",
172
- "headline": "QuickBooks Desktop's qbXML API has no attachments interface \u2014 the word 'Attachment' does not occur anywhere in the qbxmlops130 message set.",
179
+ "headline": "Unsupported on QuickBooks Desktop, with no opt-in and no workaround inside TenkeyBridge. qbXML has no attachments interface (the word 'Attachment' does not occur anywhere in the qbxmlops130 message set), and TenkeyBridge does not store files itself.",
173
180
  "fields": [],
174
181
  "unsupported": [
175
182
  {
176
183
  "case": "read",
177
184
  "error": "UNSUPPORTED_BY_DESKTOP",
178
185
  "note": "Re-audited 2026-07-29: zero occurrences of any attachment message (no AttachmentAdd/Query/Ref of any kind) across the full qbxmlops130 schema. Desktop's Attached Documents feature is UI-only; files attached in Desktop cannot be listed or fetched through TenkeyBridge.",
179
- "workaround": "Store documents in your own system keyed by the TenkeyBridge entity Id \u2014 that is what QBD integrations have always had to do."
186
+ "workaround": "Store documents in your own system keyed by the TenkeyBridge entity Id, which is what QuickBooks Desktop integrations have always had to do. Branch on UNSUPPORTED_BY_DESKTOP and skip the Attachable call for Desktop-backed companies."
180
187
  },
181
188
  {
182
189
  "case": "query",
@@ -207,7 +214,7 @@ var CATALOG = {
207
214
  "read": "full",
208
215
  "write": "full",
209
216
  "headline": "Batch envelope \u2014 up to 30 create/update/delete/query operations in one request, executed sequentially with per-item faults.",
210
- "usage": "POST /v3/company/{realmId}/batch",
217
+ "usage": "POST /v3/company/{companyId}/batch",
211
218
  "fields": [
212
219
  {
213
220
  "qbo": "bId",
@@ -227,7 +234,7 @@ var CATALOG = {
227
234
  {
228
235
  "qbo": "Query items",
229
236
  "support": "full",
230
- "note": "Full /query parity: the shared WHERE subset, STARTPOSITION/MAXRESULTS, iterator-backed deep pages."
237
+ "note": "Full /query parity: the same query language (AND-joined WHERE with =, !=, <, >, <=, >=, IN, LIKE; ORDERBY; COUNT(*); column lists; STARTPOSITION/MAXRESULTS), iterator-backed deep pages."
231
238
  },
232
239
  {
233
240
  "qbo": "per-item faults",
@@ -254,7 +261,7 @@ var CATALOG = {
254
261
  {
255
262
  "case": "entity CRUD or /query on Batch itself",
256
263
  "error": "UNSUPPORTED_BY_DESKTOP",
257
- "note": "Batch is a platform endpoint, not an entity \u2014 POST /v3/company/{realmId}/batch."
264
+ "note": "Batch is a platform endpoint, not an entity \u2014 POST /v3/company/{companyId}/batch."
258
265
  }
259
266
  ]
260
267
  },
@@ -310,7 +317,7 @@ var CATALOG = {
310
317
  {
311
318
  "qbo": "CustomField",
312
319
  "support": "partial",
313
- "note": "Name/StringValue populated from Desktop custom fields (DataExt); DefinitionId not available from Desktop; read-only for now. Accepted and ignored on write."
320
+ "note": "Desktop custom fields (data extensions, OwnerID 0) on the transaction header. Read: Name/StringValue (Type is always StringType; DefinitionId is not available from Desktop). Write: CustomField[{Name, StringValue}] is written as DataExtMod requests (on Desktop Mod both sets a first value and changes one; DataExtAdd fails once a value exists, and a new transaction inherits its customer's/vendor's value) keyed by the field Name, sent in ONE follow-up message after the record is saved; the field must already be defined in QuickBooks and assigned to Bill records, checked up front (400 CUSTOM_FIELD_UNKNOWN, nothing written). If the record saves but a custom field does not, the answer is 502 CUSTOM_FIELD_WRITE_FAILED naming the record Id and which fields applied or failed (never a silent 200); if everything writes but the read-back fails it is 502 CUSTOM_FIELD_READBACK_FAILED. A DefinitionId without a Name is a 400; only Type StringType is accepted. An update may carry only CustomField (SyncToken still checked). Line-level custom fields are not written. Values are limited to 30 characters and may not be empty or blank (400, nothing written). Verified live on QuickBooks Enterprise 24 (2026-09-30). Desktop never assigns a custom field to Bills (only Customer/Vendor/Employee/Item fields can be defined, and they surface on sales forms and purchase orders), so a Bill CustomField is always a 400 'not assigned to Bill records'."
314
321
  },
315
322
  {
316
323
  "qbo": "CurrencyRef",
@@ -467,12 +474,12 @@ var CATALOG = {
467
474
  "case": "query \u2014 SELECT * cannot enumerate every budget",
468
475
  "error": "UNSUPPORTED_QUERY",
469
476
  "note": "qbXML cannot list budgets: BudgetSummaryReportQueryRq requires a FiscalYear. SELECT * FROM Budget probes a fixed window \u2014 the current calendar year, the one before it, and the one after it \u2014 against both statement types (six report requests in one round-trip) and returns the ones that come back with budgeted amounts. A budget outside that window is invisible to SELECT *. Because the probe is speculative, the query never faults on an individual report's status: a company with no budgets gets an empty list, exactly as QBO answers. GET by id has one report and does surface its status.",
470
- "workaround": "Fetch it by id: GET /v3/company/{realmId}/budget/{fiscalYear}-{BudgetType}, e.g. 2023-ProfitAndLoss, which issues exactly one report request for that year."
477
+ "workaround": "Fetch it by id: GET /v3/company/{companyId}/budget/{fiscalYear}-{BudgetType}, e.g. 2023-ProfitAndLoss, which issues exactly one report request for that year."
471
478
  },
472
479
  {
473
- "case": "query \u2014 WHERE on anything but Id",
480
+ "case": "query \u2014 WHERE on anything but Id, ORDERBY, COUNT(*), column lists",
474
481
  "error": "UNSUPPORTED_QUERY",
475
- "note": "Budget is not a Desktop list, so there is no query filter to compile a WHERE clause into. Only WHERE Id = '{fiscalYear}-{BudgetType}' is accepted; it resolves to the same single report request GET by id uses.",
482
+ "note": "Budget is not a Desktop list, so there is no query filter to compile a WHERE clause into. Only WHERE Id = '{fiscalYear}-{BudgetType}' is accepted; it resolves to the same single report request GET by id uses. ORDERBY, COUNT(*) and column lists are rejected too.",
476
483
  "workaround": "Fetch the window with SELECT * FROM Budget and filter the (at most six) rows client-side."
477
484
  },
478
485
  {
@@ -516,7 +523,7 @@ var CATALOG = {
516
523
  "read": "full",
517
524
  "write": "none",
518
525
  "headline": "Change Data Capture \u2014 one poll returns changed + deleted records across entities.",
519
- "usage": "GET /v3/company/{realmId}/cdc?entities=Invoice,Customer&changedSince=2026-07-01",
526
+ "usage": "GET /v3/company/{companyId}/cdc?entities=Invoice,Customer&changedSince=2026-07-01",
520
527
  "fields": [
521
528
  {
522
529
  "qbo": "entities",
@@ -633,7 +640,7 @@ var CATALOG = {
633
640
  "group": "company",
634
641
  "read": "full",
635
642
  "write": "none",
636
- "headline": "Read-only; Id equals the realm ID, no Desktop write path",
643
+ "headline": "Read-only; Id equals the Company ID, no Desktop write path",
637
644
  "fields": [
638
645
  {
639
646
  "qbo": "CompanyName",
@@ -716,12 +723,51 @@ var CATALOG = {
716
723
  "note": "CompanyInfo is read/query only \u2014 there is exactly one company record, and Desktop has no API to create or modify it."
717
724
  },
718
725
  {
719
- "case": "Any WHERE clause, or STARTPOSITION/MAXRESULTS",
726
+ "case": "Any WHERE clause, ORDERBY, COUNT(*), column list, or STARTPOSITION/MAXRESULTS",
720
727
  "error": "UNSUPPORTED_QUERY",
721
728
  "note": "CompanyQueryRq takes no filters and always returns the single open company record. Use SELECT * FROM CompanyInfo."
722
729
  }
723
730
  ]
724
731
  },
732
+ "CreditCardPayment": {
733
+ "entity": "CreditCardPayment",
734
+ "verdict": "gap",
735
+ "group": "gaps",
736
+ "read": "none",
737
+ "write": "none",
738
+ "headline": "QBO's 'pay down a credit card' transaction has no Desktop record of its own \u2014 Desktop books the same event as a Transfer or a Check against the card account, so there is nothing to project a CreditCardPayment from.",
739
+ "fields": [],
740
+ "unsupported": [
741
+ {
742
+ "case": "read",
743
+ "error": "UNSUPPORTED_BY_DESKTOP",
744
+ "note": "qbXML has no CreditCardPayment message. A card payment made in Desktop is stored as an ordinary Transfer (Transfer Funds) or a Check/Bill Payment whose target is the credit card liability account, and is indistinguishable from any other such transaction on read.",
745
+ "workaround": "Read the same events as Transfer (ToAccountRef = the credit card account) or as a Purchase of type Check. Both are live in TenkeyBridge."
746
+ },
747
+ {
748
+ "case": "query",
749
+ "error": "UNSUPPORTED_BY_DESKTOP",
750
+ "note": "No Desktop CreditCardPayment exists to query; card paydowns appear under Transfer or Purchase.",
751
+ "workaround": "Query Transfer or Purchase and filter client-side by the credit card account."
752
+ },
753
+ {
754
+ "case": "create",
755
+ "error": "UNSUPPORTED_BY_DESKTOP",
756
+ "note": "TenkeyBridge will not guess which Desktop transaction to create in place of a CreditCardPayment.",
757
+ "workaround": "To pay down a card, create a Transfer with FromAccountRef = your bank account and ToAccountRef = the credit card account (or a Purchase/Check whose account line is the credit card account). That is what QuickBooks Desktop records for the same action."
758
+ },
759
+ {
760
+ "case": "update",
761
+ "error": "UNSUPPORTED_BY_DESKTOP",
762
+ "note": "No Desktop CreditCardPayment to update; update the Transfer or Purchase instead."
763
+ },
764
+ {
765
+ "case": "delete",
766
+ "error": "UNSUPPORTED_BY_DESKTOP",
767
+ "note": "No Desktop CreditCardPayment to delete; delete the Purchase instead (Transfer cannot be deleted through qbXML)."
768
+ }
769
+ ]
770
+ },
725
771
  "CreditMemo": {
726
772
  "entity": "CreditMemo",
727
773
  "verdict": "live",
@@ -734,6 +780,17 @@ var CATALOG = {
734
780
  "qbo": "CustomerRef",
735
781
  "support": "full"
736
782
  },
783
+ {
784
+ "qbo": "ClassRef",
785
+ "support": "full",
786
+ "note": "Header-level class (Desktop ClassRef, read and write). Line-level ClassRef is separate."
787
+ },
788
+ {
789
+ "qbo": "DepartmentRef",
790
+ "support": "none",
791
+ "note": "UNMAPPED_FIELD by default. With Departments from classes turned on for the company file, the gateway maps it to the header ClassRef (written to it, read from it); sending a different ClassRef as well is a 400.",
792
+ "error": "UNMAPPED_FIELD"
793
+ },
737
794
  {
738
795
  "qbo": "TxnDate",
739
796
  "support": "full"
@@ -767,6 +824,11 @@ var CATALOG = {
767
824
  "qbo": "PrivateNote",
768
825
  "support": "full"
769
826
  },
827
+ {
828
+ "qbo": "CustomField",
829
+ "support": "partial",
830
+ "note": "Desktop custom fields (data extensions, OwnerID 0) on the transaction header. Read: Name/StringValue (Type is always StringType; DefinitionId is not available from Desktop). Write: CustomField[{Name, StringValue}] is written as DataExtMod requests (on Desktop Mod both sets a first value and changes one; DataExtAdd fails once a value exists, and a new transaction inherits its customer's/vendor's value) keyed by the field Name, sent in ONE follow-up message after the record is saved; the field must already be defined in QuickBooks and assigned to CreditMemo records, checked up front (400 CUSTOM_FIELD_UNKNOWN, nothing written). If the record saves but a custom field does not, the answer is 502 CUSTOM_FIELD_WRITE_FAILED naming the record Id and which fields applied or failed (never a silent 200); if everything writes but the read-back fails it is 502 CUSTOM_FIELD_READBACK_FAILED. A DefinitionId without a Name is a 400; only Type StringType is accepted. An update may carry only CustomField (SyncToken still checked). Line-level custom fields are not written. Values are limited to 30 characters and may not be empty or blank (400, nothing written). The mechanism was verified live on QuickBooks Enterprise 24 (2026-09-30) on Customer, Vendor, Item, Employee, Invoice and PurchaseOrder; this entity follows the same path."
831
+ },
770
832
  {
771
833
  "qbo": "CustomerMemo",
772
834
  "support": "full",
@@ -775,12 +837,12 @@ var CATALOG = {
775
837
  {
776
838
  "qbo": "Line",
777
839
  "support": "partial",
778
- "note": "Same DetailType support as Invoice: SalesItemLineDetail, GroupLineDetail, and DescriptionOnly map cleanly; DiscountLineDetail requires a Desktop discount item; other DetailTypes return UNSUPPORTED_BY_DESKTOP. Group lines read back as GroupLineDetail without nested line expansion; Desktop discount lines read back as regular item lines referencing the discount item. Updates carrying Line replace the entire line table: every line is re-created with a new line Id and lines omitted from the update are deleted by Desktop (v1 full replacement, #55)."
840
+ "note": "Same DetailType support as Invoice: SalesItemLineDetail, GroupLineDetail, and DescriptionOnly map cleanly; DiscountLineDetail requires a Desktop discount item named by DiscountLineDetail.ItemRef (value = ListID, or name = full name; PercentBased + DiscountPercent sends RatePercent, an amount discount sends Amount); other DetailTypes return UNSUPPORTED_BY_DESKTOP. Group lines read back as GroupLineDetail without nested line expansion; Desktop discount lines read back as SalesItemLineDetail lines (never DiscountLineDetail) referencing the discount item, with a negative Amount (verified live). An unknown Line.Id returns 3120 (REST 610); a malformed one returns 3000. Updates carrying Line send the full line table, as QBO requires: a line with the Id a read returned keeps that Desktop line (Id = TxnLineID, stable across updates), a line without an Id (or Id 0 / empty) is added, and any existing line omitted from the array is deleted. Send the whole array on sparse updates too; an Id listed twice is rejected (2010). Fields you omit from a line that carries an Id are filled from the current record before the full line is sent (Desktop would otherwise blank them), and line ClassRef and ServiceDate are written (ServiceDate not on Estimate). Re-sending an existing group line returns 422 (UNSUPPORTED_BY_DESKTOP); omit it to delete it and add a new group line without an Id."
779
841
  },
780
842
  {
781
843
  "qbo": "TxnTaxDetail",
782
844
  "support": "partial",
783
- "note": "Set TxnTaxCodeRef explicitly; computed TotalTax alone is rejected. Updatable via sparse update (#55)."
845
+ "note": "TxnTaxCodeRef selects the tax item (Desktop ItemSalesTaxRef). TotalTax alone is accepted but not sent: QuickBooks then applies the customer's default sales tax item (or the company default) and computes the tax itself, so the tax on read can differ from the TotalTax you sent. When it differs, create/update responses carry a non-fatal X-TKB-Warning header (not emitted for /batch items). Updatable via sparse update (#55)."
784
846
  },
785
847
  {
786
848
  "qbo": "LinkedTxn",
@@ -810,15 +872,10 @@ var CATALOG = {
810
872
  }
811
873
  ],
812
874
  "unsupported": [
813
- {
814
- "case": "TxnTaxDetail.TotalTax supplied without TxnTaxCodeRef",
815
- "error": "UNSUPPORTED_BY_DESKTOP",
816
- "note": "Desktop cannot honor a computed tax total. Set TxnTaxDetail.TxnTaxCodeRef or per-line TaxCodeRef explicitly. See COMPATIBILITY.md."
817
- },
818
875
  {
819
876
  "case": "Line.DiscountLineDetail without an ItemRef (bare-percentage or amount-off discounts)",
820
877
  "error": "MISSING_REQUIRED_DESKTOP_ITEM",
821
- "note": "Desktop discounts are items. Create a discount item in the company file and reference it as DiscountLineDetail.ItemRef. See COMPATIBILITY.md."
878
+ "note": "Desktop discounts are items and TenkeyBridge does not guess one: picking a default would silently post the discount to that item's account, and discount items are not readable through the Item API yet. Create a discount item in QuickBooks (Lists > Item List > New > Discount) and pass it as DiscountLineDetail.ItemRef by value (ListID) or name (full name). DiscountAccountRef is ignored; the item carries its own account. See COMPATIBILITY.md."
822
879
  },
823
880
  {
824
881
  "case": "Nested/grouped line types other than SalesItemLineDetail, DiscountLineDetail, GroupLineDetail, and DescriptionOnly",
@@ -943,7 +1000,7 @@ var CATALOG = {
943
1000
  {
944
1001
  "qbo": "CustomField",
945
1002
  "support": "partial",
946
- "note": "Name/StringValue populated from Desktop custom fields (DataExt); DefinitionId not available from Desktop; read-only for now. Accepted and ignored on write."
1003
+ "note": "Desktop custom fields (data extensions, OwnerID 0) on the record. Read: Name/StringValue (Type is always StringType; DefinitionId is not available from Desktop). Write: CustomField[{Name, StringValue}] is written as DataExtMod requests (on Desktop Mod both sets a first value and changes one; DataExtAdd fails once a value exists, and a new transaction inherits its customer's/vendor's value) keyed by the field Name, sent in ONE follow-up message after the record is saved; the field must already be defined in QuickBooks and assigned to Customer records, checked up front (400 CUSTOM_FIELD_UNKNOWN, nothing written). If the record saves but a custom field does not, the answer is 502 CUSTOM_FIELD_WRITE_FAILED naming the record Id and which fields applied or failed (never a silent 200); if everything writes but the read-back fails it is 502 CUSTOM_FIELD_READBACK_FAILED. A DefinitionId without a Name is a 400; only Type StringType is accepted. An update may carry only CustomField (SyncToken still checked). Line-level custom fields are not written. Values are limited to 30 characters and may not be empty or blank (400, nothing written). Verified live on QuickBooks Enterprise 24 (2026-09-30)."
947
1004
  },
948
1005
  {
949
1006
  "qbo": "CurrencyRef",
@@ -1012,9 +1069,10 @@ var CATALOG = {
1012
1069
  ],
1013
1070
  "unsupported": [
1014
1071
  {
1015
- "case": "Create or update",
1072
+ "case": "Create, update or deactivate",
1016
1073
  "error": "UNSUPPORTED_BY_DESKTOP",
1017
- "note": "QBO's CustomerType is read-only via the API. TenkeyBridge matches that parity even though Desktop allows CustomerTypeAdd. Desktop ParentRef/Sublevel/FullName have no QBO CustomerType fields and are not surfaced."
1074
+ "note": "QBO's CustomerType is read-only via the API, and TenkeyBridge matches that. Desktop has CustomerTypeAdd but no CustomerTypeMod (verified live: a CustomerTypeMod is a qbXML parse error), so a type cannot be renamed or made inactive through the API at all; Desktop's hierarchy (ParentRef/Sublevel/FullName) has no QBO CustomerType fields and is not surfaced.",
1075
+ "workaround": "Create, rename or deactivate the type in QuickBooks Desktop itself; the change shows up on the next read."
1018
1076
  }
1019
1077
  ]
1020
1078
  },
@@ -1024,35 +1082,84 @@ var CATALOG = {
1024
1082
  "group": "gaps",
1025
1083
  "read": "none",
1026
1084
  "write": "none",
1027
- "headline": "QBO Departments (locations) have no Desktop equivalent \u2014 the only 'Department'/'Location' strings in qbXML are free-text fields on Employee, FixedAsset, and Lead, and Desktop's one real dimensional list (Class) is already exposed faithfully as Class.",
1028
- "fields": [],
1085
+ "headline": "QuickBooks Desktop has no Department (location) list, so Department is unsupported by default. Opt in per company file with Departments from classes and Department becomes an alias of Class (DepartmentRef on a transaction becomes its header ClassRef).",
1086
+ "fields": [
1087
+ {
1088
+ "qbo": "Id",
1089
+ "support": "partial",
1090
+ "note": "Only with Departments from classes on: the Class ListID."
1091
+ },
1092
+ {
1093
+ "qbo": "Name",
1094
+ "support": "partial",
1095
+ "note": "Only with Departments from classes on: the Class Name (31 characters max)."
1096
+ },
1097
+ {
1098
+ "qbo": "SubDepartment",
1099
+ "support": "partial",
1100
+ "note": "Only with Departments from classes on: read-only, true when the class has a parent."
1101
+ },
1102
+ {
1103
+ "qbo": "ParentRef",
1104
+ "support": "partial",
1105
+ "note": "Only with Departments from classes on: the parent class."
1106
+ },
1107
+ {
1108
+ "qbo": "FullyQualifiedName",
1109
+ "support": "partial",
1110
+ "note": "Only with Departments from classes on: the class full name (Parent:Child). Read-only."
1111
+ },
1112
+ {
1113
+ "qbo": "Active",
1114
+ "support": "partial",
1115
+ "note": "Only with Departments from classes on: class IsActive. Deactivate with Active:false."
1116
+ },
1117
+ {
1118
+ "qbo": "SyncToken",
1119
+ "support": "partial",
1120
+ "note": "Only with Departments from classes on: the class EditSequence."
1121
+ },
1122
+ {
1123
+ "qbo": "MetaData",
1124
+ "support": "partial",
1125
+ "note": "Only with Departments from classes on: class TimeCreated / TimeModified."
1126
+ }
1127
+ ],
1029
1128
  "unsupported": [
1030
1129
  {
1031
1130
  "case": "read",
1032
1131
  "error": "UNSUPPORTED_BY_DESKTOP",
1033
- "note": "Re-audited 2026-07-29 against the qbxmlops130 message set: qbXML has no Department or Location list \u2014 no Add/Mod/Query message pair exists. The tokens only appear as plain STRTYPE fields (Employee.Department, FixedAsset.Location, Lead.Location), which are annotations, not a queryable list.",
1034
- "workaround": "If your integration treats QBO locations as just another dimension, remap DepartmentRef onto Class in your own code \u2014 Class is live in TenkeyBridge. We decided against a built-in Department\u2192Class alias, even opt-in: ClassRef already maps to Class, so aliasing would make two QBO fields silently write one Desktop list and collide when a client sends both."
1132
+ "note": "Off by default. Re-audited 2026-07-29 against the qbxmlops130 message set: qbXML has no Department or Location list (no Add/Mod/Query message pair). The tokens only appear as plain STRTYPE fields (Employee.Department, FixedAsset.Location, Lead.Location), which are annotations, not a queryable list.",
1133
+ "workaround": "Turn on Departments from classes for the company file (portal: company file page, Departments card; or PATCH /admin/v1/companies/{companyId}/settings with departmentsFromClasses: true). Department then reads your QuickBooks classes. See the Departments guide."
1035
1134
  },
1036
1135
  {
1037
1136
  "case": "query",
1038
1137
  "error": "UNSUPPORTED_BY_DESKTOP",
1039
- "note": "qbXML has no Department/Location list to query \u2014 confirmed absent from the qbxmlops130 message set.",
1040
- "workaround": "Query Class instead if you remap locations client-side; that remapping is your call, TenkeyBridge never reinterprets DepartmentRef silently."
1138
+ "note": "Off by default: no Department list to query. With Departments from classes on, SELECT ... FROM Department is run against Class and answered as Department; DepartmentRef in a transaction query means its ClassRef.",
1139
+ "workaround": "Turn on Departments from classes, or query Class directly."
1041
1140
  },
1042
1141
  {
1043
1142
  "case": "create",
1044
1143
  "error": "UNSUPPORTED_BY_DESKTOP",
1045
- "note": "Desktop has no Department create. Use Class if you need a dimensional axis on Desktop."
1144
+ "note": "Off by default. With Departments from classes on, creating a Department creates a Class (ParentRef makes it a sub-class).",
1145
+ "workaround": "Turn on Departments from classes, or create a Class."
1046
1146
  },
1047
1147
  {
1048
1148
  "case": "update",
1049
1149
  "error": "UNSUPPORTED_BY_DESKTOP",
1050
- "note": "Desktop has no Department update."
1150
+ "note": "Off by default. With Departments from classes on, an update edits the Class (sparse; Name, Active, ParentRef).",
1151
+ "workaround": "Turn on Departments from classes, or update the Class."
1051
1152
  },
1052
1153
  {
1053
1154
  "case": "delete",
1054
1155
  "error": "UNSUPPORTED_BY_DESKTOP",
1055
- "note": "Desktop has no Department delete."
1156
+ "note": "Always unsupported: a Desktop class cannot be deleted through qbXML. Deactivate with Active:false."
1157
+ },
1158
+ {
1159
+ "case": "DepartmentRef on a transaction",
1160
+ "error": "UNSUPPORTED_BY_DESKTOP",
1161
+ "note": "With Departments from classes on it maps to the header ClassRef on Invoice, SalesReceipt, Estimate, CreditMemo, PurchaseOrder and TimeActivity. Sending a different ClassRef as well is a 400. Bill, Purchase, VendorCredit, JournalEntry, Deposit, RefundReceipt and Transfer have no header class in QuickBooks Desktop (class lives on the lines), so DepartmentRef there is a 422 that says to set ClassRef per line. Off: UNMAPPED_FIELD.",
1162
+ "workaround": "Set ClassRef on each line for those transactions."
1056
1163
  }
1057
1164
  ]
1058
1165
  },
@@ -1079,12 +1186,12 @@ var CATALOG = {
1079
1186
  {
1080
1187
  "qbo": "Line",
1081
1188
  "support": "partial",
1082
- "note": "Write: LinkedTxn (PaymentTxnID path) for undeposited payments, or DepositLineDetail{Entity, AccountRef, PaymentMethodRef, CheckNum} for a manual line \u2014 one or the other, and a manual line's DepositLineDetail.AccountRef is required. Read: Desktop always returns DepositLineDetail; a line sourced from a deposited payment also carries LinkedTxn (TxnId/TxnType Payment) alongside it. Sparse updates cannot modify lines yet."
1189
+ "note": "Write: LinkedTxn (PaymentTxnID path) for undeposited payments, or DepositLineDetail{Entity, AccountRef, PaymentMethodRef, CheckNum} for a manual line \u2014 one or the other, and a manual line's DepositLineDetail.AccountRef is required. Read: Desktop always returns DepositLineDetail; a line sourced from a deposited payment also carries LinkedTxn (TxnId/TxnType Payment) alongside it. Updates carrying Line send the full table as DepositLineMod: a line with the Id a read returned keeps that Desktop line, a line without an Id is added, and any existing line omitted from the array is deleted \u2014 send the whole array. A manual line has omitted fields filled from the current record; a line sourced from a deposited payment is re-sent as a bare TxnLineID (Desktop keeps the line and its payment link; re-sending PaymentTxnID is refused 3210 because the payment is already deposited), so edits to its amount, account and payer are not applied. A new line linking a still-undeposited payment is accepted. Verified live on QuickBooks Enterprise 24 (2026-09-30). CashBack cannot be updated (422): Desktop needs the cash-back line own TxnLineID, which a QBO read does not expose. An Id that is not a line of the deposit is a 400; an Id listed twice is 2010; an empty Line array is refused."
1083
1190
  },
1084
1191
  {
1085
1192
  "qbo": "CashBack",
1086
- "support": "full",
1087
- "note": "Maps to Desktop CashBackInfo."
1193
+ "support": "partial",
1194
+ "note": "Create and read map to Desktop CashBackInfo. Changing CashBack on an update is 422 UNSUPPORTED_BY_DESKTOP (CashBackInfoMod needs the cash-back line's own TxnLineID, which a read does not expose); an update that echoes the current CashBack unchanged is accepted."
1088
1195
  },
1089
1196
  {
1090
1197
  "qbo": "TotalAmt",
@@ -1111,8 +1218,8 @@ var CATALOG = {
1111
1218
  "verdict": "live",
1112
1219
  "group": "lists",
1113
1220
  "read": "full",
1114
- "write": "none",
1115
- "headline": "Read/query only \u2014 no Desktop write path this release; payroll aggregates out of scope",
1221
+ "write": "partial",
1222
+ "headline": "Read/query plus create and update of core HR fields (live-verified); DisplayName is derived from first/middle/last; SSN is write-only and never returned; payroll fields out of scope",
1116
1223
  "fields": [
1117
1224
  {
1118
1225
  "qbo": "GivenName",
@@ -1132,7 +1239,8 @@ var CATALOG = {
1132
1239
  },
1133
1240
  {
1134
1241
  "qbo": "DisplayName",
1135
- "support": "full"
1242
+ "support": "partial",
1243
+ "note": "Read-only: Desktop derives Name as GivenName MiddleName FamilyName (blanks skipped). A create/update naming a different DisplayName is refused with 400; one that matches is accepted and not sent. Create requires GivenName or FamilyName; DisplayName alone is refused (TenkeyBridge does not split it)."
1136
1244
  },
1137
1245
  {
1138
1246
  "qbo": "PrintOnCheckName",
@@ -1141,7 +1249,8 @@ var CATALOG = {
1141
1249
  },
1142
1250
  {
1143
1251
  "qbo": "Active",
1144
- "support": "full"
1252
+ "support": "full",
1253
+ "note": "Deactivate with a sparse update of Active:false; Desktop employees cannot be deleted through qbXML."
1145
1254
  },
1146
1255
  {
1147
1256
  "qbo": "PrimaryPhone",
@@ -1157,7 +1266,8 @@ var CATALOG = {
1157
1266
  },
1158
1267
  {
1159
1268
  "qbo": "PrimaryAddr",
1160
- "support": "full"
1269
+ "support": "full",
1270
+ "note": "Desktop's employee address has two street lines, City, State and PostalCode. Live limits: Line1/Line2 41 characters, City 31, PostalCode 13 (longer values are rejected up front with 2050; a State longer than Desktop's field fails with Desktop status 3110). Line3-Line5 and Country are rejected on write."
1161
1271
  },
1162
1272
  {
1163
1273
  "qbo": "HiredDate",
@@ -1173,12 +1283,24 @@ var CATALOG = {
1173
1283
  },
1174
1284
  {
1175
1285
  "qbo": "Gender",
1176
- "support": "full"
1286
+ "support": "full",
1287
+ "note": "Male or Female."
1288
+ },
1289
+ {
1290
+ "qbo": "SSN",
1291
+ "support": "partial",
1292
+ "note": "Write-only: accepted as 123-45-6789 or 123456789 on create/update and never returned by Desktop (verified live: absent from Add, Mod, Get and Query responses). A masked value (XXX-XX-1234) is rejected on create and skipped on update, never written."
1177
1293
  },
1178
1294
  {
1179
1295
  "qbo": "CustomField",
1180
1296
  "support": "partial",
1181
- "note": "Name/StringValue populated from Desktop custom fields (DataExt); DefinitionId not available from Desktop; read-only."
1297
+ "note": "Desktop custom fields (data extensions, OwnerID 0) on the record. Read: Name/StringValue (Type is always StringType; DefinitionId is not available from Desktop). Write: CustomField[{Name, StringValue}] is written as DataExtMod requests (on Desktop Mod both sets a first value and changes one; DataExtAdd fails once a value exists, and a new transaction inherits its customer's/vendor's value) keyed by the field Name, sent in ONE follow-up message after the record is saved; the field must already be defined in QuickBooks and assigned to Employee records, checked up front (400 CUSTOM_FIELD_UNKNOWN, nothing written). If the record saves but a custom field does not, the answer is 502 CUSTOM_FIELD_WRITE_FAILED naming the record Id and which fields applied or failed (never a silent 200); if everything writes but the read-back fails it is 502 CUSTOM_FIELD_READBACK_FAILED. A DefinitionId without a Name is a 400; only Type StringType is accepted. An update may carry only CustomField (SyncToken still checked). Line-level custom fields are not written. Values are limited to 30 characters and may not be empty or blank (400, nothing written). Verified live on QuickBooks Enterprise 24 (2026-09-30)."
1298
+ },
1299
+ {
1300
+ "qbo": "EmployeeNumber",
1301
+ "support": "none",
1302
+ "note": "Desktop's Employee record has no employee-number field; keep the number in your own system keyed by the TenkeyBridge Id.",
1303
+ "error": "UNSUPPORTED_BY_DESKTOP"
1182
1304
  },
1183
1305
  {
1184
1306
  "qbo": "TargetBonus",
@@ -1195,9 +1317,42 @@ var CATALOG = {
1195
1317
  ],
1196
1318
  "unsupported": [
1197
1319
  {
1198
- "case": "Create or update",
1320
+ "case": "Delete",
1199
1321
  "error": "UNSUPPORTED_BY_DESKTOP",
1200
- "note": "Employee is read/query only this release; TenkeyBridge doesn't expose a Desktop write path for it."
1322
+ "note": "QBO employees are deactivated, not deleted; TenkeyBridge follows that (sparse update with Active:false)."
1323
+ },
1324
+ {
1325
+ "case": "Payroll fields",
1326
+ "error": "UNSUPPORTED_BY_DESKTOP",
1327
+ "note": "Pay rates, pay periods, wage items and other EmployeePayrollInfo content are license-gated in Desktop and not exposed for read or write."
1328
+ }
1329
+ ]
1330
+ },
1331
+ "Entitlements": {
1332
+ "entity": "Entitlements",
1333
+ "verdict": "live",
1334
+ "group": "platform",
1335
+ "read": "partial",
1336
+ "write": "none",
1337
+ "headline": "GET /v3/company/{companyId}/entitlements \u2014 a static, honest capability document for a QuickBooks Desktop company (no per-file subscription data).",
1338
+ "usage": "GET /v3/company/{companyId}/entitlements",
1339
+ "fields": [
1340
+ {
1341
+ "qbo": "Entitlements.platform",
1342
+ "support": "full",
1343
+ "note": 'Always "QuickBooks Desktop" \u2014 TenkeyBridge talks to Desktop, never to a QBO subscription.'
1344
+ },
1345
+ {
1346
+ "qbo": "Entitlements.features",
1347
+ "support": "partial",
1348
+ "note": "Static list of what TenkeyBridge supports on Desktop (accounting API, query, CDC, batch, reports). It is not read from the company file; plan tiers, seats and add-ons (Payroll, Advanced) that QBO reports are not available from Desktop."
1349
+ }
1350
+ ],
1351
+ "unsupported": [
1352
+ {
1353
+ "case": "QBO subscription tier, seats and add-ons",
1354
+ "error": "UNSUPPORTED_BY_DESKTOP",
1355
+ "note": "Desktop has no subscription entitlements exposed over qbXML; the response says so explicitly rather than inventing values."
1201
1356
  }
1202
1357
  ]
1203
1358
  },
@@ -1207,12 +1362,23 @@ var CATALOG = {
1207
1362
  "group": "sales",
1208
1363
  "read": "full",
1209
1364
  "write": "partial",
1210
- "headline": "Same shape as Invoice; no expiration/acceptance tracking",
1365
+ "headline": "Same shape as Invoice; expiration date and active/closed status, no acceptance tracking",
1211
1366
  "fields": [
1212
1367
  {
1213
1368
  "qbo": "CustomerRef",
1214
1369
  "support": "full"
1215
1370
  },
1371
+ {
1372
+ "qbo": "ClassRef",
1373
+ "support": "full",
1374
+ "note": "Header-level class (Desktop ClassRef, read and write). Line-level ClassRef is separate."
1375
+ },
1376
+ {
1377
+ "qbo": "DepartmentRef",
1378
+ "support": "none",
1379
+ "note": "UNMAPPED_FIELD by default. With Departments from classes turned on for the company file, the gateway maps it to the header ClassRef (written to it, read from it); sending a different ClassRef as well is a 400.",
1380
+ "error": "UNMAPPED_FIELD"
1381
+ },
1216
1382
  {
1217
1383
  "qbo": "TxnDate",
1218
1384
  "support": "full"
@@ -1240,7 +1406,18 @@ var CATALOG = {
1240
1406
  },
1241
1407
  {
1242
1408
  "qbo": "DueDate",
1243
- "support": "full"
1409
+ "support": "full",
1410
+ "note": "Desktop has one estimate due date, which is also QBO's ExpirationDate; both names read back with the same value. Sending both with different values: on update the one that differs from the current record wins (ExpirationDate if both changed); on create ExpirationDate wins."
1411
+ },
1412
+ {
1413
+ "qbo": "ExpirationDate",
1414
+ "support": "full",
1415
+ "note": "Maps to the Desktop estimate DueDate. Read and write."
1416
+ },
1417
+ {
1418
+ "qbo": "TxnStatus",
1419
+ "support": "partial",
1420
+ "note": "Maps to Desktop IsActive: Pending = active, Closed = inactive (Mark as inactive). Closed means only that the estimate is marked inactive in Desktop; an estimate converted to an invoice still reads as Pending. Accepted and Rejected have no Desktop state and return UNSUPPORTED_BY_DESKTOP. Not independently verified against a live EstimateRet yet."
1244
1421
  },
1245
1422
  {
1246
1423
  "qbo": "PrivateNote",
@@ -1254,12 +1431,12 @@ var CATALOG = {
1254
1431
  {
1255
1432
  "qbo": "Line",
1256
1433
  "support": "partial",
1257
- "note": "Same DetailType support as Invoice: SalesItemLineDetail, GroupLineDetail, and DescriptionOnly map cleanly; line-level ClassRef and ServiceDate are populated on read; DiscountLineDetail requires a Desktop discount item; other DetailTypes return UNSUPPORTED_BY_DESKTOP. Group lines read back as GroupLineDetail without nested line expansion; Desktop discount lines read back as regular item lines referencing the discount item. Updates carrying Line replace the entire line table: every line is re-created with a new line Id and lines omitted from the update are deleted by Desktop (v1 full replacement, #55)."
1434
+ "note": "Same DetailType support as Invoice (for an item that has a cost, Desktop treats an Estimate line's Rate as cost plus markup, MarkupRatePercent, so Amount can differ from Qty x Rate; verified live): SalesItemLineDetail, GroupLineDetail, and DescriptionOnly map cleanly; line-level ClassRef and ServiceDate are populated on read; DiscountLineDetail requires a Desktop discount item named by DiscountLineDetail.ItemRef (value = ListID, or name = full name; PercentBased + DiscountPercent sends RatePercent, an amount discount sends Amount); other DetailTypes return UNSUPPORTED_BY_DESKTOP. Group lines read back as GroupLineDetail without nested line expansion; Desktop discount lines read back as SalesItemLineDetail lines (never DiscountLineDetail) referencing the discount item, with a negative Amount (verified live). An unknown Line.Id returns 3120 (REST 610); a malformed one returns 3000. Updates carrying Line send the full line table, as QBO requires: a line with the Id a read returned keeps that Desktop line (Id = TxnLineID, stable across updates), a line without an Id (or Id 0 / empty) is added, and any existing line omitted from the array is deleted. Send the whole array on sparse updates too; an Id listed twice is rejected (2010). Fields you omit from a line that carries an Id are filled from the current record before the full line is sent (Desktop would otherwise blank them), and line ClassRef and ServiceDate are written (ServiceDate not on Estimate). Re-sending an existing group line returns 422 (UNSUPPORTED_BY_DESKTOP); omit it to delete it and add a new group line without an Id."
1258
1435
  },
1259
1436
  {
1260
1437
  "qbo": "TxnTaxDetail",
1261
1438
  "support": "partial",
1262
- "note": "Set TxnTaxCodeRef explicitly on write; computed TotalTax alone is rejected. On read: TotalTax, TxnTaxCodeRef, and TaxLine[{Amount, TaxLineDetail{TaxRateRef, TaxPercent}}]. NetAmountTaxable never returned. Updatable via sparse update (#55)."
1439
+ "note": "TxnTaxCodeRef on write selects the tax item (Desktop ItemSalesTaxRef). TotalTax alone is accepted but not sent: QuickBooks then applies the customer's default sales tax item (or the company default) and computes the tax itself, so the tax on read can differ from the TotalTax you sent. When it differs, create/update responses carry a non-fatal X-TKB-Warning header (not emitted for /batch items). On read: TotalTax, TxnTaxCodeRef, and TaxLine[{Amount, TaxLineDetail{TaxRateRef, TaxPercent}}]. NetAmountTaxable never returned. Updatable via sparse update (#55)."
1263
1440
  },
1264
1441
  {
1265
1442
  "qbo": "LinkedTxn",
@@ -1269,7 +1446,7 @@ var CATALOG = {
1269
1446
  {
1270
1447
  "qbo": "CustomField",
1271
1448
  "support": "partial",
1272
- "note": "Name/StringValue populated from Desktop custom fields (DataExt); DefinitionId not available from Desktop; read-only for now. Accepted and ignored on write."
1449
+ "note": "Desktop custom fields (data extensions, OwnerID 0) on the transaction header. Read: Name/StringValue (Type is always StringType; DefinitionId is not available from Desktop). Write: CustomField[{Name, StringValue}] is written as DataExtMod requests (on Desktop Mod both sets a first value and changes one; DataExtAdd fails once a value exists, and a new transaction inherits its customer's/vendor's value) keyed by the field Name, sent in ONE follow-up message after the record is saved; the field must already be defined in QuickBooks and assigned to Estimate records, checked up front (400 CUSTOM_FIELD_UNKNOWN, nothing written). If the record saves but a custom field does not, the answer is 502 CUSTOM_FIELD_WRITE_FAILED naming the record Id and which fields applied or failed (never a silent 200); if everything writes but the read-back fails it is 502 CUSTOM_FIELD_READBACK_FAILED. A DefinitionId without a Name is a 400; only Type StringType is accepted. An update may carry only CustomField (SyncToken still checked). Line-level custom fields are not written. Values are limited to 30 characters and may not be empty or blank (400, nothing written). The mechanism was verified live on QuickBooks Enterprise 24 (2026-09-30) on Customer, Vendor, Item, Employee, Invoice and PurchaseOrder; this entity follows the same path."
1273
1450
  },
1274
1451
  {
1275
1452
  "qbo": "TotalAmt",
@@ -1286,12 +1463,6 @@ var CATALOG = {
1286
1463
  "support": "partial",
1287
1464
  "note": "Accepted and ignored \u2014 Desktop manages this itself; multi-currency mapping lands later."
1288
1465
  },
1289
- {
1290
- "qbo": "ExpirationDate",
1291
- "support": "none",
1292
- "note": "Desktop estimates have no expiration date. Track it in your own system if needed.",
1293
- "error": "UNSUPPORTED_BY_DESKTOP"
1294
- },
1295
1466
  {
1296
1467
  "qbo": "AcceptedBy",
1297
1468
  "support": "none",
@@ -1303,24 +1474,13 @@ var CATALOG = {
1303
1474
  "support": "none",
1304
1475
  "note": "Desktop estimates have no accepted-date field. Track acceptance in your own system.",
1305
1476
  "error": "UNSUPPORTED_BY_DESKTOP"
1306
- },
1307
- {
1308
- "qbo": "TxnStatus",
1309
- "support": "none",
1310
- "note": "Desktop estimates have no status field matching QBO's Pending/Accepted/Closed/Rejected enum. Track status in your own system.",
1311
- "error": "UNSUPPORTED_BY_DESKTOP"
1312
1477
  }
1313
1478
  ],
1314
1479
  "unsupported": [
1315
- {
1316
- "case": "TxnTaxDetail.TotalTax supplied without TxnTaxCodeRef",
1317
- "error": "UNSUPPORTED_BY_DESKTOP",
1318
- "note": "Desktop cannot honor a computed tax total. Set TxnTaxDetail.TxnTaxCodeRef or per-line TaxCodeRef explicitly. See COMPATIBILITY.md."
1319
- },
1320
1480
  {
1321
1481
  "case": "Line.DiscountLineDetail without an ItemRef (bare-percentage or amount-off discounts)",
1322
1482
  "error": "MISSING_REQUIRED_DESKTOP_ITEM",
1323
- "note": "Desktop discounts are items. Create a discount item in the company file and reference it as DiscountLineDetail.ItemRef. See COMPATIBILITY.md."
1483
+ "note": "Desktop discounts are items and TenkeyBridge does not guess one: picking a default would silently post the discount to that item's account, and discount items are not readable through the Item API yet. Create a discount item in QuickBooks (Lists > Item List > New > Discount) and pass it as DiscountLineDetail.ItemRef by value (ListID) or name (full name). DiscountAccountRef is ignored; the item carries its own account. See COMPATIBILITY.md."
1324
1484
  },
1325
1485
  {
1326
1486
  "case": "Nested/grouped line types other than SalesItemLineDetail, DiscountLineDetail, GroupLineDetail, and DescriptionOnly",
@@ -1377,6 +1537,65 @@ var CATALOG = {
1377
1537
  }
1378
1538
  ]
1379
1539
  },
1540
+ "InventoryAdjustment": {
1541
+ "entity": "InventoryAdjustment",
1542
+ "verdict": "live",
1543
+ "group": "purchasing",
1544
+ "read": "full",
1545
+ "write": "partial",
1546
+ "headline": "Quantity adjustments to inventory items \u2014 create, read, header update and delete (live-verified); line edits need delete + re-create",
1547
+ "fields": [
1548
+ {
1549
+ "qbo": "AdjustAccountRef",
1550
+ "support": "full",
1551
+ "note": "Desktop AccountRef \u2014 the adjustment (offset) account. Required on create."
1552
+ },
1553
+ {
1554
+ "qbo": "TxnDate",
1555
+ "support": "full"
1556
+ },
1557
+ {
1558
+ "qbo": "DocNumber",
1559
+ "support": "full",
1560
+ "note": "Desktop RefNumber: max 11 characters. A longer value is rejected up front with a 400 fault (code 2050)."
1561
+ },
1562
+ {
1563
+ "qbo": "PrivateNote",
1564
+ "support": "full",
1565
+ "note": "Desktop Memo."
1566
+ },
1567
+ {
1568
+ "qbo": "Line",
1569
+ "support": "partial",
1570
+ "note": "DetailType ItemAdjustmentLineDetail with ItemRef and QtyDiff. QtyDiff is a signed change in quantity on hand (nonzero, at most 5 decimal places) and maps to Desktop QuantityAdjustment/QuantityDifference (never NewQuantity); quantity on hand changes by exactly that amount, verified live. The same item on two lines is refused (Desktop rejects it). Desktop's value elements (ValueAdjustment/NewValue) are not exposed for writing; Desktop's ValueDifference (quantity times the item's average cost, verified live) is returned read-only as Line.Amount; the Ret line is flat QuantityDifference/ValueDifference. Line.Description and Line.Amount cannot be written (Desktop has no line memo and computes the value from the item's average cost). Sparse updates cannot modify lines."
1571
+ },
1572
+ {
1573
+ "qbo": "CurrencyRef",
1574
+ "support": "none",
1575
+ "note": "Multicurrency not yet supported.",
1576
+ "error": "UNSUPPORTED_BY_DESKTOP"
1577
+ },
1578
+ {
1579
+ "qbo": "ExchangeRate",
1580
+ "support": "none",
1581
+ "note": "Multicurrency not yet supported.",
1582
+ "error": "UNSUPPORTED_BY_DESKTOP"
1583
+ }
1584
+ ],
1585
+ "unsupported": [
1586
+ {
1587
+ "case": "Line update",
1588
+ "error": "UNSUPPORTED_BY_DESKTOP",
1589
+ "note": "A sparse update can change header fields only (AdjustAccountRef, TxnDate, DocNumber, PrivateNote). To change quantities, delete the adjustment and create a new one.",
1590
+ "workaround": "POST ?operation=delete with the Id, then create a corrected InventoryAdjustment."
1591
+ },
1592
+ {
1593
+ "case": "Absolute quantity (NewQuantity) and value adjustments",
1594
+ "error": "UNSUPPORTED_BY_DESKTOP",
1595
+ "note": "QBO's InventoryAdjustment only has QtyDiff (a delta), so Desktop's NewQuantity/NewValue forms have no QBO field to map from."
1596
+ }
1597
+ ]
1598
+ },
1380
1599
  "Invoice": {
1381
1600
  "entity": "Invoice",
1382
1601
  "verdict": "live",
@@ -1389,6 +1608,17 @@ var CATALOG = {
1389
1608
  "qbo": "CustomerRef",
1390
1609
  "support": "full"
1391
1610
  },
1611
+ {
1612
+ "qbo": "ClassRef",
1613
+ "support": "full",
1614
+ "note": "Header-level class (Desktop ClassRef, read and write). Line-level ClassRef is separate."
1615
+ },
1616
+ {
1617
+ "qbo": "DepartmentRef",
1618
+ "support": "none",
1619
+ "note": "UNMAPPED_FIELD by default. With Departments from classes turned on for the company file, the gateway maps it to the header ClassRef (written to it, read from it); sending a different ClassRef as well is a 400.",
1620
+ "error": "UNMAPPED_FIELD"
1621
+ },
1392
1622
  {
1393
1623
  "qbo": "TxnDate",
1394
1624
  "support": "full"
@@ -1438,12 +1668,12 @@ var CATALOG = {
1438
1668
  {
1439
1669
  "qbo": "Line",
1440
1670
  "support": "partial",
1441
- "note": "SalesItemLineDetail, GroupLineDetail, and DescriptionOnly map cleanly; line-level ClassRef and ServiceDate are populated on read; DiscountLineDetail requires a Desktop discount item referenced via DiscountLineDetail.ItemRef; other DetailTypes (e.g. SubTotalLineDetail) return UNSUPPORTED_BY_DESKTOP. Group lines read back as GroupLineDetail without nested line expansion; Desktop discount lines read back as regular item lines referencing the discount item. Updates carrying Line replace the entire line table: every line is re-created with a new line Id and lines omitted from the update are deleted by Desktop (v1 full replacement, #55)."
1671
+ "note": "SalesItemLineDetail, GroupLineDetail, and DescriptionOnly map cleanly; line-level ClassRef and ServiceDate are populated on read; DiscountLineDetail requires a Desktop discount item named by DiscountLineDetail.ItemRef (value = ListID, or name = full name; PercentBased + DiscountPercent sends RatePercent, an amount discount sends Amount); other DetailTypes (e.g. SubTotalLineDetail) return UNSUPPORTED_BY_DESKTOP. Group lines read back as GroupLineDetail without nested line expansion; Desktop discount lines read back as SalesItemLineDetail lines (never DiscountLineDetail) referencing the discount item, with a negative Amount (verified live). An unknown Line.Id returns 3120 (REST 610); a malformed one returns 3000. Updates carrying Line send the full line table, as QBO requires: a line with the Id a read returned keeps that Desktop line (Id = TxnLineID, stable across updates), a line without an Id (or Id 0 / empty) is added, and any existing line omitted from the array is deleted. Send the whole array on sparse updates too; an Id listed twice is rejected (2010). Fields you omit from a line that carries an Id are filled from the current record before the full line is sent (Desktop would otherwise blank them), and line ClassRef and ServiceDate are written (ServiceDate not on Estimate). Re-sending an existing group line returns 422 (UNSUPPORTED_BY_DESKTOP); omit it to delete it and add a new group line without an Id."
1442
1672
  },
1443
1673
  {
1444
1674
  "qbo": "TxnTaxDetail",
1445
1675
  "support": "partial",
1446
- "note": "Set TxnTaxCodeRef explicitly on write; computed TotalTax alone is rejected. On read: TotalTax, TxnTaxCodeRef (from ItemSalesTaxRef), and TaxLine[{Amount, TaxLineDetail{TaxRateRef, TaxPercent}}] from SalesTaxTotal/ItemSalesTaxRef/SalesTaxPercentage. NetAmountTaxable is never returned (Desktop has no taxable basis). Updatable via sparse update (#55)."
1676
+ "note": "TxnTaxCodeRef on write selects the tax item (Desktop ItemSalesTaxRef). TotalTax alone is accepted but not sent: QuickBooks then applies the customer's default sales tax item (or the company default) and computes the tax itself, so the tax on read can differ from the TotalTax you sent. When it differs, create/update responses carry a non-fatal X-TKB-Warning header (not emitted for /batch items). On read: TotalTax, TxnTaxCodeRef (from ItemSalesTaxRef), and TaxLine[{Amount, TaxLineDetail{TaxRateRef, TaxPercent}}] from SalesTaxTotal/ItemSalesTaxRef/SalesTaxPercentage. NetAmountTaxable is never returned (Desktop has no taxable basis). Updatable via sparse update (#55)."
1447
1677
  },
1448
1678
  {
1449
1679
  "qbo": "LinkedTxn",
@@ -1453,7 +1683,7 @@ var CATALOG = {
1453
1683
  {
1454
1684
  "qbo": "CustomField",
1455
1685
  "support": "partial",
1456
- "note": "Name/StringValue populated from Desktop custom fields (DataExt); DefinitionId not available from Desktop; read-only for now. Accepted and ignored on write."
1686
+ "note": "Desktop custom fields (data extensions, OwnerID 0) on the transaction header. Read: Name/StringValue (Type is always StringType; DefinitionId is not available from Desktop). Write: CustomField[{Name, StringValue}] is written as DataExtMod requests (on Desktop Mod both sets a first value and changes one; DataExtAdd fails once a value exists, and a new transaction inherits its customer's/vendor's value) keyed by the field Name, sent in ONE follow-up message after the record is saved; the field must already be defined in QuickBooks and assigned to Invoice records, checked up front (400 CUSTOM_FIELD_UNKNOWN, nothing written). If the record saves but a custom field does not, the answer is 502 CUSTOM_FIELD_WRITE_FAILED naming the record Id and which fields applied or failed (never a silent 200); if everything writes but the read-back fails it is 502 CUSTOM_FIELD_READBACK_FAILED. A DefinitionId without a Name is a 400; only Type StringType is accepted. An update may carry only CustomField (SyncToken still checked). Line-level custom fields are not written. Values are limited to 30 characters and may not be empty or blank (400, nothing written). Verified live on QuickBooks Enterprise 24 (2026-09-30)."
1457
1687
  },
1458
1688
  {
1459
1689
  "qbo": "TotalAmt",
@@ -1478,19 +1708,14 @@ var CATALOG = {
1478
1708
  {
1479
1709
  "qbo": "operation=void",
1480
1710
  "support": "partial",
1481
- "note": "POST ?operation=void with {Id, SyncToken}: sends TxnVoidRq (TxnVoidType Invoice), then re-reads and returns the record. SyncToken is verified against the current EditSequence first (mismatch = 5010). Proven live on QB Enterprise 24 (2026-09-29): the re-read shows amounts and line Qty zeroed, PrivateNote prefixed `VOID: `, TxnDate unchanged, a new SyncToken; voiding again succeeds. The response is whatever Desktop returns on the post-void re-read (nothing is fabricated)."
1711
+ "note": "POST ?operation=void with {Id, SyncToken}: sends TxnVoidRq (TxnVoidType Invoice), then re-reads and returns the record. SyncToken is verified against the current EditSequence first (mismatch = 5010). Proven live on QB Enterprise 24 (2026-09-29): the re-read shows amounts and line Qty zeroed, PrivateNote prefixed `VOID: `, TxnDate unchanged, a new SyncToken; re-proven 2026-09-30 with a memo (PrivateNote becomes `VOID: <memo>`, DocNumber kept, Balance 0); voiding again succeeds. The response is whatever Desktop returns on the post-void re-read (nothing is fabricated)."
1482
1712
  }
1483
1713
  ],
1484
1714
  "unsupported": [
1485
- {
1486
- "case": "TxnTaxDetail.TotalTax supplied without TxnTaxCodeRef",
1487
- "error": "UNSUPPORTED_BY_DESKTOP",
1488
- "note": "Desktop cannot honor a computed tax total. Set TxnTaxDetail.TxnTaxCodeRef or per-line TaxCodeRef explicitly. See COMPATIBILITY.md."
1489
- },
1490
1715
  {
1491
1716
  "case": "Line.DiscountLineDetail without an ItemRef (bare-percentage or amount-off discounts)",
1492
1717
  "error": "MISSING_REQUIRED_DESKTOP_ITEM",
1493
- "note": "Desktop discounts are items. Create a discount item in the company file and reference it as DiscountLineDetail.ItemRef. See COMPATIBILITY.md."
1718
+ "note": "Desktop discounts are items and TenkeyBridge does not guess one: picking a default would silently post the discount to that item's account, and discount items are not readable through the Item API yet. Create a discount item in QuickBooks (Lists > Item List > New > Discount) and pass it as DiscountLineDetail.ItemRef by value (ListID) or name (full name). DiscountAccountRef is ignored; the item carries its own account. See COMPATIBILITY.md."
1494
1719
  },
1495
1720
  {
1496
1721
  "case": "Nested/grouped line types other than SalesItemLineDetail, DiscountLineDetail, GroupLineDetail, and DescriptionOnly (e.g. SubTotalLineDetail)",
@@ -1504,72 +1729,83 @@ var CATALOG = {
1504
1729
  "verdict": "live",
1505
1730
  "group": "sales",
1506
1731
  "read": "partial",
1507
- "write": "none",
1732
+ "write": "partial",
1508
1733
  "headline": "One Item becomes several Desktop item types",
1509
1734
  "fields": [
1510
1735
  {
1511
1736
  "qbo": "Name",
1512
- "support": "full"
1737
+ "support": "full",
1738
+ "note": "Desktop item Name is the leaf name (max 31 characters); FullyQualifiedName is derived."
1513
1739
  },
1514
1740
  {
1515
1741
  "qbo": "FullyQualifiedName",
1516
1742
  "support": "full",
1517
- "note": "Read-only in this release."
1743
+ "note": "Read-only; derived from the Desktop FullName. Echoed values on update are ignored."
1518
1744
  },
1519
1745
  {
1520
1746
  "qbo": "Active",
1521
1747
  "support": "full",
1522
- "note": "Read-only in this release."
1748
+ "note": "Deactivate with a sparse update setting Active to false; items are never deleted."
1523
1749
  },
1524
1750
  {
1525
1751
  "qbo": "Type",
1526
1752
  "support": "partial",
1527
- "note": "Service, NonInventory, Inventory, Group map; other Desktop types are omitted from query results."
1753
+ "note": "Service, NonInventory, Inventory read and write; Group reads only. Desktop other-charge and discount items read as Service. Type cannot change after creation. Category and other Desktop types are unsupported."
1528
1754
  },
1529
1755
  {
1530
1756
  "qbo": "Description",
1531
1757
  "support": "full",
1532
- "note": "Read-only in this release."
1758
+ "note": "Desktop sales description: SalesOrPurchase/Desc, SalesAndPurchase/SalesDesc, or SalesDesc on Inventory."
1533
1759
  },
1534
1760
  {
1535
1761
  "qbo": "UnitPrice",
1536
1762
  "support": "full",
1537
- "note": "Read-only in this release."
1763
+ "note": "Desktop sales price. Sent with up to five decimals. On a Desktop discount item a flat rate reads as UnitPrice; a percentage discount has none. Discount items are read-only."
1538
1764
  },
1539
1765
  {
1540
1766
  "qbo": "Sku",
1541
1767
  "support": "partial",
1542
- "note": "QBO Sku \u21C4 Desktop ManufacturerPartNumber \u2014 Desktop has no first-class SKU field; barcode (Advanced Inventory) is intentionally not used. Read-only in this release."
1768
+ "note": "QBO Sku maps to Desktop ManufacturerPartNumber (max 31 characters) \u2014 Desktop has no first-class SKU field; barcode (Advanced Inventory) is intentionally not used. NonInventory and Inventory only; on a Service, Sku is refused with UNSUPPORTED_BY_DESKTOP."
1769
+ },
1770
+ {
1771
+ "qbo": "TrackQtyOnHand",
1772
+ "support": "partial",
1773
+ "note": "Read as true for Inventory. On write it must agree with Type (Inventory always tracks quantity; Service and NonInventory never do) or the request is refused."
1543
1774
  },
1544
1775
  {
1545
1776
  "qbo": "QtyOnHand",
1546
- "support": "full",
1547
- "note": "Read-only in this release."
1777
+ "support": "partial",
1778
+ "note": "Read for Inventory. Settable on create only (with InvStartDate); Desktop changes stock through inventory adjustments and transactions, so a different value on update is refused. Echoing the current value is accepted."
1779
+ },
1780
+ {
1781
+ "qbo": "InvStartDate",
1782
+ "support": "partial",
1783
+ "note": "Write-only, create only (Desktop InventoryDate). Not returned on read."
1548
1784
  },
1549
1785
  {
1550
1786
  "qbo": "IncomeAccountRef",
1551
1787
  "support": "full",
1552
- "note": "Read-only in this release."
1788
+ "note": "Service/NonInventory: SalesOrPurchase/AccountRef (one-sided) or SalesAndPurchase/IncomeAccountRef (two-sided). Inventory: IncomeAccountRef. Required on create for every writable type (Desktop rejects an item with no posting account; a missing one is a 400 with code 2020)."
1553
1789
  },
1554
1790
  {
1555
1791
  "qbo": "ExpenseAccountRef",
1556
1792
  "support": "partial",
1557
- "note": "Inventory: COGSAccountRef. Two-sided Service/NonInventory (SalesAndPurchase): ExpenseAccountRef. One-sided Service/NonInventory have no expense account."
1793
+ "note": "Inventory: COGSAccountRef (required on create). Two-sided Service/NonInventory (SalesAndPurchase): ExpenseAccountRef. One-sided Service/NonInventory have no expense account; sending one at creation makes the item two-sided, and on update it is refused for a sales-only item."
1558
1794
  },
1559
1795
  {
1560
1796
  "qbo": "AssetAccountRef",
1561
1797
  "support": "full",
1562
- "note": "Read-only in this release; Inventory only."
1798
+ "note": "Inventory only; required on create."
1563
1799
  },
1564
1800
  {
1565
1801
  "qbo": "PurchaseDesc",
1566
1802
  "support": "full",
1567
- "note": "Inventory and two-sided Service/NonInventory (SalesAndPurchase)."
1803
+ "note": "Inventory and two-sided Service/NonInventory (SalesAndPurchase). Purchase-side fields must be present at creation: Desktop cannot turn an existing sales-only item into a two-sided one, so adding them on update is refused with UNSUPPORTED_BY_DESKTOP."
1568
1804
  },
1569
1805
  {
1570
1806
  "qbo": "PurchaseCost",
1571
1807
  "support": "full",
1572
- "note": "Inventory and two-sided Service/NonInventory (SalesAndPurchase)."
1808
+ "note": "Inventory and two-sided Service/NonInventory (SalesAndPurchase). Sent with up to five decimals. On create with QtyOnHand, Desktop values the opening stock at PurchaseCost."
1573
1809
  },
1574
1810
  {
1575
1811
  "qbo": "PrefVendorRef",
@@ -1579,29 +1815,54 @@ var CATALOG = {
1579
1815
  {
1580
1816
  "qbo": "ParentRef",
1581
1817
  "support": "full",
1582
- "note": "Desktop item hierarchy."
1818
+ "note": "Desktop item hierarchy; sub-items are FullName paths (Parent:Child)."
1583
1819
  },
1584
1820
  {
1585
1821
  "qbo": "SubItem",
1586
1822
  "support": "full",
1587
- "note": "Derived from Desktop Sublevel."
1823
+ "note": "Derived from Desktop Sublevel; read-only."
1824
+ },
1825
+ {
1826
+ "qbo": "ClassRef",
1827
+ "support": "full",
1828
+ "note": "Desktop ClassRef."
1829
+ },
1830
+ {
1831
+ "qbo": "SalesTaxCodeRef",
1832
+ "support": "full",
1833
+ "note": "Desktop SalesTaxCodeRef. QBO values TAX and NON map to Desktop's built-in Tax and Non codes; any other value is a ListID. Wins over Taxable if both are sent."
1834
+ },
1835
+ {
1836
+ "qbo": "Taxable",
1837
+ "support": "partial",
1838
+ "note": "Derived on read only when the sales tax code is the built-in Tax or Non code (a custom code leaves it unset). On write, true/false selects the Tax/Non code."
1588
1839
  },
1589
1840
  {
1590
1841
  "qbo": "CustomField",
1591
1842
  "support": "partial",
1592
- "note": "Name/StringValue populated from Desktop custom fields (DataExt); DefinitionId not available from Desktop; read-only for now."
1843
+ "note": "Desktop custom fields (data extensions, OwnerID 0) on the record. Read: Name/StringValue (Type is always StringType; DefinitionId is not available from Desktop). Write: CustomField[{Name, StringValue}] is written as DataExtMod requests (on Desktop Mod both sets a first value and changes one; DataExtAdd fails once a value exists, and a new transaction inherits its customer's/vendor's value) keyed by the field Name, sent in ONE follow-up message after the record is saved; the field must already be defined in QuickBooks and assigned to Item records, checked up front (400 CUSTOM_FIELD_UNKNOWN, nothing written). If the record saves but a custom field does not, the answer is 502 CUSTOM_FIELD_WRITE_FAILED naming the record Id and which fields applied or failed (never a silent 200); if everything writes but the read-back fails it is 502 CUSTOM_FIELD_READBACK_FAILED. A DefinitionId without a Name is a 400; only Type StringType is accepted. An update may carry only CustomField (SyncToken still checked). Line-level custom fields are not written. Values are limited to 30 characters and may not be empty or blank (400, nothing written). Verified live on QuickBooks Enterprise 24 (2026-09-30)."
1593
1844
  }
1594
1845
  ],
1595
1846
  "unsupported": [
1596
1847
  {
1597
- "case": "Item types other than Service, NonInventory, Inventory, and Group (assemblies, discounts, sales tax items, payment items, fixed assets, other charge, subtotal)",
1848
+ "case": "Item types other than Service, NonInventory, Inventory, Group, other-charge and discount (assemblies, sales tax items, payment items, fixed assets, subtotal)",
1598
1849
  "error": "UNSUPPORTED_BY_DESKTOP",
1599
1850
  "note": "Omitted from query results; a direct get by id on one of these Desktop items returns a 422 UNSUPPORTED_BY_DESKTOP fault."
1600
1851
  },
1601
1852
  {
1602
- "case": "Item create/update",
1853
+ "case": "Creating or updating Group (and Category) items, or updating discount items",
1603
1854
  "error": "UNSUPPORTED_BY_DESKTOP",
1604
- "note": "Lands in a later release."
1855
+ "note": "Group items and discounts are read-only, and Category has no Desktop equivalent. A Desktop other-charge item reads as Type Service and can be updated (it is sent as ItemOtherChargeMod); it cannot be created."
1856
+ },
1857
+ {
1858
+ "case": "Adding purchase-side fields to an existing sales-only Service/NonInventory item",
1859
+ "error": "UNSUPPORTED_BY_DESKTOP",
1860
+ "note": "Desktop rejects the SalesOrPurchase to SalesAndPurchase conversion (error 3170). Include PurchaseDesc, PurchaseCost, ExpenseAccountRef or PrefVendorRef when the item is created."
1861
+ },
1862
+ {
1863
+ "case": "Changing QtyOnHand after creation",
1864
+ "error": "UNSUPPORTED_BY_DESKTOP",
1865
+ "note": "Stock levels change only through inventory adjustments and transactions. (Changing Type after creation is a 400 Invalid Field Value, since a Desktop item's type is fixed.)"
1605
1866
  }
1606
1867
  ]
1607
1868
  },
@@ -1671,7 +1932,7 @@ var CATALOG = {
1671
1932
  {
1672
1933
  "qbo": "Line",
1673
1934
  "support": "partial",
1674
- "note": "JournalEntryLineDetail only. Write splits by PostingType into JournalDebitLine / JournalCreditLine; read interleaves debit then credit lists. Debits must equal credits or create fails UNSUPPORTED_BY_DESKTOP before the Desktop round-trip. Sparse updates cannot modify lines yet (Desktop JE Mod replaces the entire line table when lines are provided \u2014 same out-of-scope stance as Invoice lines / issue #55). JournalEntryLineDetail.Entity: only EntityRef is populated on read \u2014 Desktop's line-level EntityRef carries no entity-kind flag, so we don't stamp a Type (Vendor/Customer/Employee); a wrong guess is worse than omitting it. Set Type yourself on write if you know it; it's accepted and simply not echoed back."
1935
+ "note": "JournalEntryLineDetail only. Write splits by PostingType into JournalDebitLine / JournalCreditLine; read interleaves debit then credit lists. Debits must equal credits or create fails UNSUPPORTED_BY_DESKTOP before the Desktop round-trip. Updates carrying Line send the full table as JournalLineMod (TxnLineID + JournalLineType Debit/Credit): a line with the Id a read returned keeps that Desktop line (and may flip Debit/Credit), a line without an Id is added, and any existing line omitted from the array is deleted \u2014 send the whole array. Fields you omit from a line that carries an Id (account, memo, entity, class) are filled from the current record. Balance is checked over the merged table before anything is sent. An Id that is not a line of the entry is a 400; an Id listed twice is 2010; an empty Line array is refused. Verified live on QuickBooks Enterprise 24 (2026-09-30): Debit/Credit flips and deletion of unlisted lines work. Desktop rejects a Mod whose existing lines are not in stored (ascending TxnLineID) order with 3290, and a read lists debit lines before credit lines, so the gateway sends existing lines in TxnLineID order whatever order you post them in. JournalEntryLineDetail.Entity: only EntityRef is populated on read \u2014 Desktop's line-level EntityRef carries no entity-kind flag, so we don't stamp a Type (Vendor/Customer/Employee); a wrong guess is worse than omitting it. Set Type yourself on write if you know it; it's accepted and simply not echoed back."
1675
1936
  },
1676
1937
  {
1677
1938
  "qbo": "TotalAmt",
@@ -1727,7 +1988,7 @@ var CATALOG = {
1727
1988
  {
1728
1989
  "qbo": "PaymentRefNum",
1729
1990
  "support": "full",
1730
- "note": "Desktop RefNumber: max 20 characters; longer values are rejected up front with a 400 fault (code 2050). Query filtering by PaymentRefNum is not supported yet \u2014 query by Id or date range."
1991
+ "note": "Desktop RefNumber: max 20 characters; longer values are rejected up front with a 400 fault (code 2050). Queryable: WHERE PaymentRefNum = '...' / IN (...) / LIKE 'CHK%' is pushed to QuickBooks as RefNumber / RefNumberFilter (DocNumber is accepted as an alias)."
1731
1992
  },
1732
1993
  {
1733
1994
  "qbo": "TotalAmt",
@@ -1749,7 +2010,7 @@ var CATALOG = {
1749
2010
  {
1750
2011
  "qbo": "Line",
1751
2012
  "support": "partial",
1752
- "note": "LinkedTxn applications to Invoices only; no Line means an unapplied payment (IsAutoApply=false). CreditMemo/Deposit applications land later. AppliedToTxnRet.TxnDate/RefNumber/BalanceRemaining have no honest home in QBO Payment.Line.LinkedTxn ({TxnId, TxnType} only) and are not projected \u2014 re-fetch the invoice for balance/date/doc number."
2013
+ "note": "One Line per Invoice (LinkedTxn[0] = the invoice; on write Amount = the total applied to the invoice, cash plus credit, which is the qbXML PaymentAmount; on read Amount = the cash only). Credits ride inside the invoice Line's LinkedTxn: credit memos applied to that invoice are extra LinkedTxn entries {TxnId, TxnType CreditMemo, Amount = credit applied, a number > 0} and are sent as SetCredit; a credit-only Line (no invoice) is rejected (2020), and so is a credit-only payment (credit memos with TotalAmt omitted or 0): live QB applies the credit and creates no payment, so there is nothing to return; it is refused up front with 422 UNSUPPORTED_BY_DESKTOP (apply credits together with a cash TotalAmt, or in QuickBooks). Read returns the applied credit memos as CreditMemo LinkedTxn entries (Amount positive) from the LinkedTxn Desktop nests inside AppliedToTxnRet (verified live on QB Enterprise 24: the nested LinkedTxn has TxnType CreditMemo and a negative Amount, AppliedToTxnRet/Amount is the cash only, and the request PaymentAmount is cash plus credit). Over-crediting returns 3210 ('The amount you entered is greater than the amount of the credit'). No Line means an unapplied payment (IsAutoApply=false). Deposit applications are not supported. AppliedToTxnRet.TxnDate/RefNumber/BalanceRemaining have no honest home in QBO Payment.Line.LinkedTxn ({TxnId, TxnType} only) and are not projected \u2014 re-fetch the invoice for balance/date/doc number."
1753
2014
  },
1754
2015
  {
1755
2016
  "qbo": "UnappliedAmt",
@@ -1838,7 +2099,7 @@ var CATALOG = {
1838
2099
  {
1839
2100
  "qbo": "AccountingInfoPrefs",
1840
2101
  "support": "partial",
1841
- "note": "ClassTrackingPerTxn/ClassTrackingPerTxnLine \u2190 IsUsingClassTracking (same bool projected to both); TrackDepartments always false (no Desktop Locations)."
2102
+ "note": "ClassTrackingPerTxn/ClassTrackingPerTxnLine \u2190 IsUsingClassTracking (same bool projected to both); TrackDepartments is false, or true when the company file has Departments from classes turned on (Department is then an alias of Class)."
1842
2103
  },
1843
2104
  {
1844
2105
  "qbo": "CurrencyPrefs",
@@ -1896,7 +2157,7 @@ var CATALOG = {
1896
2157
  "note": "Preferences is read/query only in QBO and Desktop \u2014 there is no PreferencesAdd/Mod."
1897
2158
  },
1898
2159
  {
1899
- "case": "Any WHERE clause, or STARTPOSITION/MAXRESULTS",
2160
+ "case": "Any WHERE clause, ORDERBY, COUNT(*), column list, or STARTPOSITION/MAXRESULTS",
1900
2161
  "error": "UNSUPPORTED_QUERY",
1901
2162
  "note": "PreferencesQueryRq takes no filters and always returns the single open company PreferencesRet. Use SELECT * FROM Preferences."
1902
2163
  }
@@ -1937,7 +2198,7 @@ var CATALOG = {
1937
2198
  {
1938
2199
  "qbo": "DocNumber",
1939
2200
  "support": "full",
1940
- "note": "Desktop RefNumber: max 11 characters. A longer value is rejected up front with a 400 fault (code 2050) rather than reaching Desktop. A single quote is allowed; query it with a backslash escape."
2201
+ "note": "Desktop RefNumber: max 11 characters. A longer value is rejected up front with a 400 fault (code 2050) rather than reaching Desktop. A check that is still to be printed (PrintStatus NeedToPrint, which Desktop may default to when PrintStatus is omitted) silently ignores RefNumber, on create and on a sparse DocNumber update alike (200, but no number is stored); send PrintStatus PrintComplete with DocNumber. On a PrintComplete check a DocNumber update changes RefNumber (verified live 2026-09-30). A single quote is allowed; query it with a backslash escape."
1941
2202
  },
1942
2203
  {
1943
2204
  "qbo": "PrivateNote",
@@ -1973,7 +2234,7 @@ var CATALOG = {
1973
2234
  {
1974
2235
  "qbo": "operation=void",
1975
2236
  "support": "partial",
1976
- "note": "POST ?operation=void with {Id, SyncToken}: sends TxnVoidRq (TxnVoidType Check / CreditCardCharge / CreditCardCredit, picked by a read of the record), then re-reads and returns the record. SyncToken is verified against the current EditSequence first (mismatch = 5010). Proven live on QB Enterprise 24 (2026-09-29, Check family): amounts zeroed, PrintStatus becomes PrintComplete, and PrivateNote becomes `VOID: <memo> GJE, RGJE created on MM/DD/YYYY` \u2014 Desktop posts a journal entry and a reversing journal entry dated the void day, whatever the check's date; voiding again succeeds. CreditCardCharge/CreditCardCredit voids are not yet live-tested. The response is whatever Desktop returns on the post-void re-read (nothing is fabricated)."
2237
+ "note": "POST ?operation=void with {Id, SyncToken}: sends TxnVoidRq (TxnVoidType Check / CreditCardCharge / CreditCardCredit, picked by a read of the record), then re-reads and returns the record. SyncToken is verified against the current EditSequence first (mismatch = 5010). Proven live on QB Enterprise 24 (2026-09-29, Check family): amounts zeroed, PrintStatus becomes PrintComplete, and PrivateNote becomes `VOID: <memo> GJE, RGJE created on MM/DD/YYYY` \u2014 Desktop also posts two General Journal entries (live-proven again 2026-09-30, same-day and prior-month checks): a GJE dated the ORIGINAL check date that re-books the original check (Dr expense / Cr bank, memo 'For CHK voided on MM/DD/YYYY'), and a reversing RGJE (ref such as 7R, memo 'Reverse of GJE 7 -- ...') dated the VOID day that undoes it (Dr bank / Cr expense). The zeroed check keeps its TxnDate; the original period still shows the expense (via the GJE) and the reversal lands in the void day's period. Same-day voids net to zero on one date. Voiding again succeeds. Desktop's closing date is not exposed by PreferencesQuery; voids dated back to 2026-07-02 were accepted on the test file. CreditCardCharge/CreditCardCredit voids are not yet live-tested. The response is whatever Desktop returns on the post-void re-read (nothing is fabricated)."
1977
2238
  }
1978
2239
  ],
1979
2240
  "unsupported": [
@@ -2001,6 +2262,17 @@ var CATALOG = {
2001
2262
  "qbo": "VendorRef",
2002
2263
  "support": "full"
2003
2264
  },
2265
+ {
2266
+ "qbo": "ClassRef",
2267
+ "support": "full",
2268
+ "note": "Header-level class (Desktop ClassRef, read and write). Line-level ClassRef is separate."
2269
+ },
2270
+ {
2271
+ "qbo": "DepartmentRef",
2272
+ "support": "none",
2273
+ "note": "UNMAPPED_FIELD by default. With Departments from classes turned on for the company file, the gateway maps it to the header ClassRef (written to it, read from it); sending a different ClassRef as well is a 400.",
2274
+ "error": "UNMAPPED_FIELD"
2275
+ },
2004
2276
  {
2005
2277
  "qbo": "TxnDate",
2006
2278
  "support": "full"
@@ -2034,10 +2306,15 @@ var CATALOG = {
2034
2306
  "qbo": "PrivateNote",
2035
2307
  "support": "full"
2036
2308
  },
2309
+ {
2310
+ "qbo": "CustomField",
2311
+ "support": "partial",
2312
+ "note": "Desktop custom fields (data extensions, OwnerID 0) on the transaction header. Read: Name/StringValue (Type is always StringType; DefinitionId is not available from Desktop). Write: CustomField[{Name, StringValue}] is written as DataExtMod requests (on Desktop Mod both sets a first value and changes one; DataExtAdd fails once a value exists, and a new transaction inherits its customer's/vendor's value) keyed by the field Name, sent in ONE follow-up message after the record is saved; the field must already be defined in QuickBooks and assigned to PurchaseOrder records, checked up front (400 CUSTOM_FIELD_UNKNOWN, nothing written). If the record saves but a custom field does not, the answer is 502 CUSTOM_FIELD_WRITE_FAILED naming the record Id and which fields applied or failed (never a silent 200); if everything writes but the read-back fails it is 502 CUSTOM_FIELD_READBACK_FAILED. A DefinitionId without a Name is a 400; only Type StringType is accepted. An update may carry only CustomField (SyncToken still checked). Line-level custom fields are not written. Values are limited to 30 characters and may not be empty or blank (400, nothing written). Verified live on QuickBooks Enterprise 24 (2026-09-30)."
2313
+ },
2037
2314
  {
2038
2315
  "qbo": "Line",
2039
2316
  "support": "partial",
2040
- "note": "ItemBasedExpenseLineDetail only (PurchaseOrderLineAdd). AccountBasedExpenseLineDetail returns UNSUPPORTED_BY_DESKTOP. ReceivedQty maps from ReceivedQuantity on read (read-only). Sparse updates cannot modify lines yet."
2317
+ "note": "ItemBasedExpenseLineDetail only (PurchaseOrderLineAdd). AccountBasedExpenseLineDetail returns UNSUPPORTED_BY_DESKTOP. ReceivedQty maps from ReceivedQuantity on read (read-only). Updates carrying Line send the full line table (PurchaseOrderLineMod): a line with the Id a read returned keeps that Desktop line (Id = TxnLineID), a line without an Id is added, and any existing line omitted from the array is deleted \u2014 send the whole array. Fields you omit from a line that carries an Id are filled from the current record; changing Qty or UnitPrice without Amount recomputes Amount, and restating Amount alone drops the inherited Rate and Qty. An Id that is not a line of the PO is a 400; an Id listed twice is 2010; an empty Line array is refused. Per-line IsManuallyClosed is not exposed. Verified live on QuickBooks Enterprise 24 (2026-09-30): the Id/new/deleted-line table, qty recompute and OSR child order are accepted."
2041
2318
  },
2042
2319
  {
2043
2320
  "qbo": "TotalAmt",
@@ -2047,7 +2324,7 @@ var CATALOG = {
2047
2324
  {
2048
2325
  "qbo": "POStatus",
2049
2326
  "support": "partial",
2050
- "note": "Open/Closed map to Desktop IsManuallyClosed, a Mod-only element \u2014 PurchaseOrderAdd has no IsManuallyClosed at all. Create with POStatus Open (or omitted) works; POStatus Closed on create returns UNSUPPORTED_BY_DESKTOP (create the PO open, then close it via an update). Closing via sparse update is not wired yet \u2014 POStatus is effectively read-only through TenkeyBridge until that lands."
2327
+ "note": "Open/Closed map to Desktop IsManuallyClosed, a Mod-only element \u2014 PurchaseOrderAdd has no IsManuallyClosed at all. Create with POStatus Open (or omitted) works; POStatus Closed on create returns UNSUPPORTED_BY_DESKTOP (create the PO open, then close it via an update). A sparse update with POStatus Closed sends IsManuallyClosed true (closing the whole PO); POStatus Open sends false (reopens). Any other value is a 400 (2010). An update without POStatus never re-sends the status. Verified live on QuickBooks Enterprise 24 (2026-09-30): closing and reopening both work."
2051
2328
  },
2052
2329
  {
2053
2330
  "qbo": "APAccountRef",
@@ -2180,7 +2457,7 @@ var CATALOG = {
2180
2457
  {
2181
2458
  "case": "Item-line RefundReceipt (SalesItemLineDetail etc.)",
2182
2459
  "error": "UNSUPPORTED_BY_DESKTOP",
2183
- "note": "Desktop has no general item-line refund receipt. Create a CreditMemo and refund via payment/ARRefundCreditCard, or handle cash/check refunds outside this entity."
2460
+ "note": "Desktop has no single transaction that is both the returned goods and the refund: its refund (ARRefundCreditCard) only pays back an existing credit, and a check refund is a separate Check applied to a credit memo. Two calls instead: (1) POST CreditMemo with the returned item lines; (2) POST RefundReceipt with DepositToAccountRef (the card/refund account) and Line[{Amount, LinkedTxn:[{TxnId: the CreditMemo Id, TxnType:CreditMemo}]}]. Refunds by check or cash are recorded in QuickBooks (Customers > Refund) \u2014 TenkeyBridge has no Check-applied-to-credit-memo path."
2184
2461
  },
2185
2462
  {
2186
2463
  "case": "Update / sparse update",
@@ -2232,46 +2509,103 @@ var CATALOG = {
2232
2509
  "group": "platform",
2233
2510
  "read": "partial",
2234
2511
  "write": "none",
2235
- "headline": "Five QBO-compatible reports translated live from Desktop's report engine.",
2236
- "usage": "GET /v3/company/{realmId}/reports/ProfitAndLoss?start_date=2026-01-01&end_date=2026-12-31",
2512
+ "headline": "Twenty QBO-compatible reports translated live from Desktop's report engine: summary, detail, aging, balance and sales reports, all run against QuickBooks Enterprise 24. There is no CashFlow \u2014 Desktop's SDK has no cash-flow report.",
2513
+ "usage": "GET /v3/company/{companyId}/reports/ProfitAndLoss?start_date=2026-01-01&end_date=2026-12-31&summarize_column_by=Month",
2237
2514
  "fields": [
2238
2515
  {
2239
2516
  "qbo": "ProfitAndLoss / BalanceSheet / TrialBalance",
2240
2517
  "support": "full",
2241
- "note": "GeneralSummaryReportQueryRq (ProfitAndLossStandard / BalanceSheetStandard / TrialBalance). Values verbatim from Desktop \u2014 no recomputation."
2518
+ "note": "GeneralSummaryReportQueryRq (ProfitAndLossStandard / BalanceSheetStandard / TrialBalance). Values verbatim from Desktop \u2014 no recomputation. BalanceSheet also takes report_date as an as-of."
2242
2519
  },
2243
2520
  {
2244
2521
  "qbo": "AgedReceivables / AgedPayables",
2245
2522
  "support": "full",
2246
2523
  "note": "AgingReportQueryRq (ARAgingSummary / APAgingSummary). Desktop's file-configured aging buckets come back as columns, honestly."
2247
2524
  },
2525
+ {
2526
+ "qbo": "CustomerBalance / VendorBalance",
2527
+ "support": "full",
2528
+ "note": "CustomerBalanceSummary / VendorBalanceSummary. As-of (report_date). Month (and the other period splits) are accepted; Desktop refuses ReportBasis here."
2529
+ },
2530
+ {
2531
+ "qbo": "CustomerIncome / VendorExpenses",
2532
+ "support": "full",
2533
+ "note": "IncomeByCustomerSummary / ExpenseByVendorSummary."
2534
+ },
2535
+ {
2536
+ "qbo": "CustomerSales / ItemSales (aliases SalesByCustomer / SalesByProduct)",
2537
+ "support": "full",
2538
+ "note": "SalesByCustomerSummary / SalesByItemSummary. ItemSales carries Desktop's extra columns (% of Sales, Avg Price, COGS, Gross Margin)."
2539
+ },
2540
+ {
2541
+ "qbo": "InventoryValuationSummary",
2542
+ "support": "full",
2543
+ "note": "InventoryValuationSummary, as-of (report_date), item filter only. Desktop refuses ReportBasis and SummarizeColumnsBy here."
2544
+ },
2545
+ {
2546
+ "qbo": "ProfitAndLossDetail / GeneralLedger",
2547
+ "support": "partial",
2548
+ "note": "GeneralDetailReportQueryRq (ProfitAndLossDetail / GeneralLedger). QBO detail shape: ColType String/Date/Money with MetaData.ColKey (ColKeys best-effort), every transaction row typed Data, accounts as sections. ColData carries value only (Desktop reports carry no TxnID/ListID, so no id)."
2549
+ },
2550
+ {
2551
+ "qbo": "JournalReport / TransactionList",
2552
+ "support": "partial",
2553
+ "note": "GeneralDetailReportQueryRq Journal / TxnListByDate. ColKeys best-effort. Journal's per-transaction unlabeled subtotals become header-less Sections; TransactionList is a flat Data list. Desktop refuses ReportBasis on both, so accounting_method faults."
2554
+ },
2555
+ {
2556
+ "qbo": "CustomerBalanceDetail / VendorBalanceDetail",
2557
+ "support": "partial",
2558
+ "note": "GeneralDetailReportQueryRq CustomerBalanceDetail / VendorBalanceDetail, as-of (report_date). Desktop returns one section per customer/vendor with its balance and no transaction rows; passed through as-is."
2559
+ },
2560
+ {
2561
+ "qbo": "AgedReceivableDetail / AgedPayableDetail",
2562
+ "support": "partial",
2563
+ "note": "AgingReportQueryRq ARAgingDetail / APAgingDetail, as-of (report_date), with the receivable (customer) or payable (vendor) filter. ColKeys best-effort."
2564
+ },
2248
2565
  {
2249
2566
  "qbo": "start_date / end_date / date_macro",
2250
2567
  "support": "full",
2251
- "note": "ISO dates or QBO date macros (fiscal-relative on both sides, so macros map 1:1). Omit them and you get fiscal year-to-date, matching QBO \u2014 Desktop's own bare default is month-to-date, so TenkeyBridge always sends an explicit period."
2568
+ "note": "ISO dates or QBO date macros (spaced or compact, e.g. Last Month / LastMonth; fiscal-relative on both sides, so macros map 1:1). Omit them and you get fiscal year-to-date, matching QBO \u2014 Desktop's own bare default is month-to-date, so TenkeyBridge always sends an explicit period."
2252
2569
  },
2253
2570
  {
2254
2571
  "qbo": "report_date",
2255
2572
  "support": "full",
2256
- "note": "The aging reports are as-of a single date. Omit it and QBO's default (today) is used."
2573
+ "note": "The as-of reports (aging, balance, inventory valuation, and BalanceSheet) are as-of a single date. Omit it and QBO's default (today) is used."
2257
2574
  },
2258
2575
  {
2259
2576
  "qbo": "accounting_method",
2260
2577
  "support": "partial",
2261
- "note": "Cash/Accrual on the three summary reports. Aging reports reject it \u2014 qbXML has no ReportBasis there.",
2578
+ "note": "Cash/Accrual \u2192 ReportBasis on ProfitAndLoss, BalanceSheet, TrialBalance, ProfitAndLossDetail, GeneralLedger, CustomerBalanceDetail, VendorBalanceDetail and the income/expense/sales summaries. Desktop refuses it (3151 or a parse error) on Journal, TransactionList, the balance summaries, InventoryValuationSummary and the aging reports, so those fault.",
2579
+ "error": "REPORT_UNSUPPORTED_OPTION"
2580
+ },
2581
+ {
2582
+ "qbo": "summarize_column_by",
2583
+ "support": "partial",
2584
+ "note": "Total, Month, Week, Days, Quarter, Year, Customers, Vendors, Classes \u2192 SummarizeColumnsBy on the period summary reports (Customers is refused on CustomerSales/CustomerIncome and Vendors on VendorExpenses, as Desktop refuses them). CustomerBalance/VendorBalance take the period splits only. Detail, aging and inventory reports take Total only.",
2585
+ "error": "REPORT_UNSUPPORTED_OPTION"
2586
+ },
2587
+ {
2588
+ "qbo": "customer / vendor / item / class",
2589
+ "support": "partial",
2590
+ "note": "Comma-separated Ids \u2192 ReportEntityFilter (customer + vendor) / ReportItemFilter / ReportClassFilter. AR reports accept customer only, AP reports vendor only; InventoryValuationSummary accepts item only.",
2262
2591
  "error": "REPORT_UNSUPPORTED_OPTION"
2263
2592
  },
2264
2593
  {
2265
2594
  "qbo": "Column titles",
2266
2595
  "support": "partial",
2267
- "note": "Desktop's own column titles pass through verbatim, so aging buckets read '> 90' where QBO says '91 and over', and a period column reads 'Jan - Dec 26' where QBO says 'Total'. QBO's MetaData.ColKey has no Desktop equivalent and is not invented."
2596
+ "note": "Desktop's own column titles pass through verbatim, so aging buckets read '> 90' where QBO says '91 and over', and a period column reads 'Jan - Dec 26' where QBO says 'Total'. On summary reports QBO's MetaData.ColKey has no Desktop equivalent and is not invented; detail reports derive it from Desktop's column types (ColKeys best-effort \u2014 QBO does not document them)."
2268
2597
  }
2269
2598
  ],
2270
2599
  "unsupported": [
2271
2600
  {
2272
- "case": "columns / customer / vendor / item / class / department / qzurl / adjusted_gain_loss",
2601
+ "case": "CashFlow",
2602
+ "error": "REPORT_UNKNOWN",
2603
+ "note": "QuickBooks Desktop's SDK has no cash-flow report (StatementOfCashFlows is refused with 3110 on every qbXML version)."
2604
+ },
2605
+ {
2606
+ "case": "columns / department / qzurl / adjusted_gain_loss",
2273
2607
  "error": "REPORT_UNSUPPORTED_OPTION",
2274
- "note": "Column and filter customization is v2. Desktop returns its standard report layout."
2608
+ "note": "Column selection has no qbXML equivalent; Desktop has no departments (use class); QuickZoom URLs and multicurrency gain/loss adjustment are QBO-only."
2275
2609
  },
2276
2610
  {
2277
2611
  "case": "aging_period / num_periods / aging_method",
@@ -2279,14 +2613,14 @@ var CATALOG = {
2279
2613
  "note": "Desktop aging buckets are company-file configuration, not request parameters."
2280
2614
  },
2281
2615
  {
2282
- "case": "summarize_column_by other than Total",
2616
+ "case": "summarize_column_by = Employees / ProductsAndServices / Departments / Location",
2283
2617
  "error": "REPORT_UNSUPPORTED_OPTION",
2284
- "note": "qbXML SummarizeColumnsBy exists \u2014 clean v2 upgrade path."
2618
+ "note": "qbXML's SummarizeColumnsBy has no per-item, per-employee or per-location split (ItemType splits by item type, not by item)."
2285
2619
  },
2286
2620
  {
2287
- "case": "other QBO report names (CashFlow, detail/aging-detail variants, \u2026)",
2621
+ "case": "other QBO report names (class/department sales, tax, account list, ...)",
2288
2622
  "error": "REPORT_UNKNOWN",
2289
- "note": "Planned. The fault lists the five supported reports."
2623
+ "note": "Not shipped. The fault lists the supported reports."
2290
2624
  }
2291
2625
  ]
2292
2626
  },
@@ -2302,6 +2636,17 @@ var CATALOG = {
2302
2636
  "qbo": "CustomerRef",
2303
2637
  "support": "full"
2304
2638
  },
2639
+ {
2640
+ "qbo": "ClassRef",
2641
+ "support": "full",
2642
+ "note": "Header-level class (Desktop ClassRef, read and write). Line-level ClassRef is separate."
2643
+ },
2644
+ {
2645
+ "qbo": "DepartmentRef",
2646
+ "support": "none",
2647
+ "note": "UNMAPPED_FIELD by default. With Departments from classes turned on for the company file, the gateway maps it to the header ClassRef (written to it, read from it); sending a different ClassRef as well is a 400.",
2648
+ "error": "UNMAPPED_FIELD"
2649
+ },
2305
2650
  {
2306
2651
  "qbo": "TxnDate",
2307
2652
  "support": "full"
@@ -2343,12 +2688,12 @@ var CATALOG = {
2343
2688
  {
2344
2689
  "qbo": "Line",
2345
2690
  "support": "partial",
2346
- "note": "SalesItemLineDetail, GroupLineDetail, and DescriptionOnly map cleanly; line-level ClassRef and ServiceDate are populated on read; DiscountLineDetail requires a Desktop discount item referenced via DiscountLineDetail.ItemRef; other DetailTypes (e.g. SubTotalLineDetail) return UNSUPPORTED_BY_DESKTOP. Group lines read back as GroupLineDetail without nested line expansion; Desktop discount lines read back as regular item lines referencing the discount item. Updates carrying Line replace the entire line table: every line is re-created with a new line Id and lines omitted from the update are deleted by Desktop (v1 full replacement, #55)."
2691
+ "note": "SalesItemLineDetail, GroupLineDetail, and DescriptionOnly map cleanly; line-level ClassRef and ServiceDate are populated on read; DiscountLineDetail requires a Desktop discount item named by DiscountLineDetail.ItemRef (value = ListID, or name = full name; PercentBased + DiscountPercent sends RatePercent, an amount discount sends Amount); other DetailTypes (e.g. SubTotalLineDetail) return UNSUPPORTED_BY_DESKTOP. Group lines read back as GroupLineDetail without nested line expansion; Desktop discount lines read back as SalesItemLineDetail lines (never DiscountLineDetail) referencing the discount item, with a negative Amount (verified live). An unknown Line.Id returns 3120 (REST 610); a malformed one returns 3000. Updates carrying Line send the full line table, as QBO requires: a line with the Id a read returned keeps that Desktop line (Id = TxnLineID, stable across updates), a line without an Id (or Id 0 / empty) is added, and any existing line omitted from the array is deleted. Send the whole array on sparse updates too; an Id listed twice is rejected (2010). Fields you omit from a line that carries an Id are filled from the current record before the full line is sent (Desktop would otherwise blank them), and line ClassRef and ServiceDate are written (ServiceDate not on Estimate). Re-sending an existing group line returns 422 (UNSUPPORTED_BY_DESKTOP); omit it to delete it and add a new group line without an Id."
2347
2692
  },
2348
2693
  {
2349
2694
  "qbo": "TxnTaxDetail",
2350
2695
  "support": "partial",
2351
- "note": "Set TxnTaxCodeRef explicitly on write; computed TotalTax alone is rejected. On read: TotalTax, TxnTaxCodeRef, and TaxLine[{Amount, TaxLineDetail{TaxRateRef, TaxPercent}}]. NetAmountTaxable never returned. Updatable via sparse update (#55)."
2696
+ "note": "TxnTaxCodeRef on write selects the tax item (Desktop ItemSalesTaxRef). TotalTax alone is accepted but not sent: QuickBooks then applies the customer's default sales tax item (or the company default) and computes the tax itself, so the tax on read can differ from the TotalTax you sent. When it differs, create/update responses carry a non-fatal X-TKB-Warning header (not emitted for /batch items). On read: TotalTax, TxnTaxCodeRef, and TaxLine[{Amount, TaxLineDetail{TaxRateRef, TaxPercent}}]. NetAmountTaxable never returned. Updatable via sparse update (#55)."
2352
2697
  },
2353
2698
  {
2354
2699
  "qbo": "LinkedTxn",
@@ -2358,7 +2703,7 @@ var CATALOG = {
2358
2703
  {
2359
2704
  "qbo": "CustomField",
2360
2705
  "support": "partial",
2361
- "note": "Name/StringValue populated from Desktop custom fields (DataExt); DefinitionId not available from Desktop; read-only for now. Accepted and ignored on write."
2706
+ "note": "Desktop custom fields (data extensions, OwnerID 0) on the transaction header. Read: Name/StringValue (Type is always StringType; DefinitionId is not available from Desktop). Write: CustomField[{Name, StringValue}] is written as DataExtMod requests (on Desktop Mod both sets a first value and changes one; DataExtAdd fails once a value exists, and a new transaction inherits its customer's/vendor's value) keyed by the field Name, sent in ONE follow-up message after the record is saved; the field must already be defined in QuickBooks and assigned to SalesReceipt records, checked up front (400 CUSTOM_FIELD_UNKNOWN, nothing written). If the record saves but a custom field does not, the answer is 502 CUSTOM_FIELD_WRITE_FAILED naming the record Id and which fields applied or failed (never a silent 200); if everything writes but the read-back fails it is 502 CUSTOM_FIELD_READBACK_FAILED. A DefinitionId without a Name is a 400; only Type StringType is accepted. An update may carry only CustomField (SyncToken still checked). Line-level custom fields are not written. Values are limited to 30 characters and may not be empty or blank (400, nothing written). The mechanism was verified live on QuickBooks Enterprise 24 (2026-09-30) on Customer, Vendor, Item, Employee, Invoice and PurchaseOrder; this entity follows the same path."
2362
2707
  },
2363
2708
  {
2364
2709
  "qbo": "TotalAmt",
@@ -2381,11 +2726,42 @@ var CATALOG = {
2381
2726
  "note": "POST ?operation=void with {Id, SyncToken}: sends TxnVoidRq (TxnVoidType SalesReceipt), then re-reads and returns the record. SyncToken is verified against the current EditSequence first (mismatch = 5010). Proven live on QB Enterprise 24 (2026-09-29): the re-read shows amounts and line Qty zeroed, PrivateNote prefixed `VOID: `, TxnDate unchanged, a new SyncToken; voiding again succeeds. The response is whatever Desktop returns on the post-void re-read (nothing is fabricated)."
2382
2727
  }
2383
2728
  ],
2729
+ "unsupported": []
2730
+ },
2731
+ "Tag": {
2732
+ "entity": "Tag",
2733
+ "verdict": "gap",
2734
+ "group": "gaps",
2735
+ "read": "none",
2736
+ "write": "none",
2737
+ "headline": "QBO Tags (and Tag classifications) are a cloud-only labeling feature \u2014 QuickBooks Desktop has no free-form tag object, and its nearest dimensional list (Class) is already exposed as Class.",
2738
+ "fields": [],
2384
2739
  "unsupported": [
2385
2740
  {
2386
- "case": "TxnTaxDetail.TotalTax supplied without TxnTaxCodeRef",
2741
+ "case": "read",
2742
+ "error": "UNSUPPORTED_BY_DESKTOP",
2743
+ "note": "qbXML has no Tag or TagClassification message; Desktop has no equivalent many-to-many labeling of transactions.",
2744
+ "workaround": "Use Class for a single dimension per transaction line (live in TenkeyBridge), or keep your labels in your own system keyed by the TenkeyBridge entity Id."
2745
+ },
2746
+ {
2747
+ "case": "query",
2387
2748
  "error": "UNSUPPORTED_BY_DESKTOP",
2388
- "note": "Desktop cannot honor a computed tax total. Set TxnTaxDetail.TxnTaxCodeRef or per-line TaxCodeRef explicitly. See COMPATIBILITY.md."
2749
+ "note": "There is no Desktop tag list to query."
2750
+ },
2751
+ {
2752
+ "case": "create",
2753
+ "error": "UNSUPPORTED_BY_DESKTOP",
2754
+ "note": "Desktop cannot store tags, so none can be created."
2755
+ },
2756
+ {
2757
+ "case": "update",
2758
+ "error": "UNSUPPORTED_BY_DESKTOP",
2759
+ "note": "Desktop cannot store tags, so none can be updated."
2760
+ },
2761
+ {
2762
+ "case": "delete",
2763
+ "error": "UNSUPPORTED_BY_DESKTOP",
2764
+ "note": "Desktop cannot store tags, so none can be deleted."
2389
2765
  }
2390
2766
  ]
2391
2767
  },
@@ -2500,6 +2876,43 @@ var CATALOG = {
2500
2876
  ],
2501
2877
  "unsupported": []
2502
2878
  },
2879
+ "TaxPayment": {
2880
+ "entity": "TaxPayment",
2881
+ "verdict": "planned",
2882
+ "group": "planned",
2883
+ "read": "none",
2884
+ "write": "none",
2885
+ "headline": "Desktop records sales-tax remittances as SalesTaxPaymentCheck (qbXML SalesTaxPaymentCheckQuery), a real analog \u2014 but it is not mapped yet because TenkeyBridge will not guess QBO's TaxPayment wire shape.",
2886
+ "fields": [],
2887
+ "unsupported": [
2888
+ {
2889
+ "case": "read",
2890
+ "error": "UNSUPPORTED_BY_DESKTOP",
2891
+ "note": "Not implemented. Evaluated in wave 3: the Desktop record (SalesTaxPaymentCheckRet: bank AccountRef, tax-agency PayeeEntityRef, per-item SalesTaxPaymentCheckLineRet amounts) maps conceptually to QBO TaxPayment, but QBO's TaxPayment JSON is thinly documented and read-only, so a field-by-field mapping would be guesswork rather than a verified contract.",
2892
+ "workaround": "Sales-tax payments made in Desktop are not visible through TenkeyBridge today. Pay-tax events that are recorded as ordinary checks appear under Purchase."
2893
+ },
2894
+ {
2895
+ "case": "query",
2896
+ "error": "UNSUPPORTED_BY_DESKTOP",
2897
+ "note": "Not implemented; see read."
2898
+ },
2899
+ {
2900
+ "case": "create",
2901
+ "error": "UNSUPPORTED_BY_DESKTOP",
2902
+ "note": "QBO's TaxPayment is read-only via the API; TenkeyBridge matches that."
2903
+ },
2904
+ {
2905
+ "case": "update",
2906
+ "error": "UNSUPPORTED_BY_DESKTOP",
2907
+ "note": "QBO's TaxPayment is read-only via the API; TenkeyBridge matches that."
2908
+ },
2909
+ {
2910
+ "case": "delete",
2911
+ "error": "UNSUPPORTED_BY_DESKTOP",
2912
+ "note": "QBO's TaxPayment is read-only via the API; TenkeyBridge matches that."
2913
+ }
2914
+ ]
2915
+ },
2503
2916
  "TaxRate": {
2504
2917
  "entity": "TaxRate",
2505
2918
  "verdict": "live",
@@ -2682,6 +3095,12 @@ var CATALOG = {
2682
3095
  "qbo": "ClassRef",
2683
3096
  "support": "full"
2684
3097
  },
3098
+ {
3099
+ "qbo": "DepartmentRef",
3100
+ "support": "none",
3101
+ "note": "UNMAPPED_FIELD by default. With Departments from classes turned on for the company file, the gateway maps it to the header ClassRef (written to it, read from it); sending a different ClassRef as well is a 400.",
3102
+ "error": "UNMAPPED_FIELD"
3103
+ },
2685
3104
  {
2686
3105
  "qbo": "Description",
2687
3106
  "support": "full",
@@ -2820,7 +3239,7 @@ var CATALOG = {
2820
3239
  {
2821
3240
  "case": "Delete",
2822
3241
  "error": "UNSUPPORTED_BY_DESKTOP",
2823
- "note": '"Transfer" is not a valid qbXML TxnDelType enum value, so delete is not wired for this entity.'
3242
+ "note": '"Transfer" is not a valid qbXML TxnDelType enum value (verified live: status 3110), so delete is not wired for this entity.'
2824
3243
  }
2825
3244
  ]
2826
3245
  },
@@ -2907,7 +3326,7 @@ var CATALOG = {
2907
3326
  {
2908
3327
  "qbo": "CustomField",
2909
3328
  "support": "partial",
2910
- "note": "Name/StringValue populated from Desktop custom fields (DataExt); DefinitionId not available from Desktop; read-only for now. Accepted and ignored on write."
3329
+ "note": "Desktop custom fields (data extensions, OwnerID 0) on the record. Read: Name/StringValue (Type is always StringType; DefinitionId is not available from Desktop). Write: CustomField[{Name, StringValue}] is written as DataExtMod requests (on Desktop Mod both sets a first value and changes one; DataExtAdd fails once a value exists, and a new transaction inherits its customer's/vendor's value) keyed by the field Name, sent in ONE follow-up message after the record is saved; the field must already be defined in QuickBooks and assigned to Vendor records, checked up front (400 CUSTOM_FIELD_UNKNOWN, nothing written). If the record saves but a custom field does not, the answer is 502 CUSTOM_FIELD_WRITE_FAILED naming the record Id and which fields applied or failed (never a silent 200); if everything writes but the read-back fails it is 502 CUSTOM_FIELD_READBACK_FAILED. A DefinitionId without a Name is a 400; only Type StringType is accepted. An update may carry only CustomField (SyncToken still checked). Line-level custom fields are not written. Values are limited to 30 characters and may not be empty or blank (400, nothing written). Verified live on QuickBooks Enterprise 24 (2026-09-30)."
2911
3330
  },
2912
3331
  {
2913
3332
  "qbo": "CurrencyRef",
@@ -2980,6 +3399,43 @@ var CATALOG = {
2980
3399
  }
2981
3400
  ],
2982
3401
  "unsupported": []
3402
+ },
3403
+ "VendorType": {
3404
+ "entity": "VendorType",
3405
+ "verdict": "gap",
3406
+ "group": "gaps",
3407
+ "read": "none",
3408
+ "write": "none",
3409
+ "headline": "QBO has no VendorType entity to be compatible with \u2014 Desktop's vendor-type list (VendorTypeAdd/Query) has no counterpart in the QBO Accounting API, so TenkeyBridge does not expose it.",
3410
+ "fields": [],
3411
+ "unsupported": [
3412
+ {
3413
+ "case": "read",
3414
+ "error": "UNSUPPORTED_BY_DESKTOP",
3415
+ "note": "The QBO Accounting API has no VendorType resource. Desktop's vendor-type list exists in qbXML, but surfacing it would invent a QBO entity that QBO clients and SDKs do not know.",
3416
+ "workaround": "Desktop's VendorTypeRef on a vendor is not surfaced on the Vendor entity either. Keep vendor classification in your own system keyed by the TenkeyBridge vendor Id."
3417
+ },
3418
+ {
3419
+ "case": "query",
3420
+ "error": "UNSUPPORTED_BY_DESKTOP",
3421
+ "note": "No QBO VendorType resource to mirror, so no query is exposed."
3422
+ },
3423
+ {
3424
+ "case": "create",
3425
+ "error": "UNSUPPORTED_BY_DESKTOP",
3426
+ "note": "No QBO VendorType resource to mirror, so no create is exposed."
3427
+ },
3428
+ {
3429
+ "case": "update",
3430
+ "error": "UNSUPPORTED_BY_DESKTOP",
3431
+ "note": "No QBO VendorType resource to mirror, so no update is exposed."
3432
+ },
3433
+ {
3434
+ "case": "delete",
3435
+ "error": "UNSUPPORTED_BY_DESKTOP",
3436
+ "note": "No QBO VendorType resource to mirror, so no delete is exposed."
3437
+ }
3438
+ ]
2983
3439
  }
2984
3440
  };
2985
3441
 
@@ -3108,10 +3564,10 @@ function registerTools(server, client) {
3108
3564
  server.registerTool(
3109
3565
  "query",
3110
3566
  {
3111
- description: "Run a QBO-style query against the connected QuickBooks Desktop company file. Supports one WHERE condition plus startPosition/maxResults paging. Check the compat://catalog resource for entity support first.",
3567
+ description: "Run a QBO-style query against the connected QuickBooks Desktop company file. Supports AND-joined WHERE conditions (=, !=, <, >, <=, >=, IN, LIKE; no OR) plus startPosition/maxResults paging. Check the compat://catalog resource for entity support first.",
3112
3568
  inputSchema: {
3113
3569
  entity: entityArg,
3114
- where: z.string().optional().describe(`Single WHERE condition in QBO query grammar, e.g. "TxnDate >= '2026-01-01'"`),
3570
+ where: z.string().optional().describe(`WHERE conditions in QBO query grammar, joined with AND (there is no OR), e.g. "CustomerRef = '12' AND TxnDate >= '2026-01-01'"`),
3115
3571
  startPosition: z.number().int().positive().optional(),
3116
3572
  maxResults: z.number().int().positive().max(1e3).optional()
3117
3573
  }
@@ -3217,10 +3673,34 @@ function registerTools(server, client) {
3217
3673
  }
3218
3674
  }
3219
3675
  );
3676
+ server.registerTool(
3677
+ "void",
3678
+ {
3679
+ description: 'Void a transaction by Id + SyncToken (QBO ?operation=void). Supported: Invoice, SalesReceipt, Purchase, BillPayment. Destructive: on QuickBooks Desktop the record stays but its totals are zeroed and its memo is prefixed "VOID:". Returns the post-void record. Fetch the current SyncToken with the get tool first.',
3680
+ inputSchema: {
3681
+ entity: entityArg,
3682
+ id: z.string(),
3683
+ syncToken: z.string().describe("Current SyncToken of the transaction (required; a stale token is rejected).")
3684
+ }
3685
+ },
3686
+ async ({ entity, id, syncToken }) => {
3687
+ const name = resolveEntityName(entity);
3688
+ if (!name) return unknownEntity(entity);
3689
+ if (!ENTITIES2[name].voidable) {
3690
+ const supported = Object.values(ENTITIES2).filter((e) => e.voidable).map((e) => e.name).join(", ");
3691
+ return fail(`${name} cannot be voided through TenkeyBridge. Voidable entities: ${supported}.`);
3692
+ }
3693
+ try {
3694
+ return ok(await accessor(client, name).void({ Id: id, SyncToken: syncToken }));
3695
+ } catch (err) {
3696
+ return failure(err);
3697
+ }
3698
+ }
3699
+ );
3220
3700
  }
3221
3701
 
3222
3702
  // src/version.ts
3223
- var PKG_VERSION = "0.2.0";
3703
+ var PKG_VERSION = "0.4.0";
3224
3704
 
3225
3705
  // src/server.ts
3226
3706
  var SERVER_NAME = "tenkeybridge";
@@ -3234,8 +3714,9 @@ function buildServer(client) {
3234
3714
  // src/cli.ts
3235
3715
  async function main() {
3236
3716
  const config = loadConfig(process.env);
3717
+ for (const note of config.deprecations) console.error(`tenkeybridge-mcp: ${note}`);
3237
3718
  const client = new TenkeyBridgeClient({
3238
- realmId: config.realmId,
3719
+ companyId: config.companyId,
3239
3720
  ...config.baseUrl ? { baseUrl: config.baseUrl } : {},
3240
3721
  auth: "accessToken" in config.auth ? config.auth : {
3241
3722
  ...config.auth,
@@ -3254,7 +3735,7 @@ async function main() {
3254
3735
  void _seamCheck;
3255
3736
  const server = buildServer(client);
3256
3737
  await server.connect(new StdioServerTransport());
3257
- console.error(`tenkeybridge-mcp: serving realm ${config.realmId}`);
3738
+ console.error(`tenkeybridge-mcp: serving company ${config.companyId}`);
3258
3739
  }
3259
3740
  main().catch((err) => {
3260
3741
  console.error(`tenkeybridge-mcp: ${err instanceof Error ? err.message : String(err)}`);