我们目前在使用docusign开发集成Web解决方案时遇到一些技术难题.您能否就以下事项提出建议:
1)我们如何在基于文档的rest api调用上为收件人分配签名顺序?我们可以有一个json示例吗?
2)我们目前无法为已添加到已创建信封的用户检索签名网址.此代码以前用于基于模板的信封创建,但不适用于基于使用PDF的代码.
对docusign API的调用和响应(删除了密码)如下所示.已经尝试了两种失败的认证方法.通过信封中找到的任一电子邮件进行检索也会失败.
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."
}
Run Code Online (Sandbox Code Playgroud)
非常感谢
首先,关于指定收件人的顺序,这可以通过为每个收件人设置routingOrder属性来完成.例如,此示例JSON显示了一个收件人结构,该结构指定John应首先接收Envelope(routingOrder = 1),Jane应该接收Envelope second(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",
}
]
}
Run Code Online (Sandbox Code Playgroud)
您收到的响应POST收件人查看请求时收到的"UNKNOWN_ENVELOPE_RECIPIENT"错误消息仅表示您提供的收件人信息没有(完全/完全)匹配您信封中任何收件人的信息指定.
首先,请记住,如果您想要使用POST收件人视图调用来检索可用于启动收件人签名会话的URL,则创建信封请求和POST收件人视图请求必须包含(同样) )收件人的clientUserId属性值.(您发布的请求JSON不包含clientUserId.)
如果在POST收件人视图请求中包含clientUserId属性无法解决您的问题,那么为了进一步排除故障,我建议您对同一个Envelope 执行Get Recipients调用,并将响应中的收件人属性与属性进行比较您在(不成功)POST收件人视图调用中提供的值.该GET收件人的要求很简单:
GET /accounts/{accountId}/envelopes/{envelopeId}/recipients
| 归档时间: |
|
| 查看次数: |
2226 次 |
| 最近记录: |