Skip to content

Catalog Attributes — Datagrid Listing

Paginated, filterable, and sortable attribute list that mirrors the Bagisto admin Catalog → Attributes datagrid 1:1. This is the authoritative attribute-management listing for the admin API — same columns, same filters, and the same sort options used by the datagrid.

For attribute types, options, and the configurable and filterable flags, see the Attributes overview.

Endpoint

EndpointMethodAuthentication
/api/admin/catalog/attributesGETAdmin Bearer token

Query Parameters

ParameterTypeDescriptionExample
pageintegerPage number (1-based, default 1)1
per_pageintegerItems per page (default 10, max 50)10
idstringFilter by attribute ID — single integer or comma-separated list (e.g. "1" or "1,2")1
codestringPartial attribute code match (SQL LIKE %value%)color
typestringExact attribute type filterselect
admin_namestringPartial admin name match (SQL LIKE %value%)Color
is_requiredintegerFilter by is_required: 0 = no, 1 = yes1
is_uniqueintegerFilter by is_unique: 0 = no, 1 = yes0
is_filterableintegerFilter by is_filterable: 0 = no, 1 = yes1
is_configurableintegerFilter by is_configurable: 0 = no, 1 = yes0
is_visible_on_frontintegerFilter by is_visible_on_front: 0 = no, 1 = yes1
is_user_definedintegerFilter by is_user_defined: 0 = no, 1 = yes1
value_per_localeintegerFilter by value_per_locale: 0 = no, 1 = yes0
value_per_channelintegerFilter by value_per_channel: 0 = no, 1 = yes0
localestringLocale code for translation resolution (default: app locale)en
sortstringColumn to sort by (see Sorting section below)id
orderstringSort direction: asc or desc (default desc)desc

Valid type values: text, textarea, price, boolean, select, multiselect, datetime, date, image, file, checkbox

Response Shape

Responses use the standard admin { data, meta } envelope.

meta object

FieldTypeDescription
currentPageintegerCurrent page number (1-based)
perPageintegerNumber of items on this page
lastPageintegerTotal number of pages
totalintegerTotal matching attributes
frominteger1-based index of the first item on this page
tointeger1-based index of the last item on this page

Row fields (data[])

FieldTypeDescription
idintegerAttribute ID
codestringAttribute code (e.g. color, size)
typestringAttribute type (e.g. select, text, boolean)
adminNamestringInternal admin-facing label
isRequiredinteger1 = required on product forms, 0 = optional
isUniqueinteger1 = value must be unique across products
valuePerLocaleinteger1 = separate value per store locale
valuePerChannelinteger1 = separate value per channel
isFilterableinteger1 = attribute appears in layered navigation filters
isConfigurableinteger1 = used as a configurable variant axis
isVisibleOnFrontinteger1 = shown on the product page storefront
isUserDefinedinteger1 = created by an admin user (not a system attribute)
swatchTypestring|nullSwatch rendering mode (color, image, text); null for non-swatch types
positionintegerDisplay order position
localestring|nullLocale code used for name resolution
createdAtstring|nullISO 8601 creation timestamp
updatedAtstring|nullISO 8601 last-update timestamp
translationsnullAlways null in list responses — full translations are available via the detail endpoint GET /api/admin/catalog/attributes/{id}
optionsnullAlways null in list responses — option data is available via the detail endpoint
validationnullAlways null in list responses — available via the detail endpoint
defaultValuenullAlways null in list responses — available via the detail endpoint

Sorting

Parameter formExample
Separate sort + order params?sort=id&order=desc

Sortable columns:

sort valueSorts by
idAttribute ID (default)
codeAttribute code
admin_nameAdmin label
typeAttribute type
positionDisplay order position

Pagination

  • Default page size: 10 items
  • Maximum page size: 50 items
  • Use ?page=N for page navigation and ?per_page=N to control page size

Errors

HTTP StatusCause
401 UnauthorizedMissing, expired, or revoked admin Bearer token
401 UnauthorizedMissing or invalid admin Bearer token

Unknown filter parameters are silently ignored — no error is returned.

Fields That Stay Null on the Listing

translations, options, validation, defaultValue, isComparable, enableWysiwyg, and regex are present on every row but always null. All resolve only on GET /api/admin/catalog/attributes/{id}, which loads every locale translation and, for option types, all options with their own translations.

Behaviour Worth Knowing

  • The boolean flags are integers, 0 or 1, not booleans.
  • System attributes are included. The listing returns both Bagisto's built-in attributes and admin-created ones. Pass ?is_user_defined=1 for admin-created only, or ?is_user_defined=0 for system only — worth knowing because system attributes cannot be deleted.
  • adminName is not locale-aware. It is the internal label set when the attribute was created. ?locale selects which translation row resolves the display name, falling back to adminName when the requested locale has no row.
  • swatchType stays null on a non-swatch attribute rather than carrying a default.
  • per_page caps at 50; a value of 0 or less falls back to 10.

Released under the MIT License.