Upload Document Request

A full description of the upload document request

Sample Requests

This is the structure of a typical SOAP request to the service.

<Envelope>
  <Header>
    <Action>http://tempuri.org/IService/UploadDocument</Action>
  </Header>
  <Body>
    <UploadDocument>
      <DocumentUploadRequest>
        <DocumentData>
/9j/4TmVRXhpZgAASUkqAAgAAAANAAABBAABAAAAwBQAAAEBBAABAAAArAsAAA8B//----- Data Truncated
</DocumentData> <DocumentExpiry>2016-01-01T00:00:00</DocumentExpiry> <DocumentReference>MyDocumentReference</DocumentReference> <DocumentType>JPEG</DocumentType> <ServiceAuthorisation> <APIKey>APIKey</APIKey> <ClientReference /> <ClientSubaccount /> <ClientUser /> <RefersToServiceCallReference /> </ServiceAuthorisation> </documentUploadRequest> </UploadDocument> </Body> </Envelope>
Property Details
ServiceAuthorisation Contains authorisation information to identify the person using the service. See here
DocumentReference Contains a client-specified tracking reference. Maximum 100 Characters
DocumentType
  • None - No type specified / known.
  • JPEG - A JPEG (Joint Picture Experts Group Image).
  • PNG - A PNG (Portable Network Graphics) image.
  • PDF - A PDF (Portable Document Format)
DocumentData Base64 Encoded representation of the document to upload.
DocumentExpiry

Desired expiry date to apply to the document to upload.

If left blank, W2 will use the default value of 14 days to expire the document. This can be set anywhere up to a maximum of 6 months.

Once the expiration date has been reached, W2 will remove the image data from our system, however the footprint of the upload will be preserved.

QueryOptions Specify optional flags that alter the invocation of the service. See here

Notes

The maximum file size that we accept for a document upload is 4MB, please ensure your documents are no larger than this before uploading.

The DocumentData field must contain a Base64 Encoded representation of the document to upload. The recommended method for creating this representation is to use OpenSSL and issuing the following command;

openssl enc -Base64 -in {inputFilePath} -out {outputFilePath} 

 

The output from the above will be a text string similar to;

/9j/4TmVRXhpZgAASUkqAAgAAAANAAABBAABAAAAwBQAAAEBBAABAAAArAsAAA8B
AgAIAAAAqgAAABABAgAJAAAAsgAAABIBAwABAAAAAQAAABoBBQABAAAAvAAAABsB
BQABAAAAxAAAACgBAwABAAAAAgAAADEBAgAOAAAAzAAAADIBAgAUAAAA2gAAABMC
AwABAAAAAQAAAGmHBAABAAAA7gAAACWIBAABAAAAVAwAAGYMAABzYW1zdW5nAFNN
LU45MTBGAABIAAAAAQAAAEgAAAABAAAATjkxMEZYWFUxQk9DMwAyMDE1OjA4OjAz
IDExOjIwOjM5AB8AmoIFAAEAAABoAgAAnYIFAAEAAABwAgAAIogDAAEAAAACAAAA
J4gDAAEAAAAoAAAAAJAHAAQAAAAwMjIwA5ACABQAAAB4AgAABJACABQAAACMAgAA
......(Output truncated)