Attribute Family — Create
Creates a new attribute family. Mirrors Catalog → Attribute Families → Create in the Bagisto admin panel.
Endpoint
| Endpoint | Method |
|---|---|
/api/admin/catalog/families | POST |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
code | string | yes | Snake_case identifier — must be unique and pass the Code rule. |
name | string | yes | Display name. |
attribute_groups | array | no | Initial groups (see shape below). |
attribute_groups[] shape
| Field | Type | Notes |
|---|---|---|
code | string | Group code (snake_case). |
name | string | Group display name. |
column | integer | Column placement (1 or 2). |
position | integer | Sort position within the column. |
custom_attributes | array | [{ id: <attribute-id> }, ...] — attributes to attach. |
Response
201 Created. Same shape as GET /api/admin/catalog/families/{id}.
Errors
| HTTP | Cause |
|---|---|
401 Unauthorized | Missing or invalid Bearer token |
422 Unprocessable Entity | Validation failure (missing/duplicate code, malformed body) |

