Attributes
Create Attribute
Creates a new attribute for the organization. Returns 409 if an attribute with the same key and target entity already exists.
Authorization<token>
API key authentication using Bearer token format. Use: Bearer
In: header
Attribute to create
displayNamestring
Human-readable name shown in the UI
isChannelScoped?boolean
Whether values can differ per sales channel
isLocalized?boolean
Whether values can differ per locale
isRequired?boolean
Whether a value is required for this attribute
keystring
Unique key for the attribute (e.g., "brand", "material"). Used in API requests.
options?array<string>
Allowed values for select-type attributes
presets?array<string>
Allowed values for select-type attributes (deprecated, use options)
targetEntitystring
Entity type this attribute applies to: product, variant, sku, or bundle
Value in
"product" | "variant" | "sku" | "bundle"typestring
Data type: text, html, select, boolean, number, price, weight, image, color, url, datetime
Response Body
curl -X POST "https://api.emfas.ai/v1/attributes" \ -H "Content-Type: application/json" \ -d '{ "displayName": "Brand", "key": "brand", "targetEntity": "product", "type": "text" }'{
"result": {
"isChannelScoped": false,
"isLocalized": false,
"isRequired": false,
"key": "product.brand",
"name": "Brand",
"optionsSource": "manual",
"type": "text"
}
}{
"error": "Internal server error"
}{
"error": "Internal server error"
}{
"error": "Internal server error"
}{
"error": "Internal server error"
}