This chapter explains how to configure the REST connection in SIGNATUS settings, under the section “Upload using REST channel”.
3.1 Upload document #
Upload is used to transfer signed documents from the SIGNATUS application to the server.
Service specification #
| URL | Configured in “REST upload URL” setting Example: https://<host name>/<context>/rest/document |
| Method | POST |
| Authentication | Session Cookie Authentication or Autorization – Basic {username:password} in base64. |
| Content Type | multipart/form-data |
| Response type | application/json |
Request description #
The request body contains dynamic metadata items combined from the following sources:
- Metadata received in the List response (just before the document was downloaded)
- Metadata defined in “REST upload metadata” configuration
| Key | Type | Description |
| filedata | file | Signed document |
| id | text | unique identification of the document |
| filename | text | the actual name of the file generated by the SIGNATUS application |
HTTP- Click to view HTTP code snippet
POST /rest/document HTTP/1.1
Host: localhost:8080
Cookie: JSESSIONID=689266BE6CB2400FEDCEACDFBA52983C
Content-Length: 1276
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="filedata"; filename="PDF/TestLenso_signed.pdf"
Content-Type: application/pdf
(data)
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="group"
tablet
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="state"
tosign
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="filename"
Test-845_1777458718352.pdf
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="name"
Kerry Tremblay
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="number"
528
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="sid"
Cole Group
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="id"
Rb7VgVYshBBy8QMLDMT5a4_3GRW1AZdjQb08R9a5AvqRfuZt_kY0Xv6qbvXuqfob9W_H8LMD79SAVqkx0XRozw
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="reuploadState"
signed
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="date"
1777459020318
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="modification"
2026-04-29 12:37:00
------WebKitFormBoundary7MA4YWxkTrZu0gW--
Response description #
| Status code | Description |
| 200 OK | Upload successful |
| 400 Bad Request | When request validation failed |
| 401 Unauthorized | When user is not authenticated |
| 403 Forbidden | When user lacks required permissions |
| 404 Not Found | If the document with the specified id does not exist. |
| 500 Internal Server Error | Server processing error |
Success response example :
{
"message": "msg.document.upload",
"result": "Rb7VgVYshBBy8QMLDMT5a4_3GRW1AZdjQb08R9a5AvqRfuZt_kY0Xv6qbvXuqfob9W_H8LMD79SAVqkx0XRozw"
}Error response example :
{
"message": "err.filedata.missing"
}