startMDWorkflow($startWFRequest)
startMDWorkflow should be called when a digital signature user needs to create a multi-document workflow (send documents to a group of counterparties). It can be retrieved via a soap request using the "startMDWorkflow" method to https://api.maxsignatures.com/MdDigitalSignatureStartMDWorkflowApi.php?wsdl.
startMDWFRequest:{
accountInfo:{
//used to authenticate the user who upload the document
username:'',
//account name, for example: abc@mdemail.md
password:'',
//password
commonName:'',
//owner's common name (this name will appear in counterparties' page)
},
workflow:{
//multi-doc workflow infromation
documents:{
//an array of document object
data:
//base64encoded data of the document
mimeType:
//Mimetype
documentName:'',
//the name of the document
editable:'',
//whether keep the document editable (if document contains forms, set editable parameter = 1 to allow the first counterparty fill the form)
signatureTemplate:{
//document's signature information
signatures:{
//an array of signature objects (signature information)
widget:{
//signature position information
x:
//x position of the signature box
y:
//y position of the signature box
width:
//width of the signature box
height:
//height of the signature box
page:
//which page (page index start from 1) should the signature sign on
}
gsName:
//the name of the graphical signature that will be used for the signature
reason:
//the reason code of the signature
timezone:
//the timezone of the signature
}
fields:{
//An array of empty signature field
widget:{
//signature position information
x:
//x position of the signature box
y:
//y position of the signature box
width:
//width of the signature box
height:
//height of the signature box
page:
//which page (page index start from 1) should the signature sign on
}
signer:
//the email of the counterparty who will be required to sign the signature field
message:
//the message that will appear in the signature field for the counterparty who will be required to sign the signature field
}
}
prefilledFormData:{
//document's prefill information (for form PDF only). It is an array of form field data object
oneFieldData:{
//
fieldName:
//the name of the form field
fieldValue:
//the value you want to pre-filled to the form field
minLen:
//minimum digits rule (optional)
minLenMessage:
//Message showing to the counterparty when minLen rule break
maxLen:
//maximum digits rule (optional)
maxLenMessage:
//Message showing to the counterparty when maxLen rule break
regExp:
//regular express rule (optional)
regExpMessage:
//Message showing to the counterparty when regular express rule break
isHidden:
//a boolean value. Whether the field is a hidden value.
}
}
},
signers:{
//an array of counterparty infromation
signerName:
//name of the counterparty
signerEmail:
//email address of the counterparty
},
comment:''
//comments for the counterparties
subject:''
//subject of the email that sent after the last counterpart sign the documents
isPublic:''
//reserved
settings:''
//an unsigned int value. Each bit of the value is a setting flag
//bit 0: whether use secure email
//bit 1: whether display IP address on the signature
//other bits: reserved
}
Response
The response comes in a soap object containing three elements.
(string) code - A response code. This will be "000" if there is no error
(string) message - A description of the response code
(int) workflowId - The id of the new created workflow
Sample Code (using NuSoap) (PHP)
The xml for the WSDL can be found here