zoho books integrations issue

zoho books integrations issue

Hi ,

I trying to integrate zoho books and zoho creator.

I am getting error. 

{"message":"JSON is not well formed","code":1038}

sometimes I am not getting error but the record is not inserted in to books

if (((request.Customer_Name  !=  null)  &&  (request.Invoice_No  !=  null))  &&  (request.Invoice_Date  !=  null))
    {
        itemDetails = map();
        for each rowprodetails in Product_Load  [ID == request.ID]
        {
            proName = Product_Master[ID == rowprodetails.Enter_your_product_details.Product_Name].Product_Name;
            itemDetails.put("name", proName);
            proBillAmt = Product_Details[ID == rowprodetails.Enter_your_product_details.Product_Name].Product_Bill_Amount;
            itemDetails.put("rate", proBillAmt);
            proQuantity = Product_Details[ID == rowprodetails.Enter_your_product_details.Product_Name].Total_Quantity;
            itemDetails.put("quantity", proQuantity);
            prorowTotal = Product_Details[ID == rowprodetails.Enter_your_product_details.Product_Name].Total_Amount;
            itemDetails.put("item_total", prorowTotal);
        }
        varship = 0.0;
        varadjustment = 0.0;
        varTotalAfterAddedCharges = (request.Final_Amount  +  varship  +  varadjustment);
        mpProductLoadData = map();
        mpProductLoadData.put("Customer Name", request.Customer_Name);
        mpProductLoadData.put("invoice_number", request.Invoice_No);
        mpProductLoadData.put("date", request.Invoice_Date);
        mpProductLoadData.put("line_items", itemDetails);
        mpProductLoadData.put("Shipping Charges", varship);
        mpProductLoadData.put("Adjustment", varadjustment);
        mpProductLoadData.put("Total ( ₹ )", varTotalAfterAddedCharges);
        response = zoho.books.createRecord("Invoices", "639725873", mpProductLoadData);
        info "response is " + response;
        info "hello";
    } 

I need to insert the value in subform of invoice in zoho books from subform of the form from zoho creator, I hve tried the above code for the same.
I could not find in any reference material about the subform values insertion in zoho books record.

Thanks,
ITKES Admin