ValidateDocumentFieldsWhen the user scans a document and presses the Upload button, the field values are validated with the following JSON post request to the Server.Connector - ValidateDocumentFields
This API is optional depending on the use case.
An example of the HTTP headers:
POST https://Server/ConnectorService.svc/json/ValidateDocumentFields HTTP/1.1
Content-Type: application/json; encoding=utf-8
Accept: application/json
Accept-Charset: utf-8
An example of the JSON body:
{
"Configuration": {
"ConfigurationUniqueId": "f7401f61-5401-4f54-ba47-0efc29fc77a1",
"Name": "Test iConnector Server",
"CustomConfiguration": null,
"CustomData": "customer-id-12345"
},
"Document": {
"DocumentTypeUniqueId": "878252e8-75b7-443f-ba87-6d082254eab4",
"UniqueId": null,
"Name": "Invoice",
"SaveNameTemplate": null,
"DocumentFormat": "PDF",
"Fields": [
{
"Name": "InvoiceNumber",
"Value": "33233"
},
{
"Name": "InvoiceDate",
"Value": "2014-06-01"
},
{
"Name": "InvoiceStatus",
"Value": "Received"
}
],
"CustomConfiguration": null
}
}
An example of the JSON response:
[
{
"FieldName": "InvoiceNumber",
"Message": "This is not a valid invoice number"
}
]
The following explain the JSON body:
ConfigurationUniqueId is the organization unique Id which can be found in the Admin Panel – Organization Settings.Name is the organization name.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.
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 that identify this API call. This unique Id needs to be passed to UploadMetadata and UploadDocument. 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 to be validated.