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.

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.

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.

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