Attribute Family — Update
Updates an existing attribute family. Mirrors Catalog → Attribute Families → Edit in the Bagisto admin panel — same partial-update semantics for nested attribute groups.
Endpoint
| Endpoint | Method |
|---|---|
/api/admin/catalog/families/{id} | PUT |
{id} must be a positive integer.
Request body
Top-level fields are code (required), name (required), and attribute_groups (object, optional).
attribute_groups semantics
The attribute_groups field is an object keyed by either a numeric existing group id or a group_* placeholder for a new group:
| Key shape | Effect |
|---|---|
"11" (numeric id) | Updates the existing group with id 11 |
"group_new_1" | Creates a new group |
| existing id omitted from the payload | Deletes that group |
Each value is a group object:
| Field | Type | Notes |
|---|---|---|
code / name / column / position | scalars | Same fields as on Create |
custom_attributes | array | [{ id, position }, ...] — full replacement set for the group |
Response
200 OK. Same shape as GET /api/admin/catalog/families/{id}.
Errors
| HTTP | Cause |
|---|---|
401 Unauthorized | Missing or invalid Bearer token |
404 Not Found | The family does not exist |
422 Unprocessable Entity | code duplicate or other body validation issue |

