emfasemfas
Attributes{key}Options{value}

Upsert Attribute Option

Creates or updates an option on a select-type attribute. If the option exists, it is updated. If it does not exist and a label is provided, it is created. Only works for manually-managed emfas attributes.

PATCH
/attributes/{key}/options/{value}
Authorization<token>

API key authentication using Bearer token format. Use: Bearer

In: header

Path Parameters

keystring

Attribute key in format 'entity.key'

valuestring

Option value

Fields to update or create

label?string
value?string

Response Body

curl -X PATCH "https://api.emfas.ai/v1/attributes/string/options/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "result": {
    "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"
}