Skip to content

AddAttribute

Field Type Required Description
type AttributeType yes 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 yes 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]
visibility string controls the visibility of attributes on a customer
one of: internal, public · default: "public"
displayGroup `string null`
{
"type": "text",
"name": "Color",
"isRequired": true,
"values": [
{
"name": "Rabbit",
"code": "rabbit",
"sequenceId": 3
}
],
"visibility": "internal"
}