Docusign API:未合并模板角色

时间:2018-04-03 19:41:17

标签: docusignapi

使用模板创建信封时,尽管具有相同的角色名称,但收件人数据不会与模板中定义的角色合并。相反,除了默认模板角色之外,还会发送请求中定义的数据。以下是发送的请求:

{  
       "emailSubject":"Example Email",
       "status":"created",
       "templateId":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
       "templateRoles":[  
          {  
             "email":"john.doe@gmail.com",
             "name":"John Doe",
             "roleName":"role_01"
          }
       ]
}

当我检查应用程序演示中保存的草稿时,信封上现在有2个收件人:John Doe和模板中的占位符。尽管具有相同的角色名称,John Doe不会继承'role_01'的任何模板选项卡。

此请求是使用Docusign的PHP SDK完成的。

编辑:

以下是DocuSign中记录的请求:

POST https://demo.docusign.net:7802/restapi/v2/accounts/[omitted]/envelopes

TraceToken: 273fe6c7-ac95-46b5-8c04-27fb91b6b9a4
Timestamp: 2018-04-04T16:43:42.6317470Z

Content-Length: 221
Content-Type: application/json
Accept: application/json
Host: demo.docusign.net
User-Agent: Swagger-Codegen/2.0.1/php
X-DocuSign-Authentication: {"Username":"56eeb1f9-b9ae-40b1-94f7-5fff2ed2a67f","Password":"[omitted]","IntegratorKey":"[omitted]"}
X-DocuSign-SDK: PHP
X-SecurityProtocol-Version: TLSv1.2
X-SecurityProtocol-CipherSuite: ECDHE-RSA-AES256-GCM-SHA384
x-forwarded-for: 70.234.88.244

{"emailSubject":"Please Sign","status":"created","templateId":"a0e38e1b-a8af-4ce9-9398-cc1bb4bbb5d3","templateRoles":[{"email":"john.doe@gmail.com","name":"John Doe","roleName":"role_01"}]}
201 Created
Content-Type: application/json; charset=utf-8
X-DocuSign-TraceToken: 273fe6c7-ac95-46b5-8c04-27fb91b6b9a4

{
  "envelopeId": "e6a04bb7-f73f-4f22-84a5-b3d4e8ce1fea",
  "uri": "/envelopes/e6a04bb7-f73f-4f22-84a5-b3d4e8ce1fea",
  "statusDateTime": "2018-04-04T16:43:42.2270000Z",
  "status": "created"
}

1 个答案:

答案 0 :(得分:0)

您不应该在模板中出现NameEmail。我认为您在模板名称中分别有FirstName LastNameexample@email.com,电子邮件。 Delete模板中的这些值,模板应该只有roleName。