Docusign integration with Zoho Creator - Update envelope status - PUT method

Docusign integration with Zoho Creator - Update envelope status - PUT method

I have managed to set an integration with Docusign to create envelopes. However I have a problem to update the envelope status to void, using Docusing REST API method.

Since Zoho offers the posturl method (POST), I have tried including "X-HTTP-Method-Override": "PUT" in my header (instead of POST) without success.

I keep getting the the following error:

" INVALID_REQUEST_PARAMETER\" - "The request contained at least one invalid parameter. Invalid value for 'status' in envelope definition. Only 'sent' or 'created' (default) are allowed."

This is because it's trying to create a new envelope instead of updating. I am at lost at finding a way to "PUT" instead of "POST" my url. Any advice welcome.

Code below

header = map();
//
headerdetails = map();
headerdetails.put("Username", "xxxxxxx");
headerdetails.put("Password", "xxxxxxxxx");
headerdetails.put("IntegratorKey", "xxxxxxxxxx");
//
header.put("X-DocuSign-Authentication", headerdetails);
header.put("Content-Type", "application/json");
header.put("Accept", "application/json");
header.put("X-HTTP-Method-Override", "PUT");
//
url = (" https://demo.docusign.net/restapi/v2/accounts/xxxxx/envelopes/53f88f09-cc98-43a9-99ce-8769c05a3739");
mapvoid = map();
mapvoid.put("status", "voided");
mapvoid.put("voidedReason", "The report is to be amended.");
//
response = postUrl(url, mapvoid.toString(), header, false);

Thanks in advance for your advice,

Claire