Core - Additional User Fields

Module dedicated to the additional user fields.

The base url for the APIs in this page is at:

/api/mobile/

A JSON file with OpenAPI data about all core-related mobile APIs can be downloaded here.

The value types of the additional user fields can be one of the AdditionalValueTypes enumeration, with the following implications:

Value

Implications

Number

In the ValidValues there can be a JSON array of three items, the first being the lower bound and the second being the upper bound of the allowed range, while the third is set to 0 if the number has to be an integer and 1 if it is decimal. A value of null or undefined lets the end unbounded. No ValidValuesLabels are to be expected.

Boolean

No ValidValues are to be expected, but there can be ValidValuesLabels.

String

In the ValidValues there can be a JSON array of two items, the first being the lower bound and the second being the upper bound of the allowed length.

Enumeration

Both ValidValues and ValidValuesLabels are to be expected, as in the example data above. The User Agent must specify exactly one of the valid values in the JSON array contained in ValidValues as the filter value when compiling a Transportation Request.

Multi-enumeration

Both ValidValues and ValidValuesLabels are to be expected, as in the example data above. The User Agent must specify at least one, and possibly more, of the valid values in the JSON array contained in ValidValues as the filter value when compiling a Transportation Request. The filter value must be a string containing a JSON array of the selected values.

DateTime

In the ValidValues there can be a JSON array of three items, the first two being lower and upper buond, and the third being an enum that describes the bound type. Possible values of the third item are: 0 - the bounds refers to the year of the date (i.e. between 1990 and 2000) 1 - the buonds refers to the age in years of the inserted date; the age is computed as full years, so between 02/01/2000 and 01/01/2002 the age is still one year 2 - the bounds refers to the age in months of the inserted date; the age is computed as full months 3 - the bounds refers to the age in days of the inserted date A value of null or undefined lets the end unbounded. No ValidValuesLabels are to be expected. The Value field should be a date as a string in the format yyyy-MM-dd

Get the list of the additional user fileds

GET /v1/additional-user-fields/list-all

Returns the list of non-backend additional user data fields.

Status Codes

The resulting object is like this:

[
  {
    Key: "CustomFieldName",                           // String
    ValueType: 4,                                     // Int
    Labels: "Test attachment",                        // String
    DescriptionLabels: "Attachment description",      // JSON Dictionary
    ValidValues: "["value1", "value2", ...]",         // String
    ValidValuesLabels: "{{"value1":"Name"}, ...}",    // String
    IsRequired: true                                  // Boolean
  }
]

The Key property contains the field name.

Both Labels and DescriptionLabels properties of the DB entity contains a JSON dictionary with the translations in the languages accepted by the system. The labels in this API are returned already localized in the current user preferred language.

In the ValidValuesLabels property of the DB entity contains a JSON dictionary with the translations in the languages accepted by the system. The value returned in this API contains pairs {“accepted value”:”value meaning”} already localized in the current user preferred language.

If the filter has the IsRequired property set to true, the User Agent must specify a value for the additional user field when it’s used, otherwise the submission will fail. Such value can be decided autonomously by the User Agent or can be asked to the user.

Get the list of the required additional user fileds

GET /v1/additional-user-fields/list-required

Returns the list of non-backend required additional user data fields.

Status Codes

The resulting object is like this:

[
  {
    Key: "CustomFieldName",                           // String
    ValueType: 4,                                     // Int
    Labels: "Test attachment",                        // String
    DescriptionLabels: "Attachment description",      // JSON Dictionary
    ValidValues: "["value1", "value2", ...]",         // String
    ValidValuesLabels: "{{"value1":"Name"}, ...}",    // String
    IsRequired: true                                  // Boolean
  }
]

The Key property contains the field name.

Both Labels and DescriptionLabels properties of the DB entity contains a JSON dictionary with the translations in the languages accepted by the system. The labels in this API are returned already localized in the current user preferred language.

In the ValidValuesLabels property of the DB entity contains a JSON dictionary with the translations in the languages accepted by the system. The value returned in this API contains pairs {“accepted value”:”value meaning”} already localized in the current user preferred language.

If the filter has the IsRequired property set to true, the User Agent must specify a value for the additional user field when it’s used, otherwise the submission will fail. Such value can be decided autonomously by the User Agent or can be asked to the user.