FieldDefinitionsForInput

Field Definitions from iConnector Server based on current input

If the options ‘Get Field Metadata From Server’ in Admin Panel - Document Type configuration is ON and ‘Validate On Submit’ is OFF in the Admin Panel, field definitions will be retrieved from the iConnector Server.

To facilitate this, the iConnector Server should provide the Web Service Method ‘FieldDefinitionsForInput’.

The method can return an empty list to indicate that no change should be made to the current fields. Otherwise all existing fields will be replaced by the returned field definitions, so a complete list of all field definitions has to be returned.

 

An example of the HTTP headers:    

POST https://Server/ConnectorService.svc/json/FieldDefinitionsForInput 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": "e7d45bd6-1c1c-4af7-b389-121e18a2e4b8",
        "CustomConfiguration": null,
        "CustomData": " customer-id-2345",
        "Name": "JSON Test"
    },
    "DocumentType": {
        "CustomConfiguration": null,
        "DocumentFormat": "JPG",
        "DocumentTypeUniqueId": "6fa88929-55d7-42e1-8632-b2114124a7aa",
        "Name": "PaymentMethodTest",
        "SaveNameTemplate": null
    },
    "Fields": [
        {
            "Name": "PaymentMethod",
            "Value": "DirectDebit"
        },
        {
            "Name": "CreditCardNumber",
            "Value": ""
        },
        {
            "Name": "ExpiryDateMonth",
            "Value": "01"
        },
        {
            "Name": "ExpiryDateYear",
            "Value": "2014"
        }
    ]
}

 

An example of the JSON response:

[
    {
        "DefaultValue": "DirectDebit",
        "DisplayName": "Payment Method",
        "FieldDatatype": "lookup",
        "IsRequired": true,
        "LookupValues": [
            {
                "DisplayValue": "Credit Card",
                "Value": "CreditCard"
            },
            {
                "DisplayValue": "Direct Debit",
                "Value": "DirectDebit"
            }
        ],
        "Name": "PaymentMethod",
        "ServerLookupKey": null
    },
    {
        "DefaultValue": null,
        "DisplayName": "Bank Name",
        "FieldDatatype": "string",
        "IsRequired": false,
        "LookupValues": null,
        "Name": "BankName",
        "ServerLookupKey": null
    },
    {
        "DefaultValue": null,
        "DisplayName": "Bank Account",
        "FieldDatatype": "string",
        "IsRequired": false,
        "LookupValues": null,
        "Name": "BankAccount",
        "ServerLookupKey": null
    }
]
Create your own Knowledge Base