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;
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
            Zoho Marketing Automation
                      • Sticky Posts

                      • Introducing Developer Space in Zoho Subscriptions

                        Hello devs! At Zoho Subscriptions, we're constantly looking for ways to empower the developer community. Our goal is to provide you with the tools you need to integrate Zoho Subscriptions with your other platforms, and we also want to make it easy to

                      Zoho Pagesense Resources

                        Zoho SalesIQ Resources

                              Zoho TeamInbox Resources

                                Zoho DataPrep Resources

                                  Zoho CRM Plus Resources

                                    Zoho Books Resources

                                      Zoho Subscriptions Resources

                                        Zoho Desk Resources

                                          Zoho Projects Resources

                                            Zoho Sprints Resources

                                              Qntrl Resources

                                                Zoho Creator Resources

                                                  Zoho WorkDrive Resources

                                                    Zoho Campaigns Resources

                                                      Zoho CRM Resources

                                                            Design. Discuss. Deliver.

                                                            Create visually engaging stories with Zoho Show.

                                                            Get Started Now