Extended fields

The majority of objects in the Claims Manager Api contain an extendedFields array to cater for passing data into the diverse fields that are available across the various clients we support. As shown in the Metadata page, we can use the various /metadata endpoints to get a list of available fields for each object in the Api. When the mapsTo field in the response from these metadata endpoints is extendedFields, then we know that in order to populate this field with data we have to pass it in the extendedFields array.

Structure

The extendedFields array is a list of one or more fields that you wish to populate with data. Each object in the array should have the following two properties:

Parameters marked are required.
Property Name Description Type
identifier Unique identifier for the field string
value The value to populate the field with string

Any field in the extendedFields array that is not valid in the current context will be ignored when processing the request and no validation errors will be raised. Make sure that you check the relevant /metadata endpoint to ensure that the fields you are passing in this array are available for the relevant context.

Data Types

The data type of the value property in the extended field object is always a string. This means that whatever the underlying data type of the field in question is, the value must be converted to its string representation. As an example, if the dataType property of the field returned from the relevant /metadata endpoint indicates that the field should be of type integer, then if we wanted to populate this field with the integer of 1234 this should be passed in the extendedFields array as "value": "1234".

To explore this concept further lets have a look at the following partial response from the /metadata/incidents endpoint:

[
    {
        "identifier": "Global_Incident_Form:IsStarredClaim",
        "mapsTo": "extendedFields",
        "name": "Starred Claim",
        "section": "Status",
        "dataType": "boolean",
        "maxLength": null,
        "isRequired": true,
        "listSource": null
    },
    {
        "identifier": "Global_Incident_Form:PLBroadspire_IncidentEndDate",
        "mapsTo": "extendedFields",
        "name": "Incident End Date",
        "section": "Details",
        "dataType": "string($date)",
        "maxLength": null,
        "isRequired": false,
        "listSource": null
    },
    {
        "identifier": "Global_Incident_Form:Incident_Time",
        "mapsTo": "extendedFields",
        "name": "Incident Time",
        "section": "Details",
        "dataType": "string($time)",
        "maxLength": null,
        "isRequired": false,
        "listSource": null
    },
    {
        "identifier": "Global_Incident_Form:Vehicle_Manufacture_Year",
        "mapsTo": "extendedFields",
        "name": "Year of Vehicle Manufacture",
        "section": "Motor Details",
        "dataType": "integer",
        "maxLength": 5,
        "isRequired": true,
        "listSource": null
    },
    {
        "identifier": "Global_Incident_Form:Vehicle_Value_PolicyCurrency",
        "mapsTo": "extendedFields",
        "name": "Vehicle Value (Policy Currency)",
        "section": "Motor Details",
        "dataType": "number($double)",
        "maxLength": 19,
        "isRequired": false,
        "listSource": null
    },
]

Here we have 5 fields each with a different dataType that we want to populate with data in the extendedFields array. We are going to set the Starred Claim field to False, the Incident End Date to 20th April 2020, the Incident Time field to 2:45 PM, the Year of Vehicle Manufacture field to 2019 and finally, the Vehicle Value (Policy Currency) field to £14,999.99.

In the example extendedFields array below, we can see that each field is represented by its identifier given in the metadata response and each value has been converted into its relevant string representation:

{
    .......
    "extendedFields": [
           {
	        "identifier": "Global_Incident_Form:IsStarredClaim",
	        "value": "false"
	    },
	    {
	        "identifier": "Global_Incident_Form:PLBroadspire_IncidentEndDate",
	        "value": "2020-04-20"
	    },
	    {
	    	"identifier": "Global_Incident_Form:Incident_Time",
	    	"value": "14:45"
	    },
	    {
	    	"identifier": "Global_Incident_Form:Vehicle_Manufacture_Year",
	    	"value": "2019"
	    },
	    {
	    	"identifier": "Global_Incident_Form:Vehicle_Value_PolicyCurrency",
	    	"value": "14999.99"
	    }
	]
}