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
The endpoint must use HTTPS.
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
Respond with status 200 or 201. By default, Upsales waits 30 seconds for the response. The response has to be a json object with the following properties
delivery array
An array containing the available signing options. Email is always offered. Include "sms" to also let the user send the esign by 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 use 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).
bankIdCountries array
The countries where your service supports signing with BankID, as two-letter country codes. Supported values: "se", "no", "dk". If the array has at least one country, the user can choose Will sign with BankID for each signer. Leave it empty if you don't support BankID.
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). Each field needs name, label and type. A select field lists its options in data, each with a value and a name.
Example
[{
"name": "template",
"label": "Choose template",
"type": "select",
"data": [
{"value": 1, "name": "Sales agreement"},
{"value": 2, "name": "NDA"}
]
}]
(At the moment we only support 'select' types)
languages array
An array containing the language codes (two letters) of the languages your service supports. Supported values: "sv", "en", "no", "fi", "da", "de".
Example response
{
"delivery": ["email", "sms"],
"documentType": "pdf",
"allowDraft": true,
"userCanSign": true,
"multiSign": true,
"bankIdCountries": ["se"],
"languages": ["en", "de", "sv"]
}