mdEmail® Registration API

(string) upload($uploadRequest)

    uploadRequest:{
        accountInfo:{//used to authenticate the user who upload the document
            username:'',//account name, for example: abc@max.md
            password:'',//password
        },
        document:{
            data: //base64encoded data of the document
            mimeType: //Mimetype
            documentName:'',//the name of the document
        },
        signerEmail:'', //signer's email address.
        comment:'' //comments for the signer
    }

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
  (array) values - An array containing the URL for signing the document in the first element.

Sample Code (using NuSoap)(PHP)

$soap = new SoapClient("https://api.mdemail.md/MdDigitalSignatureApi.php?wsdl", array ( 'trace' => true, 'exceptions' => true, ));
$uploadRequest=array(
    "accountInfo"=>array(
        "username"=>"abc@max.md",
        "password"=>"password"
    ),
    "document"=>array(
        "data"=>base64_encode(file_get_contents("/tmp/a.pdf")),
        "mimeType"=>"application/pdf",
        "documentName"=>"myDocument.pdf"
    ),     "signerEmail"=>"abc@gmail.com",
    "comment"=>"Please sign the document and send back to me.
    Thanks.
    John"
);
if ($response->code == '000') {
  $url = $response->values[0];
}else{
  echo $response->message;
}

The xml for the WSDL can be found here