InvoiceMod qbXML example
Changes an invoice. If the Mod lists any lines, a line it leaves out is removed, so send every line you want kept.
qbXML
InvoiceModRq, version 16.0
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="16.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<InvoiceModRq>
<InvoiceMod>
<TxnID>1A2B-1700000000</TxnID>
<EditSequence>1700000000</EditSequence>
<Memo>Added a second widget</Memo>
<InvoiceLineMod>
<TxnLineID>1A2C-1700000000</TxnLineID>
</InvoiceLineMod>
<InvoiceLineMod>
<TxnLineID>-1</TxnLineID>
<ItemRef>
<FullName>Widget</FullName>
</ItemRef>
<Desc>Blue widget, small</Desc>
<Quantity>1</Quantity>
<Rate>95.00</Rate>
</InvoiceLineMod>
</InvoiceMod>
</InvoiceModRq>
</QBXMLMsgsRq>
</QBXML>
Open in the validator
Check it against the qbXML 16.0 schema, edit it, and run it in your own QuickBooks.
Things to know
- A Mod needs the record's current EditSequence. An out-of-date one is refused with 3200, and the answer still carries the record as it stands, so you can retry with its EditSequence.
- Keep a line as it is by sending its TxnLineID alone. Add a line with TxnLineID -1.
The same request with QuBe Sync's API
QuBe Sync takes this JSON, writes the qbXML for you and delivers QuickBooks' answer to your webhook as JSON.
PUT
/api/v2/connections/{connection_id}/invoices
{
"edit_sequence": "1700000000",
"invoice_line_mod": [
{
"txn_line_id": "1A2C-1700000000"
},
{
"desc": "Blue widget, small",
"item_ref": {
"full_name": "Widget"
},
"quantity": 1,
"rate": 95.0,
"txn_line_id": "-1"
}
],
"memo": "Added a second widget",
"txn_id": "1A2B-1700000000"
}
Every field InvoiceMod takes is in Intuit's reference.
More requests
Customers and sales