Integration Example
Walk-through
Push PDF document from external application to SimpleSIgn
In this walk-through example, we guide you through the following use case:
From an external web application, ask a user to digitally sign a PDF document using his local SimpleSign application. Once the PDF document has been locally signed by the user, the external application will receive the document using a callback URL.
Prepare to use SimpleSign API
Health check for the SimpleSign module
Verify the SimpleSign CMS module is enabled:
Response:
The response contains the SimpleSign version installed on your system, and the SimpleSign application folder selected by the user upon startup.
When no SimpleSign has been detected, you will not be able to continue from here.
Push PDf document
The external application can push a new PDF document in 2 steps:
upload PDF file
request digital signature - including metadata -
See the sequence diagram
To upload a PDF file, you can use the download function
The result of the file upload, is that the file will be uploaded (from the application point of view) to the SimpleSign exchange folder.
The response will return the information of the file uploaded. This is important as you will need to use the name
in the request for adding context information.
When you try to upload a file which already exists in the SimpleSign folders or Database it will automatically rename the file for you. The response will contain the new name in the name
property and the full path to the file in the path
property.
After the preceding request, nothing will happen, until the external application pushed the context information as well.
This can be done by sending a request to the SimpleSign CMS module:
You can choose to not receive the actual file in the callback by adding the sendFile
property and setting it to false.
This will send the callback not in Multipart form-data but as JSON, the name can then be used with the Download function to get the actual PDF document.
An example json with sendFile
propety being false (not returning with Multipart form-data);
Receive Signed PDF document
When the document has been signed, the SimpleSign CMS module will send the document information to the defined callback.
Depending on the sendFile
property this will be in either application/json
or in form-data
The response as Multipart;
The response as JSON;
If you have chosen to get the signed document information as JSON you will need to retrieve the file via the SimpleSign CMS API.
This can be done with the download endpoint. The filename
property will be the file received in the callback
The response will be a streamed file.
Below an image on how this looks like in postman
Last updated