Attribute
| Field | Type | Required | Description |
|---|---|---|---|
code |
AttributeCode | ||
visibility |
string |
controls the visibility of attributes on a customer one of: internal, public |
|
displayGroup |
`string | null` | |
type |
AttributeType | Describes which type of validation to apply to an attribute’s value. “collectionOfValues” will check for an existing attribute value, the others will check for customer inputs to meet validation criteria of the suggested type (e.g. for type “boolean”, passing “123” will fail validation). The type cannot be changed once an attribute has been created. one of: text, number, boolean, date, collectionOfValues, callingNumber |
|
name |
AttributeName | Name of the attribute which will be shown to the customer. It’s saved in the language of the passed locale. | |
isRequired |
boolean |
default: false |
|
values |
array[AttributeValue] |
Example
Section titled “Example”{ "code": "color", "visibility": "internal", "type": "text", "isRequired": true, "name": "Favorite Pet", "values": [ { "name": "Dog", "code": "dog", "sequenceId": 0 }, { "name": "Fish", "code": "fish", "sequenceId": 1 }, { "name": "Cat", "code": "cat", "sequenceId": 2 }, { "name": "Rabbit", "code": "rabbit", "sequenceId": 3 } ]}
