Docusign - X-HTTP-Method-Override 从 POST 到 PUT - 鉴于将信封状态更新为无效
Docusign - X-HTTP-Method-Override from POST to PUT - in view of updating envelope status to void
我正在使用 Zoho Creator 并已成功设置与 Docusign 的集成以创建信封。但是我在使用 Docusing REST API 方法将信封状态更新为无效时遇到问题。
Zoho creator提供了2种可能:posturl方式和geturl方式,如下
response = postUrl(url, jsonstring, header, false);
方法 "PUT" 没有选项,我尝试使用选项 "X-HTTP-Method-Override": "PUT" 在我的 header 中(而不是 POST)没有成功。
我不断收到以下错误:
" 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."
因为它正在尝试创建一个新信封而不是更新。
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 错误,并且可能会在未来的版本中修复。您需要使用 PUT
来更新信封的状态。
我正在使用 Zoho Creator 并已成功设置与 Docusign 的集成以创建信封。但是我在使用 Docusing REST API 方法将信封状态更新为无效时遇到问题。
Zoho creator提供了2种可能:posturl方式和geturl方式,如下
response = postUrl(url, jsonstring, header, false);
方法 "PUT" 没有选项,我尝试使用选项 "X-HTTP-Method-Override": "PUT" 在我的 header 中(而不是 POST)没有成功。
我不断收到以下错误:
" 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."
因为它正在尝试创建一个新信封而不是更新。
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 错误,并且可能会在未来的版本中修复。您需要使用 PUT
来更新信封的状态。