Copy Document from templateFor this api call you just need the templateId. The response of this call is a new SspFileId and the workstep configuration of the template. You can use the SspFileId and the workstep configuration to send an envelope. api endpoints: - REST: /v4/envelope/{templateId}/copyFromTemplate
- SOAP: CopyDocumentFromTemplate_v1
Create envelope from templateYou can also create an envelope from a template via api. You can find a configuration in the next section. After finishing the api call you will get a draftId for the created envelope. Code Block |
---|
| {
"TemplateId": "##TemplateId##",
"EnvelopeOverrideOptions": {
"Recipients": [
{
"RecipientId": "##RecipientId##",
"OrderIndex": 1,
"Email": "##EMAIL##",
"Recipient": {
"Email": "##EMAIL##",
"FirstName": "##NAME##",
"LastName": "##NAME##",
"LanguageCode": "en",
"EmailBodyExtra": "string",
"DisableEmail": false,
"AddAndroidAppLink": false,
"AddIosAppLink": false,
"AddWindowsAppLink": false,
"AllowDelegation": true,
"SkipExternalDataValidation": false,
"AuthenticationMethods": [
{
}
],
"SwissComCertificateData": {
"PhoneNumber": "string",
"MobileId": "string",
"Parameters": [
{
"Key": "string",
"Value": "string"
}
]
},
"RemoteCertificateData": {
"UserId": "string",
"DeviceId": "string"
},
"OtpData": {
"PhoneMobile": "string"
},
"Pkcs7SignerData": {
"AllowedPkcs7SignatureTypes": [
"LocalCertificate"
]
}
}
}
],
"AddFormFields": {
"Forms": {
}
},
"OverrideFormFieldValues": {
"Forms": {
}
},
"Name": "string",
"EmailSubject": "string",
"EmailBody": "string",
"EnableReminders": true,
"FirstReminderDayAmount": 1,
"RecurrentReminderDayAmount": 1,
"CallbackUrl": "string",
"StatusUpdateCallbackUrl": "string",
"WorkstepEventCallback": {
"Url": "string",
"Blacklist": [
"string"
],
"WhiteList": [
"string"
]
},
"MetaDataXml": "string"
},
"CreateDraftOptions": {
"AfterSendRedirectUrl": "string",
"AfterSendCallbackUrl": "string",
"RedirectPolicy": "None",
"AllowAgentRedirect": true,
"IframeWhiteList": "string"
}
} |
Expand |
---|
title | Alternative: SOAP implementation (deprecated) |
---|
|
Code Block |
---|
| <overrideOptions>
<name>new name</name>
<eMailSubject>new subject</eMailSubject>
<eMailBody>new body</eMailBody>
<callbackUrl></callbackUrl>
<statusUpdateCallbackUrl></statusUpdateCallbackUrl>
<enableReminders>true</enableReminders>
<firstReminderDayAmount>1</firstReminderDayAmount>
<recurrentReminderDayAmount>2</recurrentReminderDayAmount>
<beforeExpirationReminderDayAmount>1</beforeExpirationReminderDayAmount>
<daysUntilExpire>20</daysUntilExpire>
<recipientOverrides>
<recipientOverride>
<recipientLookUp>
<eMail>##EMAIL##</eMail>
<orderIndex>1</orderIndex>
</recipientLookUp>
<recipient>
<eMail>##EMAIL##</eMail>
<emailBodyExtra>some extra text</emailBodyExtra>
<firstName>Hello</firstName>
<lastName>World</lastName>
<languageCode>en</languageCode>
</recipient>
</recipientOverride>
</recipientOverrides>
</overrideOptions> |
|
For a SOAP implementation the following information (draftOptions) must be also filled in: Expand |
---|
title | Alternative: SOAP implementation (deprecated) |
---|
|
Code Block |
---|
| <draftOptions>
<afterSendRedirectUrl></afterSendRedirectUrl>
<afterSendCallbackUrl></afterSendCallbackUrl>
<redirectPolicy>ToDesigner</redirectPolicy>
</draftOptions> |
|
Send envelope from templateNow you can send an envelope from a template. For this call you need the template Id as well as the overrideOptions. The next configurations show you the override options: Info |
---|
The configuration has not all settings included. It is just for testing the API call with some simple configuration. The whole configuration you can find in the next collapse. |
Code Block |
---|
| {
"TemplateId": "##TemplateId##",
"EnvelopeOverrideOptions": {
"Recipients": [
{
"RecipientId": "##RecipientId##",
"OrderIndex": 1,
"Email": "##EMAIL##",
"Recipient": {
"Email": "##EMAIL##",
"FirstName": "TESTNAME",
"LastName": "TESTLASTNAME",
"LanguageCode": "en",
"EmailBodyExtra": "string",
"OtpData": {
"PhoneMobile": "string"
},
"Pkcs7SignerData": {
"AllowedPkcs7SignatureTypes": [
"LocalCertificate"
]
}
}
}
],
"AddFormFields": {
"Forms": {
}
},
"OverrideFormFieldValues": {
"Forms": {
}
},
"Name": "TEST",
"EmailSubject": "TESTEMAILSUBJECT",
"EmailBody": "string",
"EnableReminders": true,
"FirstReminderDayAmount": 2,
"RecurrentReminderDayAmount": 1,
"BeforeExpirationDayAmount": 1,
"DaysUntilExpire": 25,
"CallbackUrl": "string",
"StatusUpdateCallbackUrl": "string",
"MetaDataXml": "string"
}
} |
Expand |
---|
title | Alternative: SOAP implementation (deprecated) |
---|
|
Code Block |
---|
| <overrideOptions>
<name>Sending with template</name>
<eMailSubject>Subject of the envelope</eMailSubject>
<eMailBody>Please sign the document!</eMailBody>
<callbackUrl></callbackUrl>
<statusUpdateCallbackUrl></statusUpdateCallbackUrl>
<enableReminders>true</enableReminders>
<firstReminderDayAmount>1</firstReminderDayAmount>
<recurrentReminderDayAmount>2</recurrentReminderDayAmount>
<beforeExpirationReminderDayAmount>1</beforeExpirationReminderDayAmount>
<daysUntilExpire>20</daysUntilExpire>
<recipientOverrides>
<recipientOverride>
<recipientLookUp>
<eMail>##EMAIL##</eMail>
<orderIndex>1</orderIndex>
</recipientLookUp>
<recipient>
<eMail>##EMAIL##</eMail>
<emailBodyExtra>Some extra text</emailBodyExtra>
<firstName>FIRSTNAME</firstName>
<lastName>LASTNAME</lastName>
<languageCode>en</languageCode>
</recipient>
</recipientOverride>
</recipientOverrides>
</overrideOptions> |
|
|