ROLE_INTERNAL_ADMIN. Lookup semantic: the server tries to find an existing attribute by (service_provider_id, key); if found, the attribute is updated (name, sort, category, attribute_style, attribute_type, description, attribute category, translation in the default locale). If not found, a new attribute is created with field_type=single and — when attribute_type is omitted — defaults to other. On update, an omitted attribute_type does not overwrite the existing value. Required fields: service_provider_id, key, name, category_id. Optional: description, sort (default 0), category (default none), attribute_style (server default applies if missing), attribute_type.Authorization: ********************{
"service_provider_id": "11111111-2222-3333-4444-555555555555",
"key": "color",
"name": "Farbe",
"description": null,
"sort": 1,
"category": "none",
"category_id": "5117a596-fd4f-4fba-a27e-5affde564b2c",
"attribute_style": "normal",
"attribute_type": "other"
}{
"jsonapi": {
"version": "1.0"
},
"data": {
"type": "attributes",
"id": "0e2e958e-ea2c-45e6-b1f0-b0d383b5cecb",
"attributes": {
"name": "Farbe",
"original_name": "Farbe",
"sort": 1,
"description": null,
"key": "color",
"category": "none",
"attribute_category": {
"type": "attribute_categories",
"id": "5117a596-fd4f-4fba-a27e-5affde564b2c",
"attributes": {
"name": "none",
"sort": 0,
"key": "none"
}
},
"sort_type": 1,
"field_type": "single",
"attribute_style": "normal",
"attribute_type": "other",
"base_url": ""
},
"relationships": {
"options": {
"data": [
{
"type": "options",
"id": "7fff7f85-1869-43d3-a831-8ac14d77aea5"
},
{
"type": "options",
"id": "17d3f17e-67c3-4a85-97aa-db614caba671"
}
]
}
}
},
"included": [
{
"type": "options",
"id": "7fff7f85-1869-43d3-a831-8ac14d77aea5",
"attributes": {
"name": "Blau",
"original_name": "Blau",
"key": "blue",
"description": null,
"sort": 0,
"icon_name": "",
"is_highlight": false,
"meta": []
}
},
{
"type": "options",
"id": "17d3f17e-67c3-4a85-97aa-db614caba671",
"attributes": {
"name": "Rot",
"original_name": "Rot",
"key": "red",
"description": null,
"sort": 50,
"icon_name": "main_icon",
"is_highlight": true,
"meta": []
}
}
]
}