emfasemfas
Attributes{key}Options

Create Attribute Options

Adds new options to a select-type attribute. Only works for manually-managed emfas attributes (not those sourced from metaobject definitions or category trees).

POST
/attributes/{key}/options
Authorization<token>

API key authentication using Bearer token format. Use: Bearer

In: header

Path Parameters

keystring

Attribute key in format 'entity.key'

Options to create

optionsarray<v1.CreateAttributeOptionRequest>

Response Body

curl -X POST "https://api.emfas.ai/v1/attributes/string/options" \
  -H "Content-Type: application/json" \
  -d '{
    "options": [
      {
        "label": "Cotton",
        "value": "cotton"
      }
    ]
  }'
{
  "result": [
    {
      "label": "Cotton",
      "value": "cotton"
    }
  ]
}
{
  "error": "Internal server error"
}
{
  "error": "Internal server error"
}
{
  "error": "Internal server error"
}
{
  "error": "Internal server error"
}
{
  "error": "Internal server error"
}