Importing Custom Fields
Set values for Custom Fields defined by Types.
This page documents the value representations of your self-defined project-specific fields, called Custom Fields, which you have on resources and data types that you have customized using Types.
Representations
Custom
The representation to be sent to the server when creating a resource with Custom Fields.
type | The type that provides the field definitions for this object. |
fields | The Custom Fields of this object. |
FieldContainer
A JSON object containing key-value pairs.
- key is the
nameof the Custom Field, as defined in the respective FieldDefinition. - value is the CustomField compliant to the respective FieldType.
Find below an example FieldContainer with CustomFields of several FieldTypes:
{"exampleBooleanField": {"type": "Boolean","value": true},"exampleSetOfBooleanField": {"type": "BooleanSet","value": [true, false, true]},"exampleStringField": {"type": "String","value": "Some String value"},"exampleSetOfStringField": {"type": "StringSet","value": ["Some String value 1", "Some String value 2"]},"exampleLocalizedStringField": {"type": "LocalizedString","value": {"en": "English text","es": "texto en español"}},"exampleSetOfLocalizedStringField": {"type": "LocalizedStringSet","value": [{"en": "English text 1","es": "texto en español 1"},{"en": "English text 2","es": "texto en español 2"}]},"exampleNumberField": {"type": "Number","value": 123},"exampleSetOfNumberField": {"type": "NumberSet","value": [123, 456]},"exampleMoneyField": {"type": "Money","value": {"type": "centPrecision","currencyCode": "USD","centAmount": 124500,"fractionDigits": 2}},"exampleSetOfMoneyField": {"type": "MoneySet","value": [{"type": "centPrecision","currencyCode": "USD","centAmount": 124500,"fractionDigits": 2},{"type": "centPrecision","currencyCode": "USD","centAmount": 1000,"fractionDigits": 2}]},"exampleDateField": {"type": "Date","value": "2001-10-12"},"exampleSetOfDateField": {"type": "DateSet","value": ["2001-10-12", "2001-10-13"]},"exampleTimeField": {"type": "Time","value": "14:00:00.000"},"exampleSetOfTimeField": {"type": "TimeSet","value": ["14:00:00.000", "15:00:00.000"]},"exampleDatetimeField": {"type": "DateTime","value": "2018-10-14T14:00:00.000Z"},"exampleSetOfDatetimeField": {"type": "DateTimeSet","value": ["2018-10-14T14:00:00.000Z", "2018-10-14T15:00:00.000Z"]},"exampleReferenceField": {"type": "Reference","value": {"typeId": "product","key": "key-of-a-product"}},"exampleSetOfReferenceField": {"type": "ReferenceSet","value": [{"typeId": "product","key": "key-of-a-product"},{"typeId": "product","key": "key-of-a-product"}]}}
CustomFields
Provides the value for a Custom Field of a specific type.
CustomFieldBooleanField
A field with a boolean value.
typeString | "Boolean"The type of this field. |
valueBoolean |
CustomFieldBooleanSetField
A field with a boolean set value.
typeString | "BooleanSet"The type of this field. |
valueArray of Boolean |
CustomFieldStringField
A field with a string value.
typeString | "String"The type of this field. |
valueString |
CustomFieldStringSetField
A field with a string set value.
typeString | "StringSet"The type of this field. |
valueArray of String |
CustomFieldLocalizedStringField
A field with a localized string value.
typeString | "LocalizedString"The type of this field. |
value |
CustomFieldLocalizedStringSetField
A field with a localized string set value.
typeString | "LocalizedStringSet"The type of this field. |
valueArray of LocalizedString |
CustomFieldEnumField
A field with an enum value.
typeString | "Enum"The type of this field. |
valueString |
CustomFieldEnumSetField
A field with an enum set value.
typeString | "EnumSet"The type of this field. |
valueArray of String |
CustomFieldLocalizedEnumField
A field with a localized enum value.
typeString | "LocalizedEnum"The type of this field. |
valueString |
CustomFieldLocalizedEnumSetField
A field with a localized enum set value.
typeString | "LocalizedEnumSet"The type of this field. |
valueArray of String |
CustomFieldNumberField
A field with a number value.
typeString | "Number"The type of this field. |
valueFloat |
CustomFieldNumberSetField
A field with a number value.
typeString | "NumberSet"The type of this field. |
valueArray of Number |
CustomFieldMoneyField
A field with a money value.
typeString | "Money"The type of this field. |
value |
CustomFieldMoneySetField
A field with a money set value.
typeString | "MoneySet"The type of this field. |
valueArray of Money |
CustomFieldDateField
A field with a date value.
typeString | "Date"The type of this field. |
valueDate |
CustomFieldDateSetField
A field with a date set value.
typeString | "DateSet"The type of this field. |
valueArray of Date-only |
CustomFieldTimeField
A field with a time value.
typeString | "Time"The type of this field. |
valueTime |
CustomFieldTimeSetField
A field with a time set value.
typeString | "TimeSet"The type of this field. |
valueArray of Time-only |
CustomFieldDateTimeField
A field with a date time value.
typeString | "DateTime"The type of this field. |
value |
CustomFieldDateTimeSetField
A field with a date time set value.
typeString | "DateTimeSet"The type of this field. |
valueArray of Datetime |
CustomFieldReferenceField
A field with a reference value.
typeString | "Reference"The type of this field. |
value | References a resource by key |
CustomFieldReferenceSetField
A field with a reference set value.
typeString | "ReferenceSet"The type of this field. |
valueArray of KeyReference |