An item add with no AccountRef answers 3180 "A posting account must be specified.", but with an empty <AccountRef/> it answers 3140 for Account ""

Observed 2026-09-18 on QuickBooks Enterprise Solutions 24.0 (US), reporting qbXML 17.0.

QuickBooks refuses an item add whose SalesOrPurchase has no AccountRef, although the XSD makes AccountRef optional. The answer is 3180, "A posting account must be specified.", not Intuit's 3270 "Missing posting account". An empty <AccountRef/>, also schema-valid, answers 3140 instead, an invalid reference to Account "".

No AccountRef:

qbXML
<ItemNonInventoryAdd>
  <Name>WF new item 0844</Name>
  <SalesOrPurchase>
    <Desc>WF new item 0844</Desc>
    <Price>19.99</Price>
  </SalesOrPurchase>
</ItemNonInventoryAdd>
qbXML
<ItemNonInventoryAddRs statusCode="3180" statusSeverity="Error" statusMessage="There was an error when saving a Item Non-Inventory list, element &quot;WF new item 0844&quot;. QuickBooks error message: A posting account must be specified." />

An ItemServiceAdd with an empty <SalesOrPurchase/> answered the same way. An empty AccountRef:

qbXML
<ItemNonInventoryAdd>
  <Name>Empty ref probe</Name>
  <SalesOrPurchase>
    <Price>7.00</Price>
    <AccountRef/>
  </SalesOrPurchase>
</ItemNonInventoryAdd>
qbXML
<ItemNonInventoryAddRs statusCode="3140" statusSeverity="Error" statusMessage="There is an invalid reference to QuickBooks Account &quot;&quot; in the Item Non-Inventory. " />

Unlike a 3140 for a name that is not in the file, this message stops after the entity, with no "QuickBooks error message" sentence.

What to do

Always send an AccountRef with a ListID or FullName of an existing account when adding a service or non-inventory item with SalesOrPurchase, and never send an empty one. Expect 3180, not 3270, when it is missing.

Not observed

  • Item types other than service and non-inventory items, and SalesAndPurchase without its account refs.
  • A Mod that clears or empties the account.
  • What answers 3270, if anything.
  • Whether the 3180 message had two spaces after the first sentence; these copies had runs of whitespace collapsed.

Error codes on this page

QuBe Sync is a JSON API for QuickBooks Desktop that is built on what these findings show.