我们目前正经历一些技术上的困难,而开发一个综合的web解决方案使用docusign。请您就下列事项提出建议:
下面显示了对docusign的调用和响应(删除了密码)。已经尝试了两种认证方法,但都失败了。通过信封中的任何一封电子邮件进行检索也会失败。
POST \\https://demo.docusign.net/restapi/v2/accounts/426142/envelopes/3b2d7418-27d3-4a80-8969-d875b6fb9548/views/recipient HTTP/1.1
X-DocuSign-Authentication: {"Username":"18f90756-70b1-4f5f-b360-48b198a17215","Password":"*REMOVED*","IntegratorKey":"*REMOVED*"}
Accept: application/json, application/xml, text/json, text/x-json, text/javascript, text/xml
Content-Type: application/json
Host: demo.docusign.net<http://demo.docusign.net>
Content-Length: 128
Accept-Encoding: gzip, deflate
{
"authenticationMethod": "email",
"userName": "Simon",
"email": "test@email",
"returnUrl": "http://www.google.com"
}
HTTP/1.1 400 Bad Request
Cache-Control: no-cache
Content-Length: 274
Content-Type: application/json; charset=utf-8
Date: Fri, 24 Jan 2014 12:11:38 GMT
Strict-Transport-Security: max-age=7776000; includeSubDomains
{
"errorCode": "UNKNOWN_ENVELOPE_RECIPIENT",
"message": "The recipient you have identified is not a valid recipient of the specified envelope. Envelope recipient could not be determined. 'clientUserId', 'email', or 'userName' in request and envelope may not match."
} 发布于 2014-01-27 16:17:32
首先,关于指定收件人的顺序,只需设置每个收件人的routingOrder属性即可完成。例如,这个示例JSON显示了一个收件人结构,该结构指定John应该接收信封第一个(routingOrder=2):,Jane应该接收信封第二个(routingOrder=2):
"recipients": {
"signers": [
{
"name": "John Doe",
"email": "johnsemail@outlook.com",
"recipientId": "1",
"routingOrder": "1",
},
{
"name": "Jane Smith",
"email": "janesemail@outlook.com",
"recipientId": "2",
"routingOrder": "2",
}
]
}您在响应POST收件人视图请求时收到的“”错误消息仅意味着您提供的收件人信息(完全/完全)与您指定的信封中的任何收件人的信息不匹配。
首先,请记住,如果希望使用POST收件人视图调用来检索可用于启动收件人签名会话的URL,则创建信封请求和POST收件人视图请求都必须包含收件人的(相同)属性值。(您发布的请求JSON不包括clientUserId.)
如果将clientUserId属性包含在POST收件人视图请求中并不能解决您的问题,那么要进一步解决问题,建议您为相同的信封执行Get收件人调用,并将响应中的收件人属性与在(不成功的) POST收件人视图调用中提供的属性值进行比较。GET收件人请求很简单:
GET /accounts/{accountId}/envelopes/{envelopeId}/recipients
https://stackoverflow.com/questions/21385552
复制相似问题