Skip to content

Attribute Family — Create ​

Creates a new attribute family. Mirrors Catalog → Attribute Families → Create in the Bagisto admin panel.

Endpoint ​

EndpointMethod
/api/admin/catalog/familiesPOST

Request body ​

FieldTypeRequiredNotes
codestringyesSnake_case identifier — must be unique and pass the Code rule.
namestringyesDisplay name.
attribute_groupsarraynoInitial groups (see shape below).

attribute_groups[] shape ​

FieldTypeNotes
codestringGroup code (snake_case).
namestringGroup display name.
columnintegerColumn placement (1 or 2).
positionintegerSort position within the column.
custom_attributesarray[{ id: <attribute-id> }, ...] — attributes to attach.

Response ​

201 Created. Same shape as GET /api/admin/catalog/families/{id}.

Errors ​

HTTPCause
401 UnauthorizedMissing or invalid Bearer token
422 Unprocessable EntityValidation failure (missing/duplicate code, malformed body)

Released under the MIT License.