Getting started with our server stamp API

Standard documentation

Access methods

Universign offers two ways to access its server stamp service:

  • a XML-RPC based API
  • a simple API based on a FORM sent in an HTTP POST request which can be implemented easily in any production platform.
Authentication parameters
Security SSL
Authentication method HTTP basic authentication
Credentials email and password

The certificate and private key used to sign are linked to the default signature profile. If you want to use other key/certificate pairs, create new signatures profiles by uploading your key/certificate pairs.

Access with the XML-RPC protocol
URL https://ws.universign.eu/sign/rpc
Service signer
Method sign()
Parameter the PDF document to sign.
Return the signed document.
Access with a FORM sent by an HTTP POST request

URL: https://ws.universign.eu/sign/post/
Form parameters encoded according to the the mime-type application/multipart-form-data :

file the PDF file to sign

The server returns the signed file.

Some code examples
In Python
        import xmlrpclib;

        if __name__ == "__main__":
            pdfDocument = xmlrpclib.Binary(open("myDoc.pdf").read())

            proxy = xmlrpclib.ServerProxy("https://me@myCompany.com:myPwd@ws.universign.eu/sign/rpc")
            signedPdfDocument = proxy.signer.sign(pdfDocument)
            f = open("mySignedDoc.pdf", "w+")
            f.write(signedPdfDocument.data)
            f.close()
      

Any doubt or question? Don't hesitate to contact us.


Advanced documentation

URL https://ws.universign.eu/sign/rpc
Service signer
Method signWithOptions()
Parameter 1 the PDF document to sign
Parameter 2 the signature options
Return the signed document

The signature options are grouped as a bean composed by the following members:

  • profile
  • signatureField
  • reason
  • location
  • signatureFormat
profile

A signature profile refers to a certificate and a private key used to sign a document. The profiles are referred to with symbolic names, either chosen by the user or automatically generated.

During the first upload of private key, a default profile named default is created. It is possible then to add more certificates and private keys, which will be linked to as many signature profiles.

signatureField

Visual description of the signature. This option controls the visual appearance of the signature in the signed document (picture, text, etc.). If this option is missing the signature is invisible.

reason

The reason for signing the document.

location

The signatory's location.

signatureFormat

The signature format. The possible values are:

  • PADES : The signature follows the format defined in ETSI TS 102 778-3 PAdES Part 3: PAdES Enhanced - PAdES-BES.
  • PADES-COMP : The signature follows the format defined in ISO 32000-1 with the signing certificate attribute. This format is a compatibility mode with PAdES (same semantic than PAdES with the ISO 32000-1 format).
  • ISO-32000-1 : The default value. The signature follows the format defined in ETSI TS 102 778-2 PAdES Part 2: CMS Profile based on ISO 32000-1.

Troubleshootings

Universign signature service is available 24/7 and limited to one signature per second.

Your Universign account will not be debited if an error occurs during the signature process.

When a request fails, Universign returns an error code that will enable you to understand and to solve the problem.

  • 73002 - an error occurred during the signature process.
  • 73003 - an error occurred when managing your certificate.
  • 73010 - your authentication failed.
  • 73011 - no available account.
  • 73024 - unreadable file.

This code and an error message are returned in an exception in XML-RPC, or in plain text in HTTP.

With a POST request, a status code is also returned in the HTTP headers:

  • 400 - incorrect request or not supported.
  • 401 - authentication problem: user unknown or incorrect password.
  • 403 - account problem: no more seals available or package expired.
  • 404 - resource not found, it might be an URL error.
  • 500 - Universign service internal error. Please try again later or contact our support.