DocuSign-X-HTTP-Method-Override从邮政到put-鉴于将信封状态更新为void



我正在使用Zoho Creator,并设法与DocuSign设置了集成以创建信封。但是,使用Docusing REST API方法,我有一个问题将信封状态更新为void。

Zoho创建者提供2种可能性:Posturl方法和Geturl,如下 response = postUrl(url, jsonstring, header, false);

没有选择" put"的选项,并且已经尝试使用选项" x-http-method-override":" put"我的标题(而不是帖子(而没有成功。

我不断收到以下错误:

" invalid_request_parameter " - "请求包含一个无效的参数。信封定义中的'状态'的无效值。只有'send''或'创建'(默认((默认(。">

因为它试图创建一个新的信封而不是更新。

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);

事先感谢您的建议,

克莱尔

REST API不支持X-HTTP-Method-Override,它似乎是Restapi Explorer中的错误。我已经向我们的开发团队报告了Restapi Explorer Bug,并可能在将来发布。您需要使用PUT来更新信封的状态。

最新更新