以下を送信するために使用する複合テンプレートがあります。
- 署名用の 1 つのドキュメント
- 署名を必要としないが含まれている別のドキュメント
- テンプレートに保存された文書
次のエラーが表示されます: Web リクエストの実行中にエラーが発生しました。{ "errorCode": "UNSPECIFIED_ERROR", "message": "Base-64 char 配列または文字列の長さが無効です。" Base64 が 4 の倍数であることを確認しました。問題は、適切なコンテンツ タイプがないことだと思います。Nintex と SharePoint を使用して、Rest API を DocuSign に送信しています。
コンテンツ タイプ: multipart/form-data;boundary=MY_BOUNDARY
Accept: application/json
Host: na2.docusign.net
--MY_BOUNDARY
Content-Type: application/json
Content-Disposition: form-data
{
"emailSubject": "Contract Package for {ItemProperty:Title}",
"status" : "sent",
"compositeTemplates": [
{
"inlineTemplates": [
{
"sequence" : 2,
"recipients": {
"signers" : [
{
"email": "{WorkflowVariable:varCreatedByEmail}",
"name": "{WorkflowVariable:varCreatedByName}",
"recipientId": "1",
"roleName": "MI Employee",
"routingOrder": "1",
"tabs":
{"signerAttachmentTabs": [
{"anchorString": "/ea1/",
"anchorXOffset": "1",
"anchorYOffset": "0",
"tabLabel": "Scope of Work Attachment",
"optional": "true",
"tabOrder": 1},
{"anchorString": "/ea2/",
"anchorXOffset": "1",
"anchorYOffset": "0",
"tabLabel": "Pricing Attachment",
"optional": "true",
"tabOrder": 3}],
"textTabs":[
{"anchorString": "/ec1/",
"anchorXOffset": "1",
"anchorYOffset": "0",
"tabLabel": "Scope of Work Text",
"disableAutoSize": true,
"width": 550,
"height": 220,
"tabOrder": 2},
{"anchorString": "/ec2/",
"anchorXOffset": "1",
"anchorYOffset": "0",
"tabLabel": "Pricing Text",
"disableAutoSize": true,
"width": 550,
"height": 220,
"tabOrder": 4}]
}
},
{
"email": "{ItemProperty:E_x002d_Mail}",
"name": "{ItemProperty:Primary_x0020_Contact}",
"recipientId": "2",
"roleName": "Vendor",
"routingOrder": "2",
"tabs":
{"fullNameTabs": [
{"anchorString": "/vn/",
"anchorXOffset": "1",
"anchorYOffset": "0"}]
,
"signHereTabs":[
{"anchorString": "/vs/",
"anchorXOffset": "1",
"anchorYOffset": "0"}]
,
"dateSignedTabs":[
{"anchorString": "/dvs/",
"anchorXOffset": "1",
"anchorYOffset": "0"}]
,
"initialHereTabs":[
{"anchorString": "/vi/",
"anchorXOffset": "1",
"anchorYOffset": "0"}]
,
"titleTabs":[
{"anchorString": "/vt/",
"anchorXOffset": "1",
"anchorYOffset": "0"}]
,
"emailAddressTabs":[
{"anchorString": "/ve/",
"anchorXOffset": "1",
"anchorYOffset": "0"}]
,
"textTabs":[
{"anchorString": "/va1/",
"anchorXOffset": "1",
"anchorYOffset": "0",
"tabLabel": "Address Line 1"},
{"anchorString": "/va2/",
"anchorXOffset": "1",
"anchorYOffset": "0",
"tabLabel": "Address Line 2",
"required": false},
{"anchorString": "/va3/",
"anchorXOffset": "1",
"anchorYOffset": "0",
"tabLabel": "Address Line 3",},
{"anchorString": "/vc/",
"anchorXOffset": "1",
"anchorYOffset": "0",
"tabLabel": "Vendor Name",
"disableAutoSize": true,
"width": 225,
"height": 32}]
}
},
{
"email": "{WorkflowVariable:varContractApproverEmail}",
"name": "{WorkflowVariable:varContractApproverName}",
"recipientId": "3",
"roleName": "MI Approver",
"routingOrder": "3",
"tabs":
{"signHereTabs":[
{"anchorString": "/as/",
"anchorXOffset": "1",
"anchorYOffset": "0"}]
,
"dateSignedTabs":[
{"anchorString": "/das/",
"anchorXOffset": "1",
"anchorYOffset": "0"}]
,
"fullNameTabs":[
{"anchorString": "/an/",
"anchorXOffset": "1",
"anchorYOffset": "0"}]
,
"titleTabs":[
{"anchorString": "/at/",
"anchorXOffset": "1",
"anchorYOffset": "0"}]
,
"emailAddressTabs":[
{"anchorString": "/ae/",
"anchorXOffset": "1",
"anchorYOffset": "0"}]
}
} ]
}
} ],
"document": {
"documentId": 1,
"name": "{WorkflowVariable:varContractName}",
"documentbase64": "{WorkflowVariable:varContractBase64}"
}
},
{
"inlineTemplates": [
{
"sequence" : 3,
"recipients": {
"carbonCopies" : [
{
"email": "{WorkflowVariable:varCreatedByEmail}",
"name": "{Common:InitiatorsDisplayName}",
"recipientId": "1",
"roleName": "MI Employee",
"routingOrder": "1"
},
{
"email": "{ItemProperty:E_x002d_Mail}",
"name": "{ItemProperty:Primary_x0020_Contact}",
"recipientId": "2",
"roleName": "Vendor",
"routingOrder": "2"
},
{
"email": "{WorkflowVariable:varContractApproverEmail}",
"name": "{WorkflowVariable:varContractApproverName}",
"recipientId": "3",
"roleName": "MI Approver",
"routingOrder": "3"
}]
}
}],
"document": {
"documentId": 2,
"name": "{WorkflowVariable:varExhibitAName}",
"documentbase64": "{WorkflowVariable:varExhibitABase64}"
}
},
{
"serverTemplates": [
{
"sequence" : 6,
"templateId": "D7472F81-46F9-4BEB-9017-DFAD3C0BCE83"
}],
"inlineTemplates": [
{
"sequence" : 7,
"recipients": {
"signers" : [{
"email": "{WorkflowVariable:varCreatedByEmail}",
"name": "{Common:InitiatorsDisplayName}",
"recipientId": "1",
"roleName": "MI Employee",
"routingOrder": "1"
},
{
"email": "{ItemProperty:E_x002d_Mail}",
"name": "{ItemProperty:Primary_x0020_Contact}",
"recipientId": "2",
"roleName": "Vendor",
"routingOrder": "2",
"tabs": {
"textTabs": [
{
"tabLabel": "VendorName"}]}
},
{
"email": "{WorkflowVariable:varContractApproverEmail}",
"name": "{WorkflowVariable:varContractApproverName}",
"recipientId": "3",
"roleName": "MI Approver",
"routingOrder": "3"
}
]
}
}],
"document": {
"documentId": 4,
"name": "CCare_Pledge.pdf"
}
}]
}
--MY_BOUNDARY
Content-Type: application/pdf
Content-Disposition: file; filename="{WorkflowVariable:varContractName}"; documentid="1"
<document bytes removed>
--MY_BOUNDARY--
Content-Type: application/pdf
Content-Disposition: file; filename="{WorkflowVariable:varExhibitAName}"; documentid="2"
<document bytes removed>
--MY_BOUNDARY--
Content-Type: application/pdf
Content-Disposition: file; filename="CCare_Pledge.pdf"; documentid="4"
base64 へのリンク - http://www.mihomes.com/corp/vit/Base64.txt