Custom Types
This page documents the value representations of your self-defined project-specific fields, called Custom Fields.
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
JSON object containing name-value pairs with
- name being the
name
of the Custom Field as defined in the respective FieldDefinition and - value being a CustomField compliant to the respective FieldType.
Find below an example FieldContainer with CustomFields of several FieldTypes:
{"example-boolean-field": {"type": "Boolean","value": true},"example-set-of-boolean-field": {"type": "BooleanSet","value": [true, false, true]},"example-string-field": {"type": "String","value": "Some String value"},"example-set-of-string-field": {"type": "StringSet","value": ["Some String value 1", "Some String value 2"]},"example-localized-string-field": {"type": "LocalizedString","value": {"en": "English text","es": "texto en español"}},"example-set-of-localized-string-field": {"type": "LocalizedStringSet","value": [{"en": "English text 1","es": "texto en español 1"},{"en": "English text 2","es": "texto en español 2"}]},"example-number-field": {"type": "Number","value": 123},"example-set-of-number-field": {"type": "NumberSet","value": [123, 456]},"example-money-field": {"type": "Money","value": {"type": "centPrecision","currencyCode": "USD","centAmount": 124500,"fractionDigits": 2}},"example-set-of-money-field": {"type": "MoneySet","value": [{"type": "centPrecision","currencyCode": "USD","centAmount": 124500,"fractionDigits": 2},{"type": "centPrecision","currencyCode": "USD","centAmount": 1000,"fractionDigits": 2}]},"example-date-field": {"type": "Date","value": "2001-10-12"},"example-set-of-date-field": {"type": "DateSet","value": ["2001-10-12", "2001-10-13"]},"example-time-field": {"type": "Time","value": "14:00:00.000"},"example-set-of-time-field": {"type": "TimeSet","value": ["14:00:00.000", "15:00:00.000"]},"example-datetime-field": {"type": "DateTime","value": "2018-10-14T14:00:00.000Z"},"example-set-of-datetime-field": {"type": "DateTimeSet","value": ["2018-10-14T14:00:00.000Z", "2018-10-14T15:00:00.000Z"]},"example-reference-field": {"type": "Reference","value": {"typeId": "product","key": "key-of-a-product"}},"example-set-of-reference-field": {"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.
type String | "Boolean" The type of this field. |
value Boolean |
CustomFieldBooleanSetField
A field with a boolean set value.
type String | "BooleanSet" The type of this field. |
value Array of Boolean |
CustomFieldStringField
A field with a string value.
type String | "String" The type of this field. |
value String |
CustomFieldStringSetField
A field with a string set value.
type String | "StringSet" The type of this field. |
value Array of String |
CustomFieldLocalizedStringField
A field with a localized string value.
type String | "LocalizedString" The type of this field. |
value |
CustomFieldLocalizedStringSetField
A field with a localized string set value.
type String | "LocalizedStringSet" The type of this field. |
value Array of LocalizedString |
CustomFieldEnumField
A field with an enum value.
type String | "Enum" The type of this field. |
value String |
CustomFieldEnumSetField
A field with an enum set value.
type String | "EnumSet" The type of this field. |
value Array of String |
CustomFieldLocalizedEnumField
A field with a localized enum value.
type String | "LocalizedEnum" The type of this field. |
value String |
CustomFieldLocalizedEnumSetField
A field with a localized enum set value.
type String | "LocalizedEnumSet" The type of this field. |
value Array of String |
CustomFieldNumberField
A field with a number value.
type String | "Number" The type of this field. |
value Float |
CustomFieldNumberSetField
A field with a number value.
type String | "NumberSet" The type of this field. |
value Array of Number |
CustomFieldMoneyField
A field with a money value.
type String | "Money" The type of this field. |
value |
CustomFieldMoneySetField
A field with a money set value.
type String | "MoneySet" The type of this field. |
value Array of Money |
CustomFieldDateField
A field with a date value.
type String | "Date" The type of this field. |
value Date |
CustomFieldDateSetField
A field with a date set value.
type String | "DateSet" The type of this field. |
value Array of Date-only |
CustomFieldTimeField
A field with a time value.
type String | "Time" The type of this field. |
value Time |
CustomFieldTimeSetField
A field with a time set value.
type String | "TimeSet" The type of this field. |
value Array of Time-only |
CustomFieldDateTimeField
A field with a date time value.
type String | "DateTime" The type of this field. |
value |
CustomFieldDateTimeSetField
A field with a date time set value.
type String | "DateTimeSet" The type of this field. |
value Array of Datetime |
CustomFieldReferenceField
A field with a reference value.
type String | "Reference" The type of this field. |
value | References a resource by key |
CustomFieldReferenceSetField
A field with a reference set value.
type String | "ReferenceSet" The type of this field. |
value Array of KeyReference |