Update Zoho Subscription Invoice

Update Zoho Subscription Invoice

Hello All,

Problem Statement:-   I am not able to update the Invoice which i have created inside the zoho subscription by the api call, can someone help me for the same, I am also sharing the Reference code and error 

...........Update Code
  1. invoiceID = invoice.get("invoice_id");
  2. invoicedate = invoice.get("invoice_date").toDate();
  3. organizationID = organization.get("organization_id");
  4. resvp = zoho.subscriptions.retrieve("invoices",organizationID,invoiceID,"zohosubscrition");
  5. invoiceid = resvp.get("invoice").getJSON("invoice_id");
  6. mp = Map();
  7. mp.put("item_id",invoiceid);
  8. itemlist = List();
  9. itemdata = resvp.get("invoice").getJSON("invoice_items");
  10. for each  rec in itemdata
  11. {
  12. itemdata = Map();
  13. itemdata.put("item_id",rec.get("item_id"));
  14. itemdata.put("product_id",rec.get("product_id"));
  15. itemdata.put("price",900);
  16. itemdata.put("quantity",1);
  17. itemdata.put("item_total",900);
  18. itemlist.add(itemdata);
  19. }
  20. mp.put("invoice_items",itemlist);
  21. mp.put("reason","we are testing this by the api call");
  22. resvp1 = zoho.subscriptions.update("invoices",organizationID,invoiceID,mp,"zohosubscrition");
  23. info resvp1;
  24.             
Error:- {"code":102028,"message":"Items of this invoice cannot be modified."}

Please check the same and tell how can we update the invoice which we have created inside the zoho Subscription,

Apart from this is there anything information required please let me know.

Thank You
Piyush Goyal