2014-12-24 2 views
1

문서 보내기에 DocuSign REST API를 사용하고 있습니다. PHP Rest Docusign Api 클래스를 사용하고 있습니다. DocuSign Secure 필드로 PDF 양식 필드를 변환하고 싶습니다. https://www.docusign.com/p/RESTAPIGuide/Content/REST%20API%20References/Document%20Parameters.htm에있는 DocuSign Rest Api 가이드에 나와있는 것처럼 사실대로 setdocumenttransformPdfFields를 설정했습니다.DocuSign REST API - PDF 양식 필드를 DocuSign으로 변환 보안 필드 - 작동하지 않음

다음 정보를 CURLOPT_POSTFIELDS (으)로 보내고 있습니다. 내 보내는 pdf test1.pdf는 이미 eSignSignHere 어도비 텍스트 필드가 있습니다. Docusign 웹 사이트에서 동일한 pdf 파일을 시도해도 정상적으로 작동합니다. Signature 필드에서도 시도했습니다. 이 데이터

--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":"[email protected]", 
      "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-- 

컬 콜은 다음과 같은 결과를 얻을 :

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

답변

1

당신은 복합 템플릿을 사용하여이 작업을 얻을 수 있습니다. 기존 JSON을 대체 할 JSON 샘플을 소개합니다. 복합 REST 템플릿

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

문서는 여기에서 찾을 수 있습니다 : DocuSign REST v2 API Guide - Composite Templates