What's wrong with this deluge code to create a Bill?

What's wrong with this deluge code to create a Bill?

I know that all the data in the map is correct. The line items are pulled directly from a purchase order.

            // Add the purchase order ID to the bill
billPOIds.add(poID);
// Retrieve and merge the line items
poLineItems = purchaseOrder.get("line_items");
for each  item in poLineItems
{
billLineItems.add(item);
}
// Construct the bill data map
billData = map();
billData.put("vendor_id", "2274626000007845037");
billData.put("date", zoho.currentdate);
billData.put("line_items", billLineItems);
billData.put("bill_number", "Test-2746260");
// Create the bill record in Zoho Books
billCreationResponse = zoho.books.createRecord("bills", organizationID, billData, "books_all");

The error message is:
{"code":1048,"message":"Sorry, there was an internal error. Please contact {0} for assistance."}



    Nederlandse Hulpbronnen