Skip to content

Catalog Attribute Family — Detail

Returns a single attribute family record by ID, including all attribute groups and — within each group — all attributes associated via the attribute_group_mappings pivot (with their pivot position and column).

This is the read endpoint to call when an admin needs the complete structure of an attribute family — e.g. when opening the edit form in the Catalog → Attribute Families UI.

Endpoint

EndpointMethodAuthentication
/api/admin/catalog/families/{id}GETAdmin Bearer token

{id} must be a positive integer. Non-numeric values are rejected by a route requirement (\d+) — this prevents the {id} segment from matching any other path under /catalog/families/.

Authentication

Every request requires:

Authorization: Bearer <token>

Obtain the Bearer token via Authentication.

Path Parameter

ParameterTypeRequiredDescription
idintegerYesThe numeric attribute family ID

Response Shape

The response is a single JSON object (not wrapped in { data }) with the following fields:

FieldTypeDescription
idintegerAttribute family ID
codestringFamily code (e.g. default, apparel)
namestringFamily display name (e.g. Default, Apparel)
attributeGroupsarrayAll attribute groups belonging to this family (see below)

attributeGroups[] item shape

Each entry in the attributeGroups array corresponds to one row in attribute_groups:

FieldTypeDescription
idintegerAttribute group ID
codestringGroup code (e.g. general, price)
namestringGroup display name (e.g. General, Price)
columnintegerLayout column position for the group (typically 1 or 2)
positionintegerDisplay order position of the group within the family
attributesarrayAttributes mapped to this group (see below)

attributeGroups[].attributes[] item shape

Each entry represents one attribute mapped to the group via attribute_group_mappings:

FieldTypeDescription
idintegerAttribute ID
codestringAttribute code (e.g. sku, name, color)
typestringAttribute type (e.g. text, select, boolean)
isRequiredinteger1 = required on product forms, 0 = optional
columnintegerLayout column position of this attribute within the group
positionintegerDisplay order position of this attribute within the group

Plain arrays — no follow-up calls needed

attributeGroups and the nested attributes arrays are serialized as plain inline JSON objects — there are no IRI strings or sub-resource links. The full structure is embedded in a single response.

Example Request

bash
curl -X GET "https://your-domain.com/api/admin/catalog/families/1" \
  -H "Authorization: Bearer <token>" \
  -H "Accept: application/json"

Example Response

json
{
  "id": 1,
  "code": "default",
  "name": "Default",
  "attributeGroups": [
    {
      "id": 1,
      "code": "general",
      "name": "General",
      "column": 1,
      "position": 1,
      "attributes": [
        {
          "id": 1,
          "code": "sku",
          "type": "text",
          "isRequired": 1,
          "column": 1,
          "position": 1
        },
        {
          "id": 2,
          "code": "name",
          "type": "text",
          "isRequired": 1,
          "column": 1,
          "position": 2
        }
      ]
    }
  ]
}

Errors

HTTP StatusCause
401 UnauthorizedMissing, expired, or revoked admin Bearer token
401 UnauthorizedMissing or invalid admin Bearer token
404 Not FoundThe specified {id} does not exist in the database

Notes

  • attributeGroups is a plain JSON array, not a sub-resource IRI. Groups and their nested attributes are embedded directly in the response — no follow-up requests are needed.
  • attributeGroups is null in listing rows. The GET /api/admin/catalog/families listing returns only id, code, and name. The full nested payload is only available from this detail endpoint.
  • No timestamps. The attribute_families table has $timestamps = false — there are no createdAt or updatedAt fields on the family itself. The attribute_groups table similarly carries no timestamps.
  • column and position fields come from the attribute_group_mappings pivot and control where each attribute is rendered in the product-creation form layout. column is typically 1 or 2 (left or right panel); position controls vertical order.
  • The {id} route parameter must be a digit. The route carries a requirements: ['id' => '\d+'] constraint — non-numeric path segments are rejected with 404 before reaching the provider.
  • Attribute detail fields are slim. Only the fields needed for family-structure display are returned per attribute (id, code, type, isRequired, column, position). For the full attribute payload (translations, options, validation), use GET /api/admin/catalog/attributes/{id}.

Released under the MIT License.