The settings endpoint is used to let Upsales know the options your esign service has for the user when the "create new esign" view is opened.
Endpoint
POST https://yourapp.com/settings
Body
Request body contains the information to know which user the settings should apply for. Usually the config objects in body.config and body.userConfig.
Response
The response has to be a json object with the following properties
delivery
array
An array containing the available signing options. Available options:
"email"
"sms"
documentType
"pdf" or "html"
Upsales has created two workflows for Esign. If you want the user to only work inside Upsales and upload PDF:s us documentType "pdf" or use "html" if you want to use an iFrame to configure the Esign in your system.
allowDraft
true/false
Set to true if you support the documents to be saved as drafts before sending.
multiSign
true/false
Set to true if you support more than one person to sign.
userCanSign
true/false
Set to true if you support signing by users (and not just contacts).
fields
array
Create custom fields with the information you want Upsales users to enter when creating a new Esign (before they are sent to your iFrame).
Example
[{
name: ‘template’,
label: ‘Choose template’,
type: ‘select’,
data: _.map(templates, ({agreement: {id , name}}) => ({value: id, name: name}))
}]
(At the moment we only support 'select' types)
languages
array
An array containg the country codes (two letters) of the languages your service supports.
Example response
{
"delivery": ["email", "sms"],
"documentType": "pdf",
"allowDraft": true,
"userCanSign": true,
"multiSign": true,
"languages": ["en", "de", "sv"]
}