因此,当从我们的自定义界面提交它们时,我试图在我们的 DocuSign 模板中预填充一些字段,但请求似乎无法在模板中找到它们。我们正在使用 REST、cURL 和 Codeigniter。我的数据数组如下:
$data = array("accountId" => $accountId,
"emailSubject" => "Hello World!",
"emailBlurb" => "This comes from PHP",
"templateId" => "********-****-****-****-************",
"templateRoles" => array(
array(
"email" => "****@******.com",
"name" => "**** *****",
"roleName" => "LC3"
),
array(
"email" => $this->input->post("applicant_email"),
"name" => $this->input->post("applicant_name"),
"roleName" => "Applicant",
"tabStatuses" => array(
"textTabs" => array (
array (
"tabLabel" => "lic_num",
"tabValue" => $this->input->post("license_number")
),
array (
"tabLabel" => "ubi_num",
"tabValue" => $this->input->post("ubi_number")
),
array (
"tabLabel" => "tra_nam",
"tabValue" => $this->input->post("trade_name")
)
)
)
)
),
"status" => "sent");
我尝试使用制表符代替制表符,但这也不起作用,我们的 XML 响应使用制表符代替制表符。自 API 演练发布以来,发生了什么变化吗?
编辑:因此,在对 Chrome 的 Postman 扩展进行多次试验和错误之后,这是我实际上没有出错的 JSON 请求:
{
"accountId":"c771ba8c-2947-4bec-acab-15b1b48a11b6",
"emailSubject":"Hello World!",
"emailBlurb":"This comes from PHP",
"templateId":"B96D0480-8792-43E8-AE11-E2AEAC74E601",
"templateRoles":[
{
"email":"mike@cloudpwr.com",
"name":"Mike Longmire",
"roleName":"LC3",
"tabStatuses":[
{
"tabStatus":[
{
"tabLabel":"lic_num",
"tabValue":"1111"
},
{
"tabLabel":"ubi_num",
"tabValue":"2222"
},
{
"tabLabel":"tra_nam",
"tabValue":"Flakey"
}
]
}
],
"email":"duckie715@gmail.com",
"name":"Mike Longmire",
"roleName":"Applicant"
}
],
"status":"sent"
}
我得到了同样的回应:
{
"envelopeId": "0063d398-36b7-4e2f-8515-6ed9ab62aaeb",
"uri": "/envelopes/0063d398-36b7-4e2f-8515-6ed9ab62aaeb",
"statusDateTime": "2013-10-08T18:05:54.9926661Z",
"status": "sent"
}
有任何想法吗?