UploadMetadataUpon successful execution of ValidateDocumentFields where no error message was returned, the metadata is uploaded using the JSON Post UploadMetadata.
UploadMetadata POST can be executed without first executing ValidateDocumentFields.An example of the HTTP headers:
POST https://Server/ConnectorService.svc/json/UploadMetadata HTTP/1.1
Content-Type: application/json; encoding=utf-8
Accept: application/json
Accept-Charset: utf-8
Host: Server
{
"ConfigurationUniqueId": "f7401f61-5401-4f54-ba47-0efc29fc77a1",
"UniqueId": "43de0ccf-bceb-431c-810d-8dcf8f6ca7c2",
"Name": "Test iConnector Server",
"DeviceUniqueId": null,
"Documents": [
{
"DocumentTypeUniqueId": "878252e8-75b7-443f-ba87-6d082254eab4",
"UniqueId": "47df8025-3b32-4c16-a826-82686c827a82",
"Name": "Invoice",
"SaveNameTemplate": null,
"DocumentFormat": "PDF",
"Fields": [
{
"Name": "InvoiceNumber",
"Value": "33233"
},
{
"Name": "InvoiceDate",
"Value": "2014-06-01"
},
{
"Name": "InvoiceStatus",
"Value": "Received"
}
],
"CustomConfiguration": null
}
],
"CustomConfiguration": null,
"CustomData": "customer-id-12345"
}
An example of the JSON response:
""
The following explain the JSON body:
ConfigurationUniqueId is the organization unique Id which can be found in the Admin Panel – Organization Settings.UniqueId is a unique GUID generated for this specific upload and will be passed as header fields in the UploadDocument API. This is to match the metadata with the corresponding document(s).Name is the organization name.DeviceUniqueId is a unique GUID that identifies the device that upload the metadata and document via the mobile app. This is optional.Documents
DocumentTypeUniqueId is the document type unique Id for a specific document type which can be found in the Admin Panel – Document Types.UniqueId is a unique GUID generated for this specific document and will be passed as header fields in the UploadDocument API. This is to match the metadata with the corresponding document(s).Name is the document type name.SaveNameTemplate is to define the filename of the document to be exported to the backend system. This is optional.DocumentFormat is to define the file format of the document. The support file formats are PDF, TIF and JPG. Fields is a collection of fields and metadata to be uploaded.CustomConfiguration is to send configuration details to the iConnector Server or backend system. This is optional. CustomConfiguration is to send configuration details to the iConnector Server or backend system. This is optional. CustomConfiguration is not used within Straatos. CustomData is a custom value to be forwarded to the iConnector Server or backend system when uploading metadata. This custom data can be used both for licensing and routing on the backend (for example, user identification). This is optional.