UploadDocumentUploadDocument API needs to be executed after UploadMetadata.
An example of the HTTP headers:
POST https://Server/ConnectorService.svc/json/UploadDocument HTTP/1.1
X-Configuration-Unique-Id: 43de0ccf-bceb-431c-810d-8dcf8f6ca7c2
X-Document-Unique-Id: 47df8025-3b32-4c16-a826-82686c827a82
X-Number-Of-Pages: 5
X-Page-Number: 1
X-Filename: OriginalFilname.tif
Host: Server
The body contains the actual binary data of the PDF, TIF or JPG that is uploaded.
An example of the XML response:
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/"/>
The following explain the HTTP headers:
X-Configuration-Unique-Id is the top level Unique ID created for the UploadMetadata.X-Document-Unique-Id is the second Unique ID created per document for the UploadMetadata.X-Number-Of-Pages must contain the number of pages in this document. Pass the value as string.X-Page-Number must contain the page number (starting at 1). Pass the value as string. The X-Page-Number is the number of the files that are uploaded for one document.X-Page-Number is the number of the files that are uploaded for one document.
For uploading TIF and PDF, the iConnector server will expect 1 file with mulitple pages. Hence for PDF and TIF, the X-Page-Number and the X-Number-Of-Pages should be 1.
For JPG files, each image will be a separate file. So, if there are 5 JPG images, the UploadDocument function will be repeated 5 times. The X-Number-Of-Pages will always need to be 5 while the X-Page-Number will increase from 1-5. The iConnector server can check those two variables and hence knows when a document upload has finished.
X-Filename should contain the original filename. This name should be unique within this document.