Issue adding invoice lines

Hi All,

I’m having issues adding invoice lines to a pre-existing invoice.

I’m sending this JSON, but getting a 400 error telling me invoice_items is not an array.

{ "invoice": {
"invoice_items": [
{ "description": "Ticket Sales",
"price": 15.50,
"quantity": 4.00 },
{ "description": "Donation",
"price": 1.00,
"quantity": 1.00 }
]
}
}

I’m struggling to work out what’s wrong with it though. Any pointers?

Thanks,
Amy

Hi Amy,

Sorry for the late reply! I’m Matt, an engineer at FreeAgent.

Unfortunately, I can’t replicate your issue: using that exact JSON you sent is working on my end. The error code seems to imply that something is wrong with the JSON body - is that the exact body of your request?

Let me know if you’re still struggling with this, and I or one of my colleagues can work through it with you!