Invoice_Create API fails on multi-line sales invoices — malformed InvoiceLines XML

Hi,

I am creating sales invoices via the QuickFile API, and every multi-line invoice attempt fails with an XML validation error. Single-line invoices work fine.

The error I get back is:
“Element ‘InvoiceLines’ cannot appear more than once if content model type is ‘all’.”

On some attempts I also see:
“Invalid child element ‘ItemDescription’.”

This happens regardless of which optional fields I include (with or without IssueDate, with or without PONumber), which suggests each line item is being sent inside its own InvoiceLines block rather than all lines nested inside a single InvoiceLines element, and that ItemDescription may not be the correct field name for the line item description in the current schema.

Could you please confirm whether this is a known issue, or point me to a working example of a multi-line Invoice_Create request? Right now I have to create multi-line invoices through the web UI instead of the API.

Hi @bigblu

Sorry to hear you’re experiencing some issues here.

I actually posted an XML example yesterday, which you can find here: Understanding REST API - #8 by QFMathew

However, the XML and older JSON APIs are being discontinued next year for our newer REST API. If you can, I would suggest using this one for any newer projects: REST API Overview

Thanks for the pointer on the XML structure, that’s really helpful.

Given the current API’s being retired next year, I’d like to get ahead of it rather than keep patching around the old one. Could I request beta access to the new REST API for our account?

Thanks,
Jose