Zoho creator integration with Zoho Books help: API call to mark invoice as void ?

Zoho creator integration with Zoho Books help: API call to mark invoice as void ?




I am trying to update status of an invoice on Zoho Books as void via Zoho Creator:

I am trying to reproduce the following API call:
$ curl https://books.zoho.eu/api/v3/invoices/:invoice_id/status/sent?organization_id=10234695 -H "Authorization: Zoho-authtoken ba4604e8e433g9c892e360d53463oec5" -H "Content-Type: application/json;charset=UTF-8"

I have tried different permutation but in vain, so far this what I have got:

String Test.zohovoidinvoice()
{

url = "https//books.zoho.com/api/v3/invoices/167517000002816431/status/void?organization_id=XXXXXXXX";

//(
167517000002816431 is the ID of the invoice I am trying to void)

header = map();
header.put("authtoken", "xxxxxxxxxxxxxxxxxxxxxx");
response = postUrl(url,details, false);

return response.toString();
}

Below is the response I keep getting:

Return Value:
{"responseText":"internal exception","responseCode":"-1"}

Thanks in advance for your help,
Claire