Sage One API Invoice Lines Required Error

I am having a problem with the Sage One API when trying to send an invoice to Sage. It keeps telling me the invoice lines are required.

They are definitely there. A form dump to JSON yields the exact same JSON structure from the API documentation. The API support team is useless in terms of responding to queries like these and I need this solved URGENTLY.

This API is by far the worst API I have ever worked with. The error handling is completely incorrect and non-descriptive of the true problem and the documentation is just shy of useless.

Please have a senior API support engineer contact me ASAP to solve this problem!