Create attribute
POST/attributes
Before setting an attribute value for a specific resource, the attribute definition needs to be created. This endpoint is used to create a single attribute definition.
If an attribute is successfully created, the response will include the attribute id.
Fields
Name | Required |
---|---|
name | yes |
class | yes |
isPublic | no Default value is true |
isSearchable | no Default value is false |
isSystem | no Default value is false |
isHidden | no Default value is false |
type | yes |
typeParam | only when type value is enum or enumlist |
descriptions | no |
value | only when type is integer , decimal , date or datetime |
units | no |
group | no |
Request
Responses
- 201
- 400
Create product enum attribute - 201 / Create product text attribute - 201
Response Headers
Alt-Svc
Via
alt-svc
content-length
date
return-format
server
x-request-id
Create product text attribute - 400 (invalid value) / Create product enum attribute - 400 (duplicate name)
Response Headers
Alt-Svc
Via
alt-svc
content-length
date
return-format
server
x-request-id