的DocuSign REST API - 转换PDF表单域到安全的DocuSign场 - 不工作 [英] DocuSign REST API - Convert PDF form fields into DocuSign Secure field - Not Working

查看:154
本文介绍了的DocuSign REST API - 转换PDF表单域到安全的DocuSign场 - 不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的DocuSign REST API为标志发送文件。我使用PHP REST的DocuSign API类。我想转换PDF表单域到安全的DocuSign领域。我有setdocumenttransformPdfFields真格的,每个的DocuSign REST API指南<一个href=\"https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Document%20Parameters.htm\" rel=\"nofollow\">https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Document%20Parameters.htm.

我发送以下信息CURLOPT_POSTFIELDS。我发送PDF test1.pdf已经eSignSignHere土坯文本字段。如果我从网站的DocuSign同样尝试pdf文件,这是工作的罚款。我也试图与签名字段。

   -  myboundary
内容类型:应用程序/ JSON
内容处置:表格数据
{
   Emailsubject的:文件标题
   emailBlurb:文件的Blurb
   文件:
      {
         名则为test1.pdf
         documentId:1,
         transformPdfFields:真
      }
   ]
   状态:派,
   收件人:{
      签名者:[
         {
            routingOrder:1,
            recipientId:1,
            名:支持,
            电子邮件:support@varshaawebteam.com
            clientUserId:空,
            defaultRecipient:真
         }
      ]
   }
}
--myboundary
内容类型:应用程序/ PDF
内容处置:文件;文件名=则为test1.pdf; documentid = 1%PDF-1.6
%âãÏÓ
- 所有全文二进制数据这里 -
%% EOF--myboundary--

这个数据卷曲呼叫给出的结果也如下:

  stdClass的对象([envelopeId] =&GT; 46915426-740a-4ea3-8e68-47843568dadc
[URI] =&GT; /信封/ 46915426-740a-4ea3-8e68-47843568dadc [statusDateTime]
= GT; 2014-12-11T11:20:02.2700000Z [状态] =&GT;发送)


解决方案

您可以得到这个工作的复合模板。下面是一些示例JSON将取代现有的JSON。

  {
    Emailsubject的:文件标题
    emailBlurb:文件的Blurb
    状态:派,
    compositeTemplates:[
        {
            inlineTemplates:[
                {
                    序列:1,
                    收件人:{
                        签名者:[
                            {
                                电子邮件:support@varshaawebteam.com
                                名:支持,
                                recipientId:1,
                                defaultRecipient:真,
                            }
                        ]
                    }
                }
            ]
            文件:{
                名则为test1.pdf
                documentId:1,
                transformPdfFields:真
            }
        }
    ]
}

复合REST模板的文档可以在这里找到: REST的DocuSign V2 API指南 - 复合模板

I am using DocuSign REST API for send document for sign. I am using Php Rest Docusign Api class. I want Convert PDF form fields into DocuSign Secure field. I have setdocumenttransformPdfFields as true as per DocuSign Rest Api guide on https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Document%20Parameters.htm.

I am sending following information as CURLOPT_POSTFIELDS. My Sending pdf test1.pdf have already eSignSignHere adobe text field. If I try same pdf file from Docusign website, It is working fine. I have tried also with Signature field.

--myboundary
Content-Type: application/json
Content-Disposition: form-data
{  
   "emailSubject":"Doc Subject",
   "emailBlurb":"Doc Blurb",
   "documents":[  
      {  
         "name":"test1.pdf",
         "documentId":"1",
         "transformPdfFields":"true"
      }
   ],
   "status":"sent",
   "recipients":{  
      "signers":[  
         {  
            "routingOrder":"1",
            "recipientId":"1",
            "name":"support",
            "email":"support@varshaawebteam.com",
            "clientUserId":null,
            "defaultRecipient":true
         }
      ]
   }
}
--myboundary
Content-Type:application/pdf
Content-Disposition: file; filename="test1.pdf"; documentid=1

%PDF-1.6
%âãÏÓ
--All Pdf Binary Data here—
%%EOF

--myboundary--

Curl Call with this data gives result also as following:

stdClass Object ( [envelopeId] => 46915426-740a-4ea3-8e68-47843568dadc
[uri] => /envelopes/46915426-740a-4ea3-8e68-47843568dadc [statusDateTime]
=> 2014-12-11T11:20:02.2700000Z [status] => sent )

解决方案

You can get this working with composite templates. Here is some sample JSON that would replace your existing JSON.

{
    "emailSubject": "Doc Subject",
    "emailBlurb": "Doc Blurb",
    "status": "sent",
    "compositeTemplates": [
        {
            "inlineTemplates": [
                {
                    "sequence": "1",
                    "recipients": {
                        "signers": [
                            {
                                "email": "support@varshaawebteam.com",
                                "name": "support",
                                "recipientId": "1",
                                "defaultRecipient": "true",
                            }
                        ]
                    }
                }
            ],
            "document": {
                "name": "test1.pdf",
                "documentId": "1",
                "transformPdfFields": "true"
            }
        }
    ]
}

Documentation for composite REST templates can be found here: DocuSign REST v2 API Guide - Composite Templates

这篇关于的DocuSign REST API - 转换PDF表单域到安全的DocuSign场 - 不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆