shop.feature.getList

Returns the list of product features.

Parameters

  • type_id GET Optional

    ID of a product type whose features should be returned. If not specified, the method returns the list of all product features set up in the online store.

  • format GET Optional

    Sets response format. Available options: json (default), xml.

Return value

Array with information about product features. Sub-arrays of individual features contain items with the following keys:

  • []['id'] int Feature ID.
  • []['code'] string Feature identifier editable in the store settings.
  • []['status'] strong Feature visibility in the storefront: 'private' (not visible), 'public' (visible).
  • []['name'] string Feature name.
  • []['type'] strong Feature type.
  • []['selectable'] int Flag denoting the possibility to select feature values from a pre-defined list in the product editor: 0 (available), 1 (unavailable).
  • []['multiple'] int Flag denoting the possibility to select multiple feature values from a pre-defined list in the product editor: 0 (available), 1 (unavailable).
  • []['count'] int Number of products associated with the feature’s values.
  • []['available_for_sku'] int Flag denoting the possibility to select feature values in product variants’ properties.
  • []['default_unit'] string Default measure unit selected in the feature settings.
  • []['builtin'] int Flag denoting whether it is a system feature: 0 (ordinary), 1 (system).
  • []['values'] array Array with the list of feature values, for features with the selectable flag, with the following keys:
  • []['values'][]['id'] int Value ID.
  • []['values'][]['sort'] int Feature value’s sort order value starting with 1.
  • []['values'][]['value'] mixed Feature value (available not for all feature types).

Example

https://demo1.webasyst.com/api.php/shop.feature.getList?