|
Parameter |
Type |
Description |
Example |
|---|---|---|---|
|
object |
Custom entity attribute definition |
||
| Name |
string |
Attribute identifier. It can contain letters, digits, and underscores. It must start with a letter or digit and be up to 64 characters long. |
apiCode |
| DisplayName |
string |
Display name. It can be up to 32 characters long. |
API编码 |
| Type |
string |
Attribute type. Supported types include STRING, TEXT, INT, FLOAT, BOOLEAN, DATE, ARRAY, ENUM, and JSON. |
STRING |
| IsOptional |
boolean |
Indicates whether the value is optional. Default is true. Important Validation occurs when creating an entity. If this value is false and no value is provided during creation, validation fails and an error is returned. |
true |
| SearchFilterEnabled |
boolean |
Indicates whether the attribute can be used as a filter on the search page. Default is false. Only attributes of type STRING, DATE, ENUM, ARRAY, INT, or BOOLEAN support this setting. |
false |
| DisplayEnabled |
boolean |
Indicates whether the attribute appears on the product page. Default is true. |
true |
| AllowedValues |
array |
Enumeration values. Required when Type is ENUM. |
|
|
string |
Allowed value |
LABEL_1 |
|
| Description |
string |
Attribute description |
层级描述 |