@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/README.md +4 -4
- package/dist/cli.js +623 -142
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +620 -140
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -3
- package/dist/index.d.ts +9 -3
- package/dist/index.js +620 -140
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -144,14 +144,14 @@ var CATALOG = {
|
|
|
144
144
|
"group": "gaps",
|
|
145
145
|
"read": "none",
|
|
146
146
|
"write": "none",
|
|
147
|
-
"headline": "QuickBooks Desktop
|
|
147
|
+
"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.",
|
|
148
148
|
"fields": [],
|
|
149
149
|
"unsupported": [
|
|
150
150
|
{
|
|
151
151
|
"case": "read",
|
|
152
152
|
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
153
153
|
"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.",
|
|
154
|
-
"workaround": "Store documents in your own system keyed by the TenkeyBridge entity Id
|
|
154
|
+
"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."
|
|
155
155
|
},
|
|
156
156
|
{
|
|
157
157
|
"case": "query",
|
|
@@ -182,7 +182,7 @@ var CATALOG = {
|
|
|
182
182
|
"read": "full",
|
|
183
183
|
"write": "full",
|
|
184
184
|
"headline": "Batch envelope \u2014 up to 30 create/update/delete/query operations in one request, executed sequentially with per-item faults.",
|
|
185
|
-
"usage": "POST /v3/company/{
|
|
185
|
+
"usage": "POST /v3/company/{companyId}/batch",
|
|
186
186
|
"fields": [
|
|
187
187
|
{
|
|
188
188
|
"qbo": "bId",
|
|
@@ -202,7 +202,7 @@ var CATALOG = {
|
|
|
202
202
|
{
|
|
203
203
|
"qbo": "Query items",
|
|
204
204
|
"support": "full",
|
|
205
|
-
"note": "Full /query parity: the
|
|
205
|
+
"note": "Full /query parity: the same query language (AND-joined WHERE with =, !=, <, >, <=, >=, IN, LIKE; ORDERBY; COUNT(*); column lists; STARTPOSITION/MAXRESULTS), iterator-backed deep pages."
|
|
206
206
|
},
|
|
207
207
|
{
|
|
208
208
|
"qbo": "per-item faults",
|
|
@@ -229,7 +229,7 @@ var CATALOG = {
|
|
|
229
229
|
{
|
|
230
230
|
"case": "entity CRUD or /query on Batch itself",
|
|
231
231
|
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
232
|
-
"note": "Batch is a platform endpoint, not an entity \u2014 POST /v3/company/{
|
|
232
|
+
"note": "Batch is a platform endpoint, not an entity \u2014 POST /v3/company/{companyId}/batch."
|
|
233
233
|
}
|
|
234
234
|
]
|
|
235
235
|
},
|
|
@@ -285,7 +285,7 @@ var CATALOG = {
|
|
|
285
285
|
{
|
|
286
286
|
"qbo": "CustomField",
|
|
287
287
|
"support": "partial",
|
|
288
|
-
"note": "Name/StringValue
|
|
288
|
+
"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'."
|
|
289
289
|
},
|
|
290
290
|
{
|
|
291
291
|
"qbo": "CurrencyRef",
|
|
@@ -442,12 +442,12 @@ var CATALOG = {
|
|
|
442
442
|
"case": "query \u2014 SELECT * cannot enumerate every budget",
|
|
443
443
|
"error": "UNSUPPORTED_QUERY",
|
|
444
444
|
"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.",
|
|
445
|
-
"workaround": "Fetch it by id: GET /v3/company/{
|
|
445
|
+
"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."
|
|
446
446
|
},
|
|
447
447
|
{
|
|
448
|
-
"case": "query \u2014 WHERE on anything but Id",
|
|
448
|
+
"case": "query \u2014 WHERE on anything but Id, ORDERBY, COUNT(*), column lists",
|
|
449
449
|
"error": "UNSUPPORTED_QUERY",
|
|
450
|
-
"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.",
|
|
450
|
+
"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.",
|
|
451
451
|
"workaround": "Fetch the window with SELECT * FROM Budget and filter the (at most six) rows client-side."
|
|
452
452
|
},
|
|
453
453
|
{
|
|
@@ -491,7 +491,7 @@ var CATALOG = {
|
|
|
491
491
|
"read": "full",
|
|
492
492
|
"write": "none",
|
|
493
493
|
"headline": "Change Data Capture \u2014 one poll returns changed + deleted records across entities.",
|
|
494
|
-
"usage": "GET /v3/company/{
|
|
494
|
+
"usage": "GET /v3/company/{companyId}/cdc?entities=Invoice,Customer&changedSince=2026-07-01",
|
|
495
495
|
"fields": [
|
|
496
496
|
{
|
|
497
497
|
"qbo": "entities",
|
|
@@ -608,7 +608,7 @@ var CATALOG = {
|
|
|
608
608
|
"group": "company",
|
|
609
609
|
"read": "full",
|
|
610
610
|
"write": "none",
|
|
611
|
-
"headline": "Read-only; Id equals the
|
|
611
|
+
"headline": "Read-only; Id equals the Company ID, no Desktop write path",
|
|
612
612
|
"fields": [
|
|
613
613
|
{
|
|
614
614
|
"qbo": "CompanyName",
|
|
@@ -691,12 +691,51 @@ var CATALOG = {
|
|
|
691
691
|
"note": "CompanyInfo is read/query only \u2014 there is exactly one company record, and Desktop has no API to create or modify it."
|
|
692
692
|
},
|
|
693
693
|
{
|
|
694
|
-
"case": "Any WHERE clause, or STARTPOSITION/MAXRESULTS",
|
|
694
|
+
"case": "Any WHERE clause, ORDERBY, COUNT(*), column list, or STARTPOSITION/MAXRESULTS",
|
|
695
695
|
"error": "UNSUPPORTED_QUERY",
|
|
696
696
|
"note": "CompanyQueryRq takes no filters and always returns the single open company record. Use SELECT * FROM CompanyInfo."
|
|
697
697
|
}
|
|
698
698
|
]
|
|
699
699
|
},
|
|
700
|
+
"CreditCardPayment": {
|
|
701
|
+
"entity": "CreditCardPayment",
|
|
702
|
+
"verdict": "gap",
|
|
703
|
+
"group": "gaps",
|
|
704
|
+
"read": "none",
|
|
705
|
+
"write": "none",
|
|
706
|
+
"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.",
|
|
707
|
+
"fields": [],
|
|
708
|
+
"unsupported": [
|
|
709
|
+
{
|
|
710
|
+
"case": "read",
|
|
711
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
712
|
+
"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.",
|
|
713
|
+
"workaround": "Read the same events as Transfer (ToAccountRef = the credit card account) or as a Purchase of type Check. Both are live in TenkeyBridge."
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
"case": "query",
|
|
717
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
718
|
+
"note": "No Desktop CreditCardPayment exists to query; card paydowns appear under Transfer or Purchase.",
|
|
719
|
+
"workaround": "Query Transfer or Purchase and filter client-side by the credit card account."
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
"case": "create",
|
|
723
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
724
|
+
"note": "TenkeyBridge will not guess which Desktop transaction to create in place of a CreditCardPayment.",
|
|
725
|
+
"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."
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
"case": "update",
|
|
729
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
730
|
+
"note": "No Desktop CreditCardPayment to update; update the Transfer or Purchase instead."
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
"case": "delete",
|
|
734
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
735
|
+
"note": "No Desktop CreditCardPayment to delete; delete the Purchase instead (Transfer cannot be deleted through qbXML)."
|
|
736
|
+
}
|
|
737
|
+
]
|
|
738
|
+
},
|
|
700
739
|
"CreditMemo": {
|
|
701
740
|
"entity": "CreditMemo",
|
|
702
741
|
"verdict": "live",
|
|
@@ -709,6 +748,17 @@ var CATALOG = {
|
|
|
709
748
|
"qbo": "CustomerRef",
|
|
710
749
|
"support": "full"
|
|
711
750
|
},
|
|
751
|
+
{
|
|
752
|
+
"qbo": "ClassRef",
|
|
753
|
+
"support": "full",
|
|
754
|
+
"note": "Header-level class (Desktop ClassRef, read and write). Line-level ClassRef is separate."
|
|
755
|
+
},
|
|
756
|
+
{
|
|
757
|
+
"qbo": "DepartmentRef",
|
|
758
|
+
"support": "none",
|
|
759
|
+
"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.",
|
|
760
|
+
"error": "UNMAPPED_FIELD"
|
|
761
|
+
},
|
|
712
762
|
{
|
|
713
763
|
"qbo": "TxnDate",
|
|
714
764
|
"support": "full"
|
|
@@ -742,6 +792,11 @@ var CATALOG = {
|
|
|
742
792
|
"qbo": "PrivateNote",
|
|
743
793
|
"support": "full"
|
|
744
794
|
},
|
|
795
|
+
{
|
|
796
|
+
"qbo": "CustomField",
|
|
797
|
+
"support": "partial",
|
|
798
|
+
"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."
|
|
799
|
+
},
|
|
745
800
|
{
|
|
746
801
|
"qbo": "CustomerMemo",
|
|
747
802
|
"support": "full",
|
|
@@ -750,12 +805,12 @@ var CATALOG = {
|
|
|
750
805
|
{
|
|
751
806
|
"qbo": "Line",
|
|
752
807
|
"support": "partial",
|
|
753
|
-
"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
|
|
808
|
+
"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."
|
|
754
809
|
},
|
|
755
810
|
{
|
|
756
811
|
"qbo": "TxnTaxDetail",
|
|
757
812
|
"support": "partial",
|
|
758
|
-
"note": "
|
|
813
|
+
"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)."
|
|
759
814
|
},
|
|
760
815
|
{
|
|
761
816
|
"qbo": "LinkedTxn",
|
|
@@ -785,15 +840,10 @@ var CATALOG = {
|
|
|
785
840
|
}
|
|
786
841
|
],
|
|
787
842
|
"unsupported": [
|
|
788
|
-
{
|
|
789
|
-
"case": "TxnTaxDetail.TotalTax supplied without TxnTaxCodeRef",
|
|
790
|
-
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
791
|
-
"note": "Desktop cannot honor a computed tax total. Set TxnTaxDetail.TxnTaxCodeRef or per-line TaxCodeRef explicitly. See COMPATIBILITY.md."
|
|
792
|
-
},
|
|
793
843
|
{
|
|
794
844
|
"case": "Line.DiscountLineDetail without an ItemRef (bare-percentage or amount-off discounts)",
|
|
795
845
|
"error": "MISSING_REQUIRED_DESKTOP_ITEM",
|
|
796
|
-
"note": "Desktop discounts are items. Create a discount item in
|
|
846
|
+
"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."
|
|
797
847
|
},
|
|
798
848
|
{
|
|
799
849
|
"case": "Nested/grouped line types other than SalesItemLineDetail, DiscountLineDetail, GroupLineDetail, and DescriptionOnly",
|
|
@@ -918,7 +968,7 @@ var CATALOG = {
|
|
|
918
968
|
{
|
|
919
969
|
"qbo": "CustomField",
|
|
920
970
|
"support": "partial",
|
|
921
|
-
"note": "Name/StringValue
|
|
971
|
+
"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)."
|
|
922
972
|
},
|
|
923
973
|
{
|
|
924
974
|
"qbo": "CurrencyRef",
|
|
@@ -987,9 +1037,10 @@ var CATALOG = {
|
|
|
987
1037
|
],
|
|
988
1038
|
"unsupported": [
|
|
989
1039
|
{
|
|
990
|
-
"case": "Create or
|
|
1040
|
+
"case": "Create, update or deactivate",
|
|
991
1041
|
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
992
|
-
"note": "QBO's CustomerType is read-only via the API
|
|
1042
|
+
"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.",
|
|
1043
|
+
"workaround": "Create, rename or deactivate the type in QuickBooks Desktop itself; the change shows up on the next read."
|
|
993
1044
|
}
|
|
994
1045
|
]
|
|
995
1046
|
},
|
|
@@ -999,35 +1050,84 @@ var CATALOG = {
|
|
|
999
1050
|
"group": "gaps",
|
|
1000
1051
|
"read": "none",
|
|
1001
1052
|
"write": "none",
|
|
1002
|
-
"headline": "
|
|
1003
|
-
"fields": [
|
|
1053
|
+
"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).",
|
|
1054
|
+
"fields": [
|
|
1055
|
+
{
|
|
1056
|
+
"qbo": "Id",
|
|
1057
|
+
"support": "partial",
|
|
1058
|
+
"note": "Only with Departments from classes on: the Class ListID."
|
|
1059
|
+
},
|
|
1060
|
+
{
|
|
1061
|
+
"qbo": "Name",
|
|
1062
|
+
"support": "partial",
|
|
1063
|
+
"note": "Only with Departments from classes on: the Class Name (31 characters max)."
|
|
1064
|
+
},
|
|
1065
|
+
{
|
|
1066
|
+
"qbo": "SubDepartment",
|
|
1067
|
+
"support": "partial",
|
|
1068
|
+
"note": "Only with Departments from classes on: read-only, true when the class has a parent."
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
"qbo": "ParentRef",
|
|
1072
|
+
"support": "partial",
|
|
1073
|
+
"note": "Only with Departments from classes on: the parent class."
|
|
1074
|
+
},
|
|
1075
|
+
{
|
|
1076
|
+
"qbo": "FullyQualifiedName",
|
|
1077
|
+
"support": "partial",
|
|
1078
|
+
"note": "Only with Departments from classes on: the class full name (Parent:Child). Read-only."
|
|
1079
|
+
},
|
|
1080
|
+
{
|
|
1081
|
+
"qbo": "Active",
|
|
1082
|
+
"support": "partial",
|
|
1083
|
+
"note": "Only with Departments from classes on: class IsActive. Deactivate with Active:false."
|
|
1084
|
+
},
|
|
1085
|
+
{
|
|
1086
|
+
"qbo": "SyncToken",
|
|
1087
|
+
"support": "partial",
|
|
1088
|
+
"note": "Only with Departments from classes on: the class EditSequence."
|
|
1089
|
+
},
|
|
1090
|
+
{
|
|
1091
|
+
"qbo": "MetaData",
|
|
1092
|
+
"support": "partial",
|
|
1093
|
+
"note": "Only with Departments from classes on: class TimeCreated / TimeModified."
|
|
1094
|
+
}
|
|
1095
|
+
],
|
|
1004
1096
|
"unsupported": [
|
|
1005
1097
|
{
|
|
1006
1098
|
"case": "read",
|
|
1007
1099
|
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
1008
|
-
"note": "Re-audited 2026-07-29 against the qbxmlops130 message set: qbXML has no Department or Location list
|
|
1009
|
-
"workaround": "
|
|
1100
|
+
"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.",
|
|
1101
|
+
"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."
|
|
1010
1102
|
},
|
|
1011
1103
|
{
|
|
1012
1104
|
"case": "query",
|
|
1013
1105
|
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
1014
|
-
"note": "
|
|
1015
|
-
"workaround": "
|
|
1106
|
+
"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.",
|
|
1107
|
+
"workaround": "Turn on Departments from classes, or query Class directly."
|
|
1016
1108
|
},
|
|
1017
1109
|
{
|
|
1018
1110
|
"case": "create",
|
|
1019
1111
|
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
1020
|
-
"note": "
|
|
1112
|
+
"note": "Off by default. With Departments from classes on, creating a Department creates a Class (ParentRef makes it a sub-class).",
|
|
1113
|
+
"workaround": "Turn on Departments from classes, or create a Class."
|
|
1021
1114
|
},
|
|
1022
1115
|
{
|
|
1023
1116
|
"case": "update",
|
|
1024
1117
|
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
1025
|
-
"note": "
|
|
1118
|
+
"note": "Off by default. With Departments from classes on, an update edits the Class (sparse; Name, Active, ParentRef).",
|
|
1119
|
+
"workaround": "Turn on Departments from classes, or update the Class."
|
|
1026
1120
|
},
|
|
1027
1121
|
{
|
|
1028
1122
|
"case": "delete",
|
|
1029
1123
|
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
1030
|
-
"note": "Desktop
|
|
1124
|
+
"note": "Always unsupported: a Desktop class cannot be deleted through qbXML. Deactivate with Active:false."
|
|
1125
|
+
},
|
|
1126
|
+
{
|
|
1127
|
+
"case": "DepartmentRef on a transaction",
|
|
1128
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
1129
|
+
"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.",
|
|
1130
|
+
"workaround": "Set ClassRef on each line for those transactions."
|
|
1031
1131
|
}
|
|
1032
1132
|
]
|
|
1033
1133
|
},
|
|
@@ -1054,12 +1154,12 @@ var CATALOG = {
|
|
|
1054
1154
|
{
|
|
1055
1155
|
"qbo": "Line",
|
|
1056
1156
|
"support": "partial",
|
|
1057
|
-
"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.
|
|
1157
|
+
"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."
|
|
1058
1158
|
},
|
|
1059
1159
|
{
|
|
1060
1160
|
"qbo": "CashBack",
|
|
1061
|
-
"support": "
|
|
1062
|
-
"note": "
|
|
1161
|
+
"support": "partial",
|
|
1162
|
+
"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."
|
|
1063
1163
|
},
|
|
1064
1164
|
{
|
|
1065
1165
|
"qbo": "TotalAmt",
|
|
@@ -1086,8 +1186,8 @@ var CATALOG = {
|
|
|
1086
1186
|
"verdict": "live",
|
|
1087
1187
|
"group": "lists",
|
|
1088
1188
|
"read": "full",
|
|
1089
|
-
"write": "
|
|
1090
|
-
"headline": "Read/query
|
|
1189
|
+
"write": "partial",
|
|
1190
|
+
"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",
|
|
1091
1191
|
"fields": [
|
|
1092
1192
|
{
|
|
1093
1193
|
"qbo": "GivenName",
|
|
@@ -1107,7 +1207,8 @@ var CATALOG = {
|
|
|
1107
1207
|
},
|
|
1108
1208
|
{
|
|
1109
1209
|
"qbo": "DisplayName",
|
|
1110
|
-
"support": "
|
|
1210
|
+
"support": "partial",
|
|
1211
|
+
"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)."
|
|
1111
1212
|
},
|
|
1112
1213
|
{
|
|
1113
1214
|
"qbo": "PrintOnCheckName",
|
|
@@ -1116,7 +1217,8 @@ var CATALOG = {
|
|
|
1116
1217
|
},
|
|
1117
1218
|
{
|
|
1118
1219
|
"qbo": "Active",
|
|
1119
|
-
"support": "full"
|
|
1220
|
+
"support": "full",
|
|
1221
|
+
"note": "Deactivate with a sparse update of Active:false; Desktop employees cannot be deleted through qbXML."
|
|
1120
1222
|
},
|
|
1121
1223
|
{
|
|
1122
1224
|
"qbo": "PrimaryPhone",
|
|
@@ -1132,7 +1234,8 @@ var CATALOG = {
|
|
|
1132
1234
|
},
|
|
1133
1235
|
{
|
|
1134
1236
|
"qbo": "PrimaryAddr",
|
|
1135
|
-
"support": "full"
|
|
1237
|
+
"support": "full",
|
|
1238
|
+
"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."
|
|
1136
1239
|
},
|
|
1137
1240
|
{
|
|
1138
1241
|
"qbo": "HiredDate",
|
|
@@ -1148,12 +1251,24 @@ var CATALOG = {
|
|
|
1148
1251
|
},
|
|
1149
1252
|
{
|
|
1150
1253
|
"qbo": "Gender",
|
|
1151
|
-
"support": "full"
|
|
1254
|
+
"support": "full",
|
|
1255
|
+
"note": "Male or Female."
|
|
1256
|
+
},
|
|
1257
|
+
{
|
|
1258
|
+
"qbo": "SSN",
|
|
1259
|
+
"support": "partial",
|
|
1260
|
+
"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."
|
|
1152
1261
|
},
|
|
1153
1262
|
{
|
|
1154
1263
|
"qbo": "CustomField",
|
|
1155
1264
|
"support": "partial",
|
|
1156
|
-
"note": "Name/StringValue
|
|
1265
|
+
"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)."
|
|
1266
|
+
},
|
|
1267
|
+
{
|
|
1268
|
+
"qbo": "EmployeeNumber",
|
|
1269
|
+
"support": "none",
|
|
1270
|
+
"note": "Desktop's Employee record has no employee-number field; keep the number in your own system keyed by the TenkeyBridge Id.",
|
|
1271
|
+
"error": "UNSUPPORTED_BY_DESKTOP"
|
|
1157
1272
|
},
|
|
1158
1273
|
{
|
|
1159
1274
|
"qbo": "TargetBonus",
|
|
@@ -1170,9 +1285,42 @@ var CATALOG = {
|
|
|
1170
1285
|
],
|
|
1171
1286
|
"unsupported": [
|
|
1172
1287
|
{
|
|
1173
|
-
"case": "
|
|
1288
|
+
"case": "Delete",
|
|
1174
1289
|
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
1175
|
-
"note": "
|
|
1290
|
+
"note": "QBO employees are deactivated, not deleted; TenkeyBridge follows that (sparse update with Active:false)."
|
|
1291
|
+
},
|
|
1292
|
+
{
|
|
1293
|
+
"case": "Payroll fields",
|
|
1294
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
1295
|
+
"note": "Pay rates, pay periods, wage items and other EmployeePayrollInfo content are license-gated in Desktop and not exposed for read or write."
|
|
1296
|
+
}
|
|
1297
|
+
]
|
|
1298
|
+
},
|
|
1299
|
+
"Entitlements": {
|
|
1300
|
+
"entity": "Entitlements",
|
|
1301
|
+
"verdict": "live",
|
|
1302
|
+
"group": "platform",
|
|
1303
|
+
"read": "partial",
|
|
1304
|
+
"write": "none",
|
|
1305
|
+
"headline": "GET /v3/company/{companyId}/entitlements \u2014 a static, honest capability document for a QuickBooks Desktop company (no per-file subscription data).",
|
|
1306
|
+
"usage": "GET /v3/company/{companyId}/entitlements",
|
|
1307
|
+
"fields": [
|
|
1308
|
+
{
|
|
1309
|
+
"qbo": "Entitlements.platform",
|
|
1310
|
+
"support": "full",
|
|
1311
|
+
"note": 'Always "QuickBooks Desktop" \u2014 TenkeyBridge talks to Desktop, never to a QBO subscription.'
|
|
1312
|
+
},
|
|
1313
|
+
{
|
|
1314
|
+
"qbo": "Entitlements.features",
|
|
1315
|
+
"support": "partial",
|
|
1316
|
+
"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."
|
|
1317
|
+
}
|
|
1318
|
+
],
|
|
1319
|
+
"unsupported": [
|
|
1320
|
+
{
|
|
1321
|
+
"case": "QBO subscription tier, seats and add-ons",
|
|
1322
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
1323
|
+
"note": "Desktop has no subscription entitlements exposed over qbXML; the response says so explicitly rather than inventing values."
|
|
1176
1324
|
}
|
|
1177
1325
|
]
|
|
1178
1326
|
},
|
|
@@ -1182,12 +1330,23 @@ var CATALOG = {
|
|
|
1182
1330
|
"group": "sales",
|
|
1183
1331
|
"read": "full",
|
|
1184
1332
|
"write": "partial",
|
|
1185
|
-
"headline": "Same shape as Invoice; no
|
|
1333
|
+
"headline": "Same shape as Invoice; expiration date and active/closed status, no acceptance tracking",
|
|
1186
1334
|
"fields": [
|
|
1187
1335
|
{
|
|
1188
1336
|
"qbo": "CustomerRef",
|
|
1189
1337
|
"support": "full"
|
|
1190
1338
|
},
|
|
1339
|
+
{
|
|
1340
|
+
"qbo": "ClassRef",
|
|
1341
|
+
"support": "full",
|
|
1342
|
+
"note": "Header-level class (Desktop ClassRef, read and write). Line-level ClassRef is separate."
|
|
1343
|
+
},
|
|
1344
|
+
{
|
|
1345
|
+
"qbo": "DepartmentRef",
|
|
1346
|
+
"support": "none",
|
|
1347
|
+
"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.",
|
|
1348
|
+
"error": "UNMAPPED_FIELD"
|
|
1349
|
+
},
|
|
1191
1350
|
{
|
|
1192
1351
|
"qbo": "TxnDate",
|
|
1193
1352
|
"support": "full"
|
|
@@ -1215,7 +1374,18 @@ var CATALOG = {
|
|
|
1215
1374
|
},
|
|
1216
1375
|
{
|
|
1217
1376
|
"qbo": "DueDate",
|
|
1218
|
-
"support": "full"
|
|
1377
|
+
"support": "full",
|
|
1378
|
+
"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."
|
|
1379
|
+
},
|
|
1380
|
+
{
|
|
1381
|
+
"qbo": "ExpirationDate",
|
|
1382
|
+
"support": "full",
|
|
1383
|
+
"note": "Maps to the Desktop estimate DueDate. Read and write."
|
|
1384
|
+
},
|
|
1385
|
+
{
|
|
1386
|
+
"qbo": "TxnStatus",
|
|
1387
|
+
"support": "partial",
|
|
1388
|
+
"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."
|
|
1219
1389
|
},
|
|
1220
1390
|
{
|
|
1221
1391
|
"qbo": "PrivateNote",
|
|
@@ -1229,12 +1399,12 @@ var CATALOG = {
|
|
|
1229
1399
|
{
|
|
1230
1400
|
"qbo": "Line",
|
|
1231
1401
|
"support": "partial",
|
|
1232
|
-
"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
|
|
1402
|
+
"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."
|
|
1233
1403
|
},
|
|
1234
1404
|
{
|
|
1235
1405
|
"qbo": "TxnTaxDetail",
|
|
1236
1406
|
"support": "partial",
|
|
1237
|
-
"note": "
|
|
1407
|
+
"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)."
|
|
1238
1408
|
},
|
|
1239
1409
|
{
|
|
1240
1410
|
"qbo": "LinkedTxn",
|
|
@@ -1244,7 +1414,7 @@ var CATALOG = {
|
|
|
1244
1414
|
{
|
|
1245
1415
|
"qbo": "CustomField",
|
|
1246
1416
|
"support": "partial",
|
|
1247
|
-
"note": "Name/StringValue
|
|
1417
|
+
"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."
|
|
1248
1418
|
},
|
|
1249
1419
|
{
|
|
1250
1420
|
"qbo": "TotalAmt",
|
|
@@ -1261,12 +1431,6 @@ var CATALOG = {
|
|
|
1261
1431
|
"support": "partial",
|
|
1262
1432
|
"note": "Accepted and ignored \u2014 Desktop manages this itself; multi-currency mapping lands later."
|
|
1263
1433
|
},
|
|
1264
|
-
{
|
|
1265
|
-
"qbo": "ExpirationDate",
|
|
1266
|
-
"support": "none",
|
|
1267
|
-
"note": "Desktop estimates have no expiration date. Track it in your own system if needed.",
|
|
1268
|
-
"error": "UNSUPPORTED_BY_DESKTOP"
|
|
1269
|
-
},
|
|
1270
1434
|
{
|
|
1271
1435
|
"qbo": "AcceptedBy",
|
|
1272
1436
|
"support": "none",
|
|
@@ -1278,24 +1442,13 @@ var CATALOG = {
|
|
|
1278
1442
|
"support": "none",
|
|
1279
1443
|
"note": "Desktop estimates have no accepted-date field. Track acceptance in your own system.",
|
|
1280
1444
|
"error": "UNSUPPORTED_BY_DESKTOP"
|
|
1281
|
-
},
|
|
1282
|
-
{
|
|
1283
|
-
"qbo": "TxnStatus",
|
|
1284
|
-
"support": "none",
|
|
1285
|
-
"note": "Desktop estimates have no status field matching QBO's Pending/Accepted/Closed/Rejected enum. Track status in your own system.",
|
|
1286
|
-
"error": "UNSUPPORTED_BY_DESKTOP"
|
|
1287
1445
|
}
|
|
1288
1446
|
],
|
|
1289
1447
|
"unsupported": [
|
|
1290
|
-
{
|
|
1291
|
-
"case": "TxnTaxDetail.TotalTax supplied without TxnTaxCodeRef",
|
|
1292
|
-
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
1293
|
-
"note": "Desktop cannot honor a computed tax total. Set TxnTaxDetail.TxnTaxCodeRef or per-line TaxCodeRef explicitly. See COMPATIBILITY.md."
|
|
1294
|
-
},
|
|
1295
1448
|
{
|
|
1296
1449
|
"case": "Line.DiscountLineDetail without an ItemRef (bare-percentage or amount-off discounts)",
|
|
1297
1450
|
"error": "MISSING_REQUIRED_DESKTOP_ITEM",
|
|
1298
|
-
"note": "Desktop discounts are items. Create a discount item in
|
|
1451
|
+
"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."
|
|
1299
1452
|
},
|
|
1300
1453
|
{
|
|
1301
1454
|
"case": "Nested/grouped line types other than SalesItemLineDetail, DiscountLineDetail, GroupLineDetail, and DescriptionOnly",
|
|
@@ -1352,6 +1505,65 @@ var CATALOG = {
|
|
|
1352
1505
|
}
|
|
1353
1506
|
]
|
|
1354
1507
|
},
|
|
1508
|
+
"InventoryAdjustment": {
|
|
1509
|
+
"entity": "InventoryAdjustment",
|
|
1510
|
+
"verdict": "live",
|
|
1511
|
+
"group": "purchasing",
|
|
1512
|
+
"read": "full",
|
|
1513
|
+
"write": "partial",
|
|
1514
|
+
"headline": "Quantity adjustments to inventory items \u2014 create, read, header update and delete (live-verified); line edits need delete + re-create",
|
|
1515
|
+
"fields": [
|
|
1516
|
+
{
|
|
1517
|
+
"qbo": "AdjustAccountRef",
|
|
1518
|
+
"support": "full",
|
|
1519
|
+
"note": "Desktop AccountRef \u2014 the adjustment (offset) account. Required on create."
|
|
1520
|
+
},
|
|
1521
|
+
{
|
|
1522
|
+
"qbo": "TxnDate",
|
|
1523
|
+
"support": "full"
|
|
1524
|
+
},
|
|
1525
|
+
{
|
|
1526
|
+
"qbo": "DocNumber",
|
|
1527
|
+
"support": "full",
|
|
1528
|
+
"note": "Desktop RefNumber: max 11 characters. A longer value is rejected up front with a 400 fault (code 2050)."
|
|
1529
|
+
},
|
|
1530
|
+
{
|
|
1531
|
+
"qbo": "PrivateNote",
|
|
1532
|
+
"support": "full",
|
|
1533
|
+
"note": "Desktop Memo."
|
|
1534
|
+
},
|
|
1535
|
+
{
|
|
1536
|
+
"qbo": "Line",
|
|
1537
|
+
"support": "partial",
|
|
1538
|
+
"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."
|
|
1539
|
+
},
|
|
1540
|
+
{
|
|
1541
|
+
"qbo": "CurrencyRef",
|
|
1542
|
+
"support": "none",
|
|
1543
|
+
"note": "Multicurrency not yet supported.",
|
|
1544
|
+
"error": "UNSUPPORTED_BY_DESKTOP"
|
|
1545
|
+
},
|
|
1546
|
+
{
|
|
1547
|
+
"qbo": "ExchangeRate",
|
|
1548
|
+
"support": "none",
|
|
1549
|
+
"note": "Multicurrency not yet supported.",
|
|
1550
|
+
"error": "UNSUPPORTED_BY_DESKTOP"
|
|
1551
|
+
}
|
|
1552
|
+
],
|
|
1553
|
+
"unsupported": [
|
|
1554
|
+
{
|
|
1555
|
+
"case": "Line update",
|
|
1556
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
1557
|
+
"note": "A sparse update can change header fields only (AdjustAccountRef, TxnDate, DocNumber, PrivateNote). To change quantities, delete the adjustment and create a new one.",
|
|
1558
|
+
"workaround": "POST ?operation=delete with the Id, then create a corrected InventoryAdjustment."
|
|
1559
|
+
},
|
|
1560
|
+
{
|
|
1561
|
+
"case": "Absolute quantity (NewQuantity) and value adjustments",
|
|
1562
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
1563
|
+
"note": "QBO's InventoryAdjustment only has QtyDiff (a delta), so Desktop's NewQuantity/NewValue forms have no QBO field to map from."
|
|
1564
|
+
}
|
|
1565
|
+
]
|
|
1566
|
+
},
|
|
1355
1567
|
"Invoice": {
|
|
1356
1568
|
"entity": "Invoice",
|
|
1357
1569
|
"verdict": "live",
|
|
@@ -1364,6 +1576,17 @@ var CATALOG = {
|
|
|
1364
1576
|
"qbo": "CustomerRef",
|
|
1365
1577
|
"support": "full"
|
|
1366
1578
|
},
|
|
1579
|
+
{
|
|
1580
|
+
"qbo": "ClassRef",
|
|
1581
|
+
"support": "full",
|
|
1582
|
+
"note": "Header-level class (Desktop ClassRef, read and write). Line-level ClassRef is separate."
|
|
1583
|
+
},
|
|
1584
|
+
{
|
|
1585
|
+
"qbo": "DepartmentRef",
|
|
1586
|
+
"support": "none",
|
|
1587
|
+
"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.",
|
|
1588
|
+
"error": "UNMAPPED_FIELD"
|
|
1589
|
+
},
|
|
1367
1590
|
{
|
|
1368
1591
|
"qbo": "TxnDate",
|
|
1369
1592
|
"support": "full"
|
|
@@ -1413,12 +1636,12 @@ var CATALOG = {
|
|
|
1413
1636
|
{
|
|
1414
1637
|
"qbo": "Line",
|
|
1415
1638
|
"support": "partial",
|
|
1416
|
-
"note": "SalesItemLineDetail, GroupLineDetail, and DescriptionOnly map cleanly; line-level ClassRef and ServiceDate are populated on read; DiscountLineDetail requires a Desktop discount item
|
|
1639
|
+
"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."
|
|
1417
1640
|
},
|
|
1418
1641
|
{
|
|
1419
1642
|
"qbo": "TxnTaxDetail",
|
|
1420
1643
|
"support": "partial",
|
|
1421
|
-
"note": "
|
|
1644
|
+
"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)."
|
|
1422
1645
|
},
|
|
1423
1646
|
{
|
|
1424
1647
|
"qbo": "LinkedTxn",
|
|
@@ -1428,7 +1651,7 @@ var CATALOG = {
|
|
|
1428
1651
|
{
|
|
1429
1652
|
"qbo": "CustomField",
|
|
1430
1653
|
"support": "partial",
|
|
1431
|
-
"note": "Name/StringValue
|
|
1654
|
+
"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)."
|
|
1432
1655
|
},
|
|
1433
1656
|
{
|
|
1434
1657
|
"qbo": "TotalAmt",
|
|
@@ -1453,19 +1676,14 @@ var CATALOG = {
|
|
|
1453
1676
|
{
|
|
1454
1677
|
"qbo": "operation=void",
|
|
1455
1678
|
"support": "partial",
|
|
1456
|
-
"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)."
|
|
1679
|
+
"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)."
|
|
1457
1680
|
}
|
|
1458
1681
|
],
|
|
1459
1682
|
"unsupported": [
|
|
1460
|
-
{
|
|
1461
|
-
"case": "TxnTaxDetail.TotalTax supplied without TxnTaxCodeRef",
|
|
1462
|
-
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
1463
|
-
"note": "Desktop cannot honor a computed tax total. Set TxnTaxDetail.TxnTaxCodeRef or per-line TaxCodeRef explicitly. See COMPATIBILITY.md."
|
|
1464
|
-
},
|
|
1465
1683
|
{
|
|
1466
1684
|
"case": "Line.DiscountLineDetail without an ItemRef (bare-percentage or amount-off discounts)",
|
|
1467
1685
|
"error": "MISSING_REQUIRED_DESKTOP_ITEM",
|
|
1468
|
-
"note": "Desktop discounts are items. Create a discount item in
|
|
1686
|
+
"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."
|
|
1469
1687
|
},
|
|
1470
1688
|
{
|
|
1471
1689
|
"case": "Nested/grouped line types other than SalesItemLineDetail, DiscountLineDetail, GroupLineDetail, and DescriptionOnly (e.g. SubTotalLineDetail)",
|
|
@@ -1479,72 +1697,83 @@ var CATALOG = {
|
|
|
1479
1697
|
"verdict": "live",
|
|
1480
1698
|
"group": "sales",
|
|
1481
1699
|
"read": "partial",
|
|
1482
|
-
"write": "
|
|
1700
|
+
"write": "partial",
|
|
1483
1701
|
"headline": "One Item becomes several Desktop item types",
|
|
1484
1702
|
"fields": [
|
|
1485
1703
|
{
|
|
1486
1704
|
"qbo": "Name",
|
|
1487
|
-
"support": "full"
|
|
1705
|
+
"support": "full",
|
|
1706
|
+
"note": "Desktop item Name is the leaf name (max 31 characters); FullyQualifiedName is derived."
|
|
1488
1707
|
},
|
|
1489
1708
|
{
|
|
1490
1709
|
"qbo": "FullyQualifiedName",
|
|
1491
1710
|
"support": "full",
|
|
1492
|
-
"note": "Read-only
|
|
1711
|
+
"note": "Read-only; derived from the Desktop FullName. Echoed values on update are ignored."
|
|
1493
1712
|
},
|
|
1494
1713
|
{
|
|
1495
1714
|
"qbo": "Active",
|
|
1496
1715
|
"support": "full",
|
|
1497
|
-
"note": "
|
|
1716
|
+
"note": "Deactivate with a sparse update setting Active to false; items are never deleted."
|
|
1498
1717
|
},
|
|
1499
1718
|
{
|
|
1500
1719
|
"qbo": "Type",
|
|
1501
1720
|
"support": "partial",
|
|
1502
|
-
"note": "Service, NonInventory, Inventory
|
|
1721
|
+
"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."
|
|
1503
1722
|
},
|
|
1504
1723
|
{
|
|
1505
1724
|
"qbo": "Description",
|
|
1506
1725
|
"support": "full",
|
|
1507
|
-
"note": "
|
|
1726
|
+
"note": "Desktop sales description: SalesOrPurchase/Desc, SalesAndPurchase/SalesDesc, or SalesDesc on Inventory."
|
|
1508
1727
|
},
|
|
1509
1728
|
{
|
|
1510
1729
|
"qbo": "UnitPrice",
|
|
1511
1730
|
"support": "full",
|
|
1512
|
-
"note": "
|
|
1731
|
+
"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."
|
|
1513
1732
|
},
|
|
1514
1733
|
{
|
|
1515
1734
|
"qbo": "Sku",
|
|
1516
1735
|
"support": "partial",
|
|
1517
|
-
"note": "QBO Sku
|
|
1736
|
+
"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."
|
|
1737
|
+
},
|
|
1738
|
+
{
|
|
1739
|
+
"qbo": "TrackQtyOnHand",
|
|
1740
|
+
"support": "partial",
|
|
1741
|
+
"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."
|
|
1518
1742
|
},
|
|
1519
1743
|
{
|
|
1520
1744
|
"qbo": "QtyOnHand",
|
|
1521
|
-
"support": "
|
|
1522
|
-
"note": "Read
|
|
1745
|
+
"support": "partial",
|
|
1746
|
+
"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."
|
|
1747
|
+
},
|
|
1748
|
+
{
|
|
1749
|
+
"qbo": "InvStartDate",
|
|
1750
|
+
"support": "partial",
|
|
1751
|
+
"note": "Write-only, create only (Desktop InventoryDate). Not returned on read."
|
|
1523
1752
|
},
|
|
1524
1753
|
{
|
|
1525
1754
|
"qbo": "IncomeAccountRef",
|
|
1526
1755
|
"support": "full",
|
|
1527
|
-
"note": "
|
|
1756
|
+
"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)."
|
|
1528
1757
|
},
|
|
1529
1758
|
{
|
|
1530
1759
|
"qbo": "ExpenseAccountRef",
|
|
1531
1760
|
"support": "partial",
|
|
1532
|
-
"note": "Inventory: COGSAccountRef. Two-sided Service/NonInventory (SalesAndPurchase): ExpenseAccountRef. One-sided Service/NonInventory have no expense account."
|
|
1761
|
+
"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."
|
|
1533
1762
|
},
|
|
1534
1763
|
{
|
|
1535
1764
|
"qbo": "AssetAccountRef",
|
|
1536
1765
|
"support": "full",
|
|
1537
|
-
"note": "
|
|
1766
|
+
"note": "Inventory only; required on create."
|
|
1538
1767
|
},
|
|
1539
1768
|
{
|
|
1540
1769
|
"qbo": "PurchaseDesc",
|
|
1541
1770
|
"support": "full",
|
|
1542
|
-
"note": "Inventory and two-sided Service/NonInventory (SalesAndPurchase)."
|
|
1771
|
+
"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."
|
|
1543
1772
|
},
|
|
1544
1773
|
{
|
|
1545
1774
|
"qbo": "PurchaseCost",
|
|
1546
1775
|
"support": "full",
|
|
1547
|
-
"note": "Inventory and two-sided Service/NonInventory (SalesAndPurchase)."
|
|
1776
|
+
"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."
|
|
1548
1777
|
},
|
|
1549
1778
|
{
|
|
1550
1779
|
"qbo": "PrefVendorRef",
|
|
@@ -1554,29 +1783,54 @@ var CATALOG = {
|
|
|
1554
1783
|
{
|
|
1555
1784
|
"qbo": "ParentRef",
|
|
1556
1785
|
"support": "full",
|
|
1557
|
-
"note": "Desktop item hierarchy."
|
|
1786
|
+
"note": "Desktop item hierarchy; sub-items are FullName paths (Parent:Child)."
|
|
1558
1787
|
},
|
|
1559
1788
|
{
|
|
1560
1789
|
"qbo": "SubItem",
|
|
1561
1790
|
"support": "full",
|
|
1562
|
-
"note": "Derived from Desktop Sublevel."
|
|
1791
|
+
"note": "Derived from Desktop Sublevel; read-only."
|
|
1792
|
+
},
|
|
1793
|
+
{
|
|
1794
|
+
"qbo": "ClassRef",
|
|
1795
|
+
"support": "full",
|
|
1796
|
+
"note": "Desktop ClassRef."
|
|
1797
|
+
},
|
|
1798
|
+
{
|
|
1799
|
+
"qbo": "SalesTaxCodeRef",
|
|
1800
|
+
"support": "full",
|
|
1801
|
+
"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."
|
|
1802
|
+
},
|
|
1803
|
+
{
|
|
1804
|
+
"qbo": "Taxable",
|
|
1805
|
+
"support": "partial",
|
|
1806
|
+
"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."
|
|
1563
1807
|
},
|
|
1564
1808
|
{
|
|
1565
1809
|
"qbo": "CustomField",
|
|
1566
1810
|
"support": "partial",
|
|
1567
|
-
"note": "Name/StringValue
|
|
1811
|
+
"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)."
|
|
1568
1812
|
}
|
|
1569
1813
|
],
|
|
1570
1814
|
"unsupported": [
|
|
1571
1815
|
{
|
|
1572
|
-
"case": "Item types other than Service, NonInventory, Inventory, and
|
|
1816
|
+
"case": "Item types other than Service, NonInventory, Inventory, Group, other-charge and discount (assemblies, sales tax items, payment items, fixed assets, subtotal)",
|
|
1573
1817
|
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
1574
1818
|
"note": "Omitted from query results; a direct get by id on one of these Desktop items returns a 422 UNSUPPORTED_BY_DESKTOP fault."
|
|
1575
1819
|
},
|
|
1576
1820
|
{
|
|
1577
|
-
"case": "
|
|
1821
|
+
"case": "Creating or updating Group (and Category) items, or updating discount items",
|
|
1578
1822
|
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
1579
|
-
"note": "
|
|
1823
|
+
"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."
|
|
1824
|
+
},
|
|
1825
|
+
{
|
|
1826
|
+
"case": "Adding purchase-side fields to an existing sales-only Service/NonInventory item",
|
|
1827
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
1828
|
+
"note": "Desktop rejects the SalesOrPurchase to SalesAndPurchase conversion (error 3170). Include PurchaseDesc, PurchaseCost, ExpenseAccountRef or PrefVendorRef when the item is created."
|
|
1829
|
+
},
|
|
1830
|
+
{
|
|
1831
|
+
"case": "Changing QtyOnHand after creation",
|
|
1832
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
1833
|
+
"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.)"
|
|
1580
1834
|
}
|
|
1581
1835
|
]
|
|
1582
1836
|
},
|
|
@@ -1646,7 +1900,7 @@ var CATALOG = {
|
|
|
1646
1900
|
{
|
|
1647
1901
|
"qbo": "Line",
|
|
1648
1902
|
"support": "partial",
|
|
1649
|
-
"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.
|
|
1903
|
+
"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."
|
|
1650
1904
|
},
|
|
1651
1905
|
{
|
|
1652
1906
|
"qbo": "TotalAmt",
|
|
@@ -1702,7 +1956,7 @@ var CATALOG = {
|
|
|
1702
1956
|
{
|
|
1703
1957
|
"qbo": "PaymentRefNum",
|
|
1704
1958
|
"support": "full",
|
|
1705
|
-
"note": "Desktop RefNumber: max 20 characters; longer values are rejected up front with a 400 fault (code 2050).
|
|
1959
|
+
"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)."
|
|
1706
1960
|
},
|
|
1707
1961
|
{
|
|
1708
1962
|
"qbo": "TotalAmt",
|
|
@@ -1724,7 +1978,7 @@ var CATALOG = {
|
|
|
1724
1978
|
{
|
|
1725
1979
|
"qbo": "Line",
|
|
1726
1980
|
"support": "partial",
|
|
1727
|
-
"note": "LinkedTxn
|
|
1981
|
+
"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."
|
|
1728
1982
|
},
|
|
1729
1983
|
{
|
|
1730
1984
|
"qbo": "UnappliedAmt",
|
|
@@ -1813,7 +2067,7 @@ var CATALOG = {
|
|
|
1813
2067
|
{
|
|
1814
2068
|
"qbo": "AccountingInfoPrefs",
|
|
1815
2069
|
"support": "partial",
|
|
1816
|
-
"note": "ClassTrackingPerTxn/ClassTrackingPerTxnLine \u2190 IsUsingClassTracking (same bool projected to both); TrackDepartments
|
|
2070
|
+
"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)."
|
|
1817
2071
|
},
|
|
1818
2072
|
{
|
|
1819
2073
|
"qbo": "CurrencyPrefs",
|
|
@@ -1871,7 +2125,7 @@ var CATALOG = {
|
|
|
1871
2125
|
"note": "Preferences is read/query only in QBO and Desktop \u2014 there is no PreferencesAdd/Mod."
|
|
1872
2126
|
},
|
|
1873
2127
|
{
|
|
1874
|
-
"case": "Any WHERE clause, or STARTPOSITION/MAXRESULTS",
|
|
2128
|
+
"case": "Any WHERE clause, ORDERBY, COUNT(*), column list, or STARTPOSITION/MAXRESULTS",
|
|
1875
2129
|
"error": "UNSUPPORTED_QUERY",
|
|
1876
2130
|
"note": "PreferencesQueryRq takes no filters and always returns the single open company PreferencesRet. Use SELECT * FROM Preferences."
|
|
1877
2131
|
}
|
|
@@ -1912,7 +2166,7 @@ var CATALOG = {
|
|
|
1912
2166
|
{
|
|
1913
2167
|
"qbo": "DocNumber",
|
|
1914
2168
|
"support": "full",
|
|
1915
|
-
"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."
|
|
2169
|
+
"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."
|
|
1916
2170
|
},
|
|
1917
2171
|
{
|
|
1918
2172
|
"qbo": "PrivateNote",
|
|
@@ -1948,7 +2202,7 @@ var CATALOG = {
|
|
|
1948
2202
|
{
|
|
1949
2203
|
"qbo": "operation=void",
|
|
1950
2204
|
"support": "partial",
|
|
1951
|
-
"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
|
|
2205
|
+
"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)."
|
|
1952
2206
|
}
|
|
1953
2207
|
],
|
|
1954
2208
|
"unsupported": [
|
|
@@ -1976,6 +2230,17 @@ var CATALOG = {
|
|
|
1976
2230
|
"qbo": "VendorRef",
|
|
1977
2231
|
"support": "full"
|
|
1978
2232
|
},
|
|
2233
|
+
{
|
|
2234
|
+
"qbo": "ClassRef",
|
|
2235
|
+
"support": "full",
|
|
2236
|
+
"note": "Header-level class (Desktop ClassRef, read and write). Line-level ClassRef is separate."
|
|
2237
|
+
},
|
|
2238
|
+
{
|
|
2239
|
+
"qbo": "DepartmentRef",
|
|
2240
|
+
"support": "none",
|
|
2241
|
+
"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.",
|
|
2242
|
+
"error": "UNMAPPED_FIELD"
|
|
2243
|
+
},
|
|
1979
2244
|
{
|
|
1980
2245
|
"qbo": "TxnDate",
|
|
1981
2246
|
"support": "full"
|
|
@@ -2009,10 +2274,15 @@ var CATALOG = {
|
|
|
2009
2274
|
"qbo": "PrivateNote",
|
|
2010
2275
|
"support": "full"
|
|
2011
2276
|
},
|
|
2277
|
+
{
|
|
2278
|
+
"qbo": "CustomField",
|
|
2279
|
+
"support": "partial",
|
|
2280
|
+
"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)."
|
|
2281
|
+
},
|
|
2012
2282
|
{
|
|
2013
2283
|
"qbo": "Line",
|
|
2014
2284
|
"support": "partial",
|
|
2015
|
-
"note": "ItemBasedExpenseLineDetail only (PurchaseOrderLineAdd). AccountBasedExpenseLineDetail returns UNSUPPORTED_BY_DESKTOP. ReceivedQty maps from ReceivedQuantity on read (read-only).
|
|
2285
|
+
"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."
|
|
2016
2286
|
},
|
|
2017
2287
|
{
|
|
2018
2288
|
"qbo": "TotalAmt",
|
|
@@ -2022,7 +2292,7 @@ var CATALOG = {
|
|
|
2022
2292
|
{
|
|
2023
2293
|
"qbo": "POStatus",
|
|
2024
2294
|
"support": "partial",
|
|
2025
|
-
"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).
|
|
2295
|
+
"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."
|
|
2026
2296
|
},
|
|
2027
2297
|
{
|
|
2028
2298
|
"qbo": "APAccountRef",
|
|
@@ -2155,7 +2425,7 @@ var CATALOG = {
|
|
|
2155
2425
|
{
|
|
2156
2426
|
"case": "Item-line RefundReceipt (SalesItemLineDetail etc.)",
|
|
2157
2427
|
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
2158
|
-
"note": "Desktop has no
|
|
2428
|
+
"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."
|
|
2159
2429
|
},
|
|
2160
2430
|
{
|
|
2161
2431
|
"case": "Update / sparse update",
|
|
@@ -2207,46 +2477,103 @@ var CATALOG = {
|
|
|
2207
2477
|
"group": "platform",
|
|
2208
2478
|
"read": "partial",
|
|
2209
2479
|
"write": "none",
|
|
2210
|
-
"headline": "
|
|
2211
|
-
"usage": "GET /v3/company/{
|
|
2480
|
+
"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.",
|
|
2481
|
+
"usage": "GET /v3/company/{companyId}/reports/ProfitAndLoss?start_date=2026-01-01&end_date=2026-12-31&summarize_column_by=Month",
|
|
2212
2482
|
"fields": [
|
|
2213
2483
|
{
|
|
2214
2484
|
"qbo": "ProfitAndLoss / BalanceSheet / TrialBalance",
|
|
2215
2485
|
"support": "full",
|
|
2216
|
-
"note": "GeneralSummaryReportQueryRq (ProfitAndLossStandard / BalanceSheetStandard / TrialBalance). Values verbatim from Desktop \u2014 no recomputation."
|
|
2486
|
+
"note": "GeneralSummaryReportQueryRq (ProfitAndLossStandard / BalanceSheetStandard / TrialBalance). Values verbatim from Desktop \u2014 no recomputation. BalanceSheet also takes report_date as an as-of."
|
|
2217
2487
|
},
|
|
2218
2488
|
{
|
|
2219
2489
|
"qbo": "AgedReceivables / AgedPayables",
|
|
2220
2490
|
"support": "full",
|
|
2221
2491
|
"note": "AgingReportQueryRq (ARAgingSummary / APAgingSummary). Desktop's file-configured aging buckets come back as columns, honestly."
|
|
2222
2492
|
},
|
|
2493
|
+
{
|
|
2494
|
+
"qbo": "CustomerBalance / VendorBalance",
|
|
2495
|
+
"support": "full",
|
|
2496
|
+
"note": "CustomerBalanceSummary / VendorBalanceSummary. As-of (report_date). Month (and the other period splits) are accepted; Desktop refuses ReportBasis here."
|
|
2497
|
+
},
|
|
2498
|
+
{
|
|
2499
|
+
"qbo": "CustomerIncome / VendorExpenses",
|
|
2500
|
+
"support": "full",
|
|
2501
|
+
"note": "IncomeByCustomerSummary / ExpenseByVendorSummary."
|
|
2502
|
+
},
|
|
2503
|
+
{
|
|
2504
|
+
"qbo": "CustomerSales / ItemSales (aliases SalesByCustomer / SalesByProduct)",
|
|
2505
|
+
"support": "full",
|
|
2506
|
+
"note": "SalesByCustomerSummary / SalesByItemSummary. ItemSales carries Desktop's extra columns (% of Sales, Avg Price, COGS, Gross Margin)."
|
|
2507
|
+
},
|
|
2508
|
+
{
|
|
2509
|
+
"qbo": "InventoryValuationSummary",
|
|
2510
|
+
"support": "full",
|
|
2511
|
+
"note": "InventoryValuationSummary, as-of (report_date), item filter only. Desktop refuses ReportBasis and SummarizeColumnsBy here."
|
|
2512
|
+
},
|
|
2513
|
+
{
|
|
2514
|
+
"qbo": "ProfitAndLossDetail / GeneralLedger",
|
|
2515
|
+
"support": "partial",
|
|
2516
|
+
"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)."
|
|
2517
|
+
},
|
|
2518
|
+
{
|
|
2519
|
+
"qbo": "JournalReport / TransactionList",
|
|
2520
|
+
"support": "partial",
|
|
2521
|
+
"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."
|
|
2522
|
+
},
|
|
2523
|
+
{
|
|
2524
|
+
"qbo": "CustomerBalanceDetail / VendorBalanceDetail",
|
|
2525
|
+
"support": "partial",
|
|
2526
|
+
"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."
|
|
2527
|
+
},
|
|
2528
|
+
{
|
|
2529
|
+
"qbo": "AgedReceivableDetail / AgedPayableDetail",
|
|
2530
|
+
"support": "partial",
|
|
2531
|
+
"note": "AgingReportQueryRq ARAgingDetail / APAgingDetail, as-of (report_date), with the receivable (customer) or payable (vendor) filter. ColKeys best-effort."
|
|
2532
|
+
},
|
|
2223
2533
|
{
|
|
2224
2534
|
"qbo": "start_date / end_date / date_macro",
|
|
2225
2535
|
"support": "full",
|
|
2226
|
-
"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."
|
|
2536
|
+
"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."
|
|
2227
2537
|
},
|
|
2228
2538
|
{
|
|
2229
2539
|
"qbo": "report_date",
|
|
2230
2540
|
"support": "full",
|
|
2231
|
-
"note": "The
|
|
2541
|
+
"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."
|
|
2232
2542
|
},
|
|
2233
2543
|
{
|
|
2234
2544
|
"qbo": "accounting_method",
|
|
2235
2545
|
"support": "partial",
|
|
2236
|
-
"note": "Cash/Accrual on the
|
|
2546
|
+
"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.",
|
|
2547
|
+
"error": "REPORT_UNSUPPORTED_OPTION"
|
|
2548
|
+
},
|
|
2549
|
+
{
|
|
2550
|
+
"qbo": "summarize_column_by",
|
|
2551
|
+
"support": "partial",
|
|
2552
|
+
"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.",
|
|
2553
|
+
"error": "REPORT_UNSUPPORTED_OPTION"
|
|
2554
|
+
},
|
|
2555
|
+
{
|
|
2556
|
+
"qbo": "customer / vendor / item / class",
|
|
2557
|
+
"support": "partial",
|
|
2558
|
+
"note": "Comma-separated Ids \u2192 ReportEntityFilter (customer + vendor) / ReportItemFilter / ReportClassFilter. AR reports accept customer only, AP reports vendor only; InventoryValuationSummary accepts item only.",
|
|
2237
2559
|
"error": "REPORT_UNSUPPORTED_OPTION"
|
|
2238
2560
|
},
|
|
2239
2561
|
{
|
|
2240
2562
|
"qbo": "Column titles",
|
|
2241
2563
|
"support": "partial",
|
|
2242
|
-
"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."
|
|
2564
|
+
"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)."
|
|
2243
2565
|
}
|
|
2244
2566
|
],
|
|
2245
2567
|
"unsupported": [
|
|
2246
2568
|
{
|
|
2247
|
-
"case": "
|
|
2569
|
+
"case": "CashFlow",
|
|
2570
|
+
"error": "REPORT_UNKNOWN",
|
|
2571
|
+
"note": "QuickBooks Desktop's SDK has no cash-flow report (StatementOfCashFlows is refused with 3110 on every qbXML version)."
|
|
2572
|
+
},
|
|
2573
|
+
{
|
|
2574
|
+
"case": "columns / department / qzurl / adjusted_gain_loss",
|
|
2248
2575
|
"error": "REPORT_UNSUPPORTED_OPTION",
|
|
2249
|
-
"note": "Column
|
|
2576
|
+
"note": "Column selection has no qbXML equivalent; Desktop has no departments (use class); QuickZoom URLs and multicurrency gain/loss adjustment are QBO-only."
|
|
2250
2577
|
},
|
|
2251
2578
|
{
|
|
2252
2579
|
"case": "aging_period / num_periods / aging_method",
|
|
@@ -2254,14 +2581,14 @@ var CATALOG = {
|
|
|
2254
2581
|
"note": "Desktop aging buckets are company-file configuration, not request parameters."
|
|
2255
2582
|
},
|
|
2256
2583
|
{
|
|
2257
|
-
"case": "summarize_column_by
|
|
2584
|
+
"case": "summarize_column_by = Employees / ProductsAndServices / Departments / Location",
|
|
2258
2585
|
"error": "REPORT_UNSUPPORTED_OPTION",
|
|
2259
|
-
"note": "qbXML SummarizeColumnsBy
|
|
2586
|
+
"note": "qbXML's SummarizeColumnsBy has no per-item, per-employee or per-location split (ItemType splits by item type, not by item)."
|
|
2260
2587
|
},
|
|
2261
2588
|
{
|
|
2262
|
-
"case": "other QBO report names (
|
|
2589
|
+
"case": "other QBO report names (class/department sales, tax, account list, ...)",
|
|
2263
2590
|
"error": "REPORT_UNKNOWN",
|
|
2264
|
-
"note": "
|
|
2591
|
+
"note": "Not shipped. The fault lists the supported reports."
|
|
2265
2592
|
}
|
|
2266
2593
|
]
|
|
2267
2594
|
},
|
|
@@ -2277,6 +2604,17 @@ var CATALOG = {
|
|
|
2277
2604
|
"qbo": "CustomerRef",
|
|
2278
2605
|
"support": "full"
|
|
2279
2606
|
},
|
|
2607
|
+
{
|
|
2608
|
+
"qbo": "ClassRef",
|
|
2609
|
+
"support": "full",
|
|
2610
|
+
"note": "Header-level class (Desktop ClassRef, read and write). Line-level ClassRef is separate."
|
|
2611
|
+
},
|
|
2612
|
+
{
|
|
2613
|
+
"qbo": "DepartmentRef",
|
|
2614
|
+
"support": "none",
|
|
2615
|
+
"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.",
|
|
2616
|
+
"error": "UNMAPPED_FIELD"
|
|
2617
|
+
},
|
|
2280
2618
|
{
|
|
2281
2619
|
"qbo": "TxnDate",
|
|
2282
2620
|
"support": "full"
|
|
@@ -2318,12 +2656,12 @@ var CATALOG = {
|
|
|
2318
2656
|
{
|
|
2319
2657
|
"qbo": "Line",
|
|
2320
2658
|
"support": "partial",
|
|
2321
|
-
"note": "SalesItemLineDetail, GroupLineDetail, and DescriptionOnly map cleanly; line-level ClassRef and ServiceDate are populated on read; DiscountLineDetail requires a Desktop discount item
|
|
2659
|
+
"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."
|
|
2322
2660
|
},
|
|
2323
2661
|
{
|
|
2324
2662
|
"qbo": "TxnTaxDetail",
|
|
2325
2663
|
"support": "partial",
|
|
2326
|
-
"note": "
|
|
2664
|
+
"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)."
|
|
2327
2665
|
},
|
|
2328
2666
|
{
|
|
2329
2667
|
"qbo": "LinkedTxn",
|
|
@@ -2333,7 +2671,7 @@ var CATALOG = {
|
|
|
2333
2671
|
{
|
|
2334
2672
|
"qbo": "CustomField",
|
|
2335
2673
|
"support": "partial",
|
|
2336
|
-
"note": "Name/StringValue
|
|
2674
|
+
"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."
|
|
2337
2675
|
},
|
|
2338
2676
|
{
|
|
2339
2677
|
"qbo": "TotalAmt",
|
|
@@ -2356,11 +2694,42 @@ var CATALOG = {
|
|
|
2356
2694
|
"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)."
|
|
2357
2695
|
}
|
|
2358
2696
|
],
|
|
2697
|
+
"unsupported": []
|
|
2698
|
+
},
|
|
2699
|
+
"Tag": {
|
|
2700
|
+
"entity": "Tag",
|
|
2701
|
+
"verdict": "gap",
|
|
2702
|
+
"group": "gaps",
|
|
2703
|
+
"read": "none",
|
|
2704
|
+
"write": "none",
|
|
2705
|
+
"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.",
|
|
2706
|
+
"fields": [],
|
|
2359
2707
|
"unsupported": [
|
|
2360
2708
|
{
|
|
2361
|
-
"case": "
|
|
2709
|
+
"case": "read",
|
|
2362
2710
|
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
2363
|
-
"note": "
|
|
2711
|
+
"note": "qbXML has no Tag or TagClassification message; Desktop has no equivalent many-to-many labeling of transactions.",
|
|
2712
|
+
"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."
|
|
2713
|
+
},
|
|
2714
|
+
{
|
|
2715
|
+
"case": "query",
|
|
2716
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
2717
|
+
"note": "There is no Desktop tag list to query."
|
|
2718
|
+
},
|
|
2719
|
+
{
|
|
2720
|
+
"case": "create",
|
|
2721
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
2722
|
+
"note": "Desktop cannot store tags, so none can be created."
|
|
2723
|
+
},
|
|
2724
|
+
{
|
|
2725
|
+
"case": "update",
|
|
2726
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
2727
|
+
"note": "Desktop cannot store tags, so none can be updated."
|
|
2728
|
+
},
|
|
2729
|
+
{
|
|
2730
|
+
"case": "delete",
|
|
2731
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
2732
|
+
"note": "Desktop cannot store tags, so none can be deleted."
|
|
2364
2733
|
}
|
|
2365
2734
|
]
|
|
2366
2735
|
},
|
|
@@ -2475,6 +2844,43 @@ var CATALOG = {
|
|
|
2475
2844
|
],
|
|
2476
2845
|
"unsupported": []
|
|
2477
2846
|
},
|
|
2847
|
+
"TaxPayment": {
|
|
2848
|
+
"entity": "TaxPayment",
|
|
2849
|
+
"verdict": "planned",
|
|
2850
|
+
"group": "planned",
|
|
2851
|
+
"read": "none",
|
|
2852
|
+
"write": "none",
|
|
2853
|
+
"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.",
|
|
2854
|
+
"fields": [],
|
|
2855
|
+
"unsupported": [
|
|
2856
|
+
{
|
|
2857
|
+
"case": "read",
|
|
2858
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
2859
|
+
"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.",
|
|
2860
|
+
"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."
|
|
2861
|
+
},
|
|
2862
|
+
{
|
|
2863
|
+
"case": "query",
|
|
2864
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
2865
|
+
"note": "Not implemented; see read."
|
|
2866
|
+
},
|
|
2867
|
+
{
|
|
2868
|
+
"case": "create",
|
|
2869
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
2870
|
+
"note": "QBO's TaxPayment is read-only via the API; TenkeyBridge matches that."
|
|
2871
|
+
},
|
|
2872
|
+
{
|
|
2873
|
+
"case": "update",
|
|
2874
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
2875
|
+
"note": "QBO's TaxPayment is read-only via the API; TenkeyBridge matches that."
|
|
2876
|
+
},
|
|
2877
|
+
{
|
|
2878
|
+
"case": "delete",
|
|
2879
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
2880
|
+
"note": "QBO's TaxPayment is read-only via the API; TenkeyBridge matches that."
|
|
2881
|
+
}
|
|
2882
|
+
]
|
|
2883
|
+
},
|
|
2478
2884
|
"TaxRate": {
|
|
2479
2885
|
"entity": "TaxRate",
|
|
2480
2886
|
"verdict": "live",
|
|
@@ -2657,6 +3063,12 @@ var CATALOG = {
|
|
|
2657
3063
|
"qbo": "ClassRef",
|
|
2658
3064
|
"support": "full"
|
|
2659
3065
|
},
|
|
3066
|
+
{
|
|
3067
|
+
"qbo": "DepartmentRef",
|
|
3068
|
+
"support": "none",
|
|
3069
|
+
"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.",
|
|
3070
|
+
"error": "UNMAPPED_FIELD"
|
|
3071
|
+
},
|
|
2660
3072
|
{
|
|
2661
3073
|
"qbo": "Description",
|
|
2662
3074
|
"support": "full",
|
|
@@ -2795,7 +3207,7 @@ var CATALOG = {
|
|
|
2795
3207
|
{
|
|
2796
3208
|
"case": "Delete",
|
|
2797
3209
|
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
2798
|
-
"note": '"Transfer" is not a valid qbXML TxnDelType enum value, so delete is not wired for this entity.'
|
|
3210
|
+
"note": '"Transfer" is not a valid qbXML TxnDelType enum value (verified live: status 3110), so delete is not wired for this entity.'
|
|
2799
3211
|
}
|
|
2800
3212
|
]
|
|
2801
3213
|
},
|
|
@@ -2882,7 +3294,7 @@ var CATALOG = {
|
|
|
2882
3294
|
{
|
|
2883
3295
|
"qbo": "CustomField",
|
|
2884
3296
|
"support": "partial",
|
|
2885
|
-
"note": "Name/StringValue
|
|
3297
|
+
"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)."
|
|
2886
3298
|
},
|
|
2887
3299
|
{
|
|
2888
3300
|
"qbo": "CurrencyRef",
|
|
@@ -2955,6 +3367,43 @@ var CATALOG = {
|
|
|
2955
3367
|
}
|
|
2956
3368
|
],
|
|
2957
3369
|
"unsupported": []
|
|
3370
|
+
},
|
|
3371
|
+
"VendorType": {
|
|
3372
|
+
"entity": "VendorType",
|
|
3373
|
+
"verdict": "gap",
|
|
3374
|
+
"group": "gaps",
|
|
3375
|
+
"read": "none",
|
|
3376
|
+
"write": "none",
|
|
3377
|
+
"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.",
|
|
3378
|
+
"fields": [],
|
|
3379
|
+
"unsupported": [
|
|
3380
|
+
{
|
|
3381
|
+
"case": "read",
|
|
3382
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
3383
|
+
"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.",
|
|
3384
|
+
"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."
|
|
3385
|
+
},
|
|
3386
|
+
{
|
|
3387
|
+
"case": "query",
|
|
3388
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
3389
|
+
"note": "No QBO VendorType resource to mirror, so no query is exposed."
|
|
3390
|
+
},
|
|
3391
|
+
{
|
|
3392
|
+
"case": "create",
|
|
3393
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
3394
|
+
"note": "No QBO VendorType resource to mirror, so no create is exposed."
|
|
3395
|
+
},
|
|
3396
|
+
{
|
|
3397
|
+
"case": "update",
|
|
3398
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
3399
|
+
"note": "No QBO VendorType resource to mirror, so no update is exposed."
|
|
3400
|
+
},
|
|
3401
|
+
{
|
|
3402
|
+
"case": "delete",
|
|
3403
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
3404
|
+
"note": "No QBO VendorType resource to mirror, so no delete is exposed."
|
|
3405
|
+
}
|
|
3406
|
+
]
|
|
2958
3407
|
}
|
|
2959
3408
|
};
|
|
2960
3409
|
|
|
@@ -3083,10 +3532,10 @@ function registerTools(server, client) {
|
|
|
3083
3532
|
server.registerTool(
|
|
3084
3533
|
"query",
|
|
3085
3534
|
{
|
|
3086
|
-
description: "Run a QBO-style query against the connected QuickBooks Desktop company file. Supports
|
|
3535
|
+
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.",
|
|
3087
3536
|
inputSchema: {
|
|
3088
3537
|
entity: entityArg,
|
|
3089
|
-
where: import_zod.z.string().optional().describe(`
|
|
3538
|
+
where: import_zod.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'"`),
|
|
3090
3539
|
startPosition: import_zod.z.number().int().positive().optional(),
|
|
3091
3540
|
maxResults: import_zod.z.number().int().positive().max(1e3).optional()
|
|
3092
3541
|
}
|
|
@@ -3192,10 +3641,34 @@ function registerTools(server, client) {
|
|
|
3192
3641
|
}
|
|
3193
3642
|
}
|
|
3194
3643
|
);
|
|
3644
|
+
server.registerTool(
|
|
3645
|
+
"void",
|
|
3646
|
+
{
|
|
3647
|
+
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.',
|
|
3648
|
+
inputSchema: {
|
|
3649
|
+
entity: entityArg,
|
|
3650
|
+
id: import_zod.z.string(),
|
|
3651
|
+
syncToken: import_zod.z.string().describe("Current SyncToken of the transaction (required; a stale token is rejected).")
|
|
3652
|
+
}
|
|
3653
|
+
},
|
|
3654
|
+
async ({ entity, id, syncToken }) => {
|
|
3655
|
+
const name = resolveEntityName(entity);
|
|
3656
|
+
if (!name) return unknownEntity(entity);
|
|
3657
|
+
if (!import_client2.ENTITIES[name].voidable) {
|
|
3658
|
+
const supported = Object.values(import_client2.ENTITIES).filter((e) => e.voidable).map((e) => e.name).join(", ");
|
|
3659
|
+
return fail(`${name} cannot be voided through TenkeyBridge. Voidable entities: ${supported}.`);
|
|
3660
|
+
}
|
|
3661
|
+
try {
|
|
3662
|
+
return ok(await accessor(client, name).void({ Id: id, SyncToken: syncToken }));
|
|
3663
|
+
} catch (err) {
|
|
3664
|
+
return failure(err);
|
|
3665
|
+
}
|
|
3666
|
+
}
|
|
3667
|
+
);
|
|
3195
3668
|
}
|
|
3196
3669
|
|
|
3197
3670
|
// src/version.ts
|
|
3198
|
-
var PKG_VERSION = "0.
|
|
3671
|
+
var PKG_VERSION = "0.4.0";
|
|
3199
3672
|
|
|
3200
3673
|
// src/server.ts
|
|
3201
3674
|
var SERVER_NAME = "tenkeybridge";
|
|
@@ -3211,19 +3684,25 @@ var import_node_fs = require("fs");
|
|
|
3211
3684
|
var import_node_os = require("os");
|
|
3212
3685
|
var import_node_path = require("path");
|
|
3213
3686
|
var PORTAL_URL = "https://api.tenkeybridge.com/portal";
|
|
3214
|
-
function defaultTokenFile(
|
|
3215
|
-
return (0, import_node_path.join)((0, import_node_os.homedir)(), ".tenkeybridge", `mcp-tokens-${
|
|
3687
|
+
function defaultTokenFile(companyId) {
|
|
3688
|
+
return (0, import_node_path.join)((0, import_node_os.homedir)(), ".tenkeybridge", `mcp-tokens-${companyId}.json`);
|
|
3216
3689
|
}
|
|
3217
3690
|
function loadConfig(env) {
|
|
3218
|
-
const
|
|
3219
|
-
|
|
3691
|
+
const fromNew = env.TKB_COMPANY_ID;
|
|
3692
|
+
const fromOld = env.TKB_REALM_ID;
|
|
3693
|
+
if (fromNew && fromOld && fromNew !== fromOld) {
|
|
3694
|
+
throw new Error("TKB_COMPANY_ID and TKB_REALM_ID (deprecated) disagree \u2014 set TKB_COMPANY_ID only.");
|
|
3695
|
+
}
|
|
3696
|
+
const companyId = fromNew || fromOld;
|
|
3697
|
+
if (!companyId) {
|
|
3220
3698
|
throw new Error(
|
|
3221
|
-
`
|
|
3699
|
+
`TKB_COMPANY_ID is required \u2014 the Company ID of the connected QuickBooks company file (shown in the portal: ${PORTAL_URL}).`
|
|
3222
3700
|
);
|
|
3223
3701
|
}
|
|
3702
|
+
const deprecations = !fromNew && fromOld ? ["TKB_REALM_ID is deprecated; set TKB_COMPANY_ID instead."] : [];
|
|
3224
3703
|
const baseUrl = env.TKB_BASE_URL;
|
|
3225
3704
|
if (env.TKB_ACCESS_TOKEN) {
|
|
3226
|
-
return {
|
|
3705
|
+
return { companyId, deprecations, ...baseUrl ? { baseUrl } : {}, auth: { accessToken: env.TKB_ACCESS_TOKEN } };
|
|
3227
3706
|
}
|
|
3228
3707
|
const clientId = env.TKB_CLIENT_ID;
|
|
3229
3708
|
const clientSecret = env.TKB_CLIENT_SECRET;
|
|
@@ -3235,13 +3714,14 @@ function loadConfig(env) {
|
|
|
3235
3714
|
!refreshToken && "TKB_REFRESH_TOKEN"
|
|
3236
3715
|
].filter(Boolean).join(", ");
|
|
3237
3716
|
throw new Error(
|
|
3238
|
-
`Missing ${missing}. Set either TKB_ACCESS_TOKEN, or all of TKB_CLIENT_ID + TKB_CLIENT_SECRET + TKB_REFRESH_TOKEN (create an OAuth
|
|
3717
|
+
`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}).`
|
|
3239
3718
|
);
|
|
3240
3719
|
}
|
|
3241
|
-
const tokenFile = env.TKB_TOKEN_FILE ?? defaultTokenFile(
|
|
3720
|
+
const tokenFile = env.TKB_TOKEN_FILE ?? defaultTokenFile(companyId);
|
|
3242
3721
|
const stored = readStoredRefreshToken(tokenFile);
|
|
3243
3722
|
return {
|
|
3244
|
-
|
|
3723
|
+
companyId,
|
|
3724
|
+
deprecations,
|
|
3245
3725
|
...baseUrl ? { baseUrl } : {},
|
|
3246
3726
|
tokenFile,
|
|
3247
3727
|
auth: { clientId, clientSecret, refreshToken: stored ?? refreshToken }
|