#Signing config creation
The signing config is a JSON that specifies on which pages and at what coordinates the specific user has to sign. The size of the signer's rectangle.
- Signing config allows you to sign at multiple places on same page.
- Sign at multiple places on different pages.
- Sign at any coordinate on a page.
#Understanding the config schema
{"signers": [{"optional": false,"signRectangles": [{"coordinate": {"lowerLeftX": 402,"lowerLeftY": 53,"upperRightX": 542,"upperRightY": 93},"pages": [0,1]},{"coordinate": {"lowerLeftX": 358,"lowerLeftY": 232,"upperRightX": 498.53009106595096,"upperRightY": 272.52901734104046},"pages": [2]}]}]}
- The signers array specifies the config for each signer. Each signer config has information about what pages and coordinates the specific signer has to sign.
- The above example indicates there is one signer. Who should sign at
(x1:402, y1:53, x2:542, y2:93)
on pages 0 and 1. Assuming starting index as 0. On coordinate(x1:358, y1:232, x2:498.53, y2:272)
on page 2. - The coordinates are the lower left and upper right of the diagonal of the sign rectangle.
- The config can be used to get flexible configurations like one signer signs on multiple places on the same page with multiple signers in the overall configuration.
- The
optional
field indicates whether the sign by that signer is required for completion of document.
#Examples
#Multiple signers, different pages and same coordinates
Signer 1 signs at (x1:402, y1:53, x2:542, y2:93)
on pages 0 and 1.
Signers 2 signs at (x1:402, y1:53, x2:542, y2: 93)
on pages 2 and 3.
{"signers": [{"optional": false,"signRectangles": [{"coordinate": {"lowerLeftX": 402,"lowerLeftY": 53,"upperRightX": 542,"upperRightY": 93},"pages": [0,1]}]},{"optional": false,"signRectangles": [{"coordinate": {"lowerLeftX": 402,"lowerLeftY": 53,"upperRightX": 542,"upperRightY": 93},"pages": [2,3]}]}]}
#Multiple signers and one signer signs in multiple places on the same page
Signer 1 signs at (x1:402, y1:53, x2:542, y2:93)
on pages 0 and 1.
Signer 1 signs at (x1:358, y1:232, x2:498, y2:272)
on pages 0 and 1.
Signer 2 signs at (x1:402, y1: 53, x2: 542, y2:93)
on pages 2 and 3.
{"signers": [{"optional": false,"signRectangles": [{"coordinate": {"lowerLeftX": 402,"lowerLeftY": 53,"upperRightX": 542,"upperRightY": 93},"pages": [0,1]},{"coordinate": {"lowerLeftX": 358,"lowerLeftY": 232,"upperRightX": 498,"upperRightY": 272},"pages": [0,1]}]},{"optional": false,"signRectangles": [{"coordinate": {"lowerLeftX": 402,"lowerLeftY": 53,"upperRightX": 542,"upperRightY": 93},"pages": [2,3]}]}]}
#Upload signing config
Setu has processed your request successfully.
Upload the signing config to get the config id in response.
The request body should be a continuos string. To achieve that, remove line breaks from the JSON before uploading. (remove line break)
Request
POST /api/signature/config{"signers": [{"optional": false,"signRectangles": [{"coordinate": {"lowerLeftX": 402,"lowerLeftY": 53,"upperRightX": 542,"upperRightY": 93},"pages": [0, 1]},{"coordinate": {"lowerLeftX": 358,"lowerLeftY": 232,"upperRightX": 498.53009106595096,"upperRightY": 272.52901734104046},"pages": [2]}]}]}
Response
You will get the following details—
- Unique configId
id
which can be used to create signature request. - The same configId can be used across multiple signature request using doc of one type.
{"configId": "825169c7-08a4-4739-94d5-0d8c4ef5e4f1","traceId": "5de9b52d-1252-409b-9bc5-063fa67f8191"}
#Flow of API calls
Read more about the flow of API calls here