In multi-round signing with PDF with tags, with the registration of the first signature Request it is necessary to define which signature acrofields should be available. This is done via parameter allowedFields: SIGNATURE, in our example value _SO1_ (only _SO1_ will be available for registered signature Request) Note: as in example before do not forget to change the state of the document to “tags”.
{
"signatureRequestId": "1d58a59e-e8f7-4d07-bb99-d3fa39cb58a8",
"expirationTime": "1702288000000",
"sendInfoURL": "http://api.okdokument/info",
"resulturl": "https://okdokument.com/",
"rules": {
"signAnywhereEnabled": false
},
"allowedFields": {
"SIGNATURE": "_SO1_"
},
"filedata": {
"content": "xyz_JVBERi0xLjc==",
"state": "tags"
}
}
For the next round of signing, the same rules apply as for simple PDF apply. Portal has to:
- Register new signatureRequestId – if generated by OKdokument API it will be new random value, if pre-filled by Portal new ID must be used
- Reference to document ID – signed document from the first round of signing is stored in internal OKdokument API storage. Use document ID as a reference of the document (filedata with document content is not needed)
- Change state – after signing the document in the first round, the document changes the state to “signed”. It is needed to change the document state to “tosign” in order to sign the document in the next round of signing
Also, it should not be forgotten to change the available signature in allowedFields to _SO2_ value (only _SO2_ will be available for registered signature Request)
{
"signatureRequestId": "1d58a59e-e8f7-4d07-bb99-d3fa39cb58a8",
"expirationTime": "1702288000000",
"sendInfoURL": "http://api.okdokument/info",
"resulturl": "https://okdokument.com/",
"rules": {
"signAnywhereEnabled": false
},
"allowedFields": {
"SIGNATURE": "_SO2_"
},
"id": "y7Ki_u1mrUwijfb-o_S1JiphSsoXya8iypH380F",
"changeState": "tosign"
}
