Adding a single item through Zoho Books API returns {"code":4,"message":"Invalid value passed for bulk_update"}

Adding a single item through Zoho Books API returns {"code":4,"message":"Invalid value passed for bulk_update"}

Hello,

I need to update an invoice with hidden items (rate = 0) in order to have the inventory updated accordingly, as well as monitoring the full project's economical efficiency.
To do so, I am passing the Zoho CRM customer ID, Project Name, Article ID and name to a function. From there I can find the latest invoice linked to our customer and project.

I then try to update the invoice by adding a single line item with quantity = 1 and rate = 0 but get a code = 4 response :(

Here is the part where I try to update the invoice:

  1. if(found_invoice = true)
  2.     {
  3.         //Found invoice: add item on invoice.
  4.         //1. get access_token to use api
  5.         access_token = thisapp.getAccessTokenFromRefreshToken();
  6.         authorization_string = "Zoho-oauthtoken " + access_token;
  7.         //2. List invoices from customer:
  8.         parameters_data = {"customer_id":customer_id,"invoice_number":invoice_number,"line_items":[{"item_id":article_id,"name":article,"description":article,"quantity":"1.00","rate":0}]};
  9.         headers_data = Map();
  10.         headers_data.put("Authorization",authorization_string);
  11.         response = invokeurl
  12.         [
  13.             url :"https://www.zohoapis.eu/books/v3/invoices?organization_id=XXXXXXXXXXX"
  14.             type :PUT
  15.             parameters:parameters_data.toString()
  16.             headers:headers_data
  17.             connection:<connection>
  18.             content-type:"application/json"
  19.         ];
  20.         info response;
  21.     }

Many thanks in advance for your help :).

Kind regards,
Guillaume