有人可以向我解释如何在Docusign中使用JSON设置电子邮件主题行和电子邮件。
注意:( JSON字符串必须作为HTTP请求传递)。
谢谢你, Vignesh.B
答案 0 :(得分:1)
使用 emailNotification 属性为每个收件人设置单独的电子邮件主题和电子邮件正文。应该为每个收件人设置emailNotification属性。
以下是createEnvelope请求的示例Json。
POST / v2 / accounts / {accountId} / envelope
{
"recipients": {
"signers": [
{
"email": "recipientone@acme.com",
"name": "recipient one",
"recipientId": "1",
"routingOrder": "1",
"emailNotification": {
"emailSubject": "Please sign the document Recipient One ",
"emailBody": "Hello Recipient One,\r\n\r\nYour consultant has sent you a new document to view and sign. Please click on the View Documents link below, review the content, and sign the document. If you have any questions, please contact your consultant.\r\n\r\nThank you!",
"supportedLanguage": "en"
},
"tabs": {"signHereTabs": [{"documentId": "1", "pageNumber": "1", "xPosition": "100", "yPosition": "100"}]}
},
{
"email": "recipienttwo@acme.com",
"name": "recipient two",
"recipientId": "2",
"routingOrder": "2",
"emailNotification": {
"emailSubject": "Please sign the document Recipient Two ",
"emailBody": "Hello Recipient Two,\r\n\r\nYour consultant has sent you a new document to view and sign. Please click on the View Documents link below, review the content, and sign the document. If you have any questions, please contact your consultant.\r\n\r\nThank you!",
"supportedLanguage": "en"
},
"tabs": {"signHereTabs": [{"documentId": "1", "pageNumber": "1", "xPosition": "100", "yPosition": "200"}]}
}
]
},
"documents": [
{
"documentBase64": "RG9jIFRXTyBUV08gVFdP",
"documentId": "1",
"fileExtension": "txt",
"name": "Simple Contract",
"order": "1"
}
],
"status": "Sent"
}
答案 1 :(得分:1)
使用 emailSubject 和 emailBlurb 属性为信封中的所有收件人设置主题和邮件。必须在json请求的根级别设置这些属性。
注意:您可以按照此answer
中的建议为每位收件人指定 emailNotification 属性,覆盖信封级别的属性以下是createEnvelope请求的示例Json。
POST / v2 / accounts / {accountId} / envelope
{
"emailSubject": "Email subject for all recipients",
"emailBlurb": "Email body for all recipients",
"status": "Sent",
"recipients": {
"signers": [
{
"email": "recipientone@acme.com",
"name": "recipientone",
"recipientId": "1",
"routingOrder": "1",
"tabs": { "signHereTabs": [ { "documentId": "1", "pageNumber": "1", "xPosition": "100", "yPosition": "100" } ] }
},
{
"email": "recipienttwo@acme.com",
"name": "recipient two",
"recipientId": "2",
"routingOrder": "1",
"tabs": { "signHereTabs": [ { "documentId": "1", "pageNumber": "1", "xPosition": "100", "yPosition": "200" } ] }
}
]
},
"documents": [
{
"documentBase64": "RG9jIFRXTyBUV08gVFdP",
"documentId": "1",
"fileExtension": "txt",
"name": "Simple Contract",
"order": "1"
}
]
}