This article will guide you through the process of sending a document for signature using a template with the Sign.Plus eSignature API.
通过遵循这些步骤,您将从模板创建一个信封,设置收件人的详细信息,并发送信封供签名。
必备条件
- 带有 的 Sign.Plus 帐户的 API 计划
- 您的
个人访问令牌
- 在您的 Sign.Plus 帐户中存在的模板
第 1 步:从模板创建信封
- Use the POST /v2/envelope/from_template/{template_id} endpoint to create a new envelope from a template.
- Replace
{template_id}
with the ID of your existing template.
Where can I find my template ID?- Go to https://app.sign.plus/templates .
- 点击所需模板名称。
- 从右侧侧边栏复制ID。
- Go to https://app.sign.plus/templates .
- Send a POST request to
POST /v2/envelope/from_template/{template_id}
with the following JSON body:{
"name": "My wonderful envelope from template"
} - 将您的 API 密钥包含在
授权
头中。 - On success, you will receive
an Envelope
object.{
"id": "66eb7d0467d2d549b89fcb6d",
// ...
"signing_steps": [
{
"recipients": [
{
"id": "66eb7d0467d2d549b89fcb70",
"uid": null,
"name": "",
"email": "",
"role": "SIGNER",
"verification": null
}
]
},
{
"recipients": [
{
"id": "66eb7d0467d2d549b89fcb71",
"uid": null,
"name": "",
"email": "",
"role": "RECEIVES_COPY",
"verification": null
},
{
"id": "66eb7d0467d2d549b89fcb72",
"uid": null,
"name": "",
"email": "",
"role": "SIGNER",
"verification": null
}
]
}
],
"documents": [
// ...
],
"notification": {
// ...
}
} - 将返回的
id
另存为信封_id
用于未来的 API 调用。 - Record the
id
of each recipient for later use in the signing process.
Examples:-
66eb7d0467d2d549b89fcb71
: FirstSIGNER
(Step 1) -
66eb7d0467d2d549b89fcb71
:RECEIVES_A_COPY
(Step 1) -
66eb7d0467d2d549b89fcb72
: SecondSIGNER
(Step 2)
-
第 2 步:设置收件人详细信息
如果您的模板没有固定收件人,您需要设置或更新收件人详细信息:
- Use the POST /v2/envelope/{envelope_id}/signing_steps endpoint to update recipient information.
- Replace
{envelope_id}
with the ID you received in Step 1. - Send a
POST
request with the following JSON body:{
"signing_steps": [
{
"recipients": [
{
"id": "66eb7d0467d2d549b89fcb70",
"name": "John Doe",
"email": "john.doe@example.com",
"role": "SIGNER"
}
]
},
{
"recipients": [
{
"id": "66eb7d0467d2d549b89fcb71",
"name": "Mark Twain",
"email": "m.twain@example.com",
"role": "RECEIVES_COPY"
},
{
"id": "66eb7d0467d2d549b89fcb72",
"name": "Jane Smith",
"email": "j.smith@example.com",
"role": "SIGNER"
}
]
}
]
} - 成功后,您将收到一组
签名步骤
对象。
第 3 步:发送您的信封以便签名
- Use the POST /v2/envelope/{envelope_id}/send endpoint to send the envelope.
- Replace
{envelope_id}
with your envelope ID from Step 1. - Send a
POST
request to this endpoint. - 一旦成功,信封将送交收件人签署。
五. 结论
您现在已经成功地发送了一个使用 Sign.Plus eSignature API模板的文档供签名。 收件人将收到一封包含签名文档链接的电子邮件通知。
使用模板可以大大简化您的文档签名工作流程,尤其是对于经常使用的、布局一致和签名要求的文档。