v55

latestOpenAPI 3.0.3raw.githubusercontent.com2026-08-012046146.0 KB
ProductMetadata

Create product attribute metadata

To ensure product data is indexed for discovery, create or replace existing product attribute metadata resources before creating products.

For each Commerce project, you must define metadata for the following attributes for each catalog source (locale):

  • sku
  • name
  • description
  • shortDescription
  • price

Also, you can define metadata for custom attributes.

When creating product attribute metadata:

  • Each product attribute requires a unique code and source.
  • Use the dataType field to define the data type for the product attribute.
  • Use the visibleIn field to define where the product attribute is displayed on the storefront.
  • Use the filterable, sortable, and searchable fields to define how the product attribute is used for filtering, sorting, and searching.
  • Use the searchWeight field to define the search weight for the product attribute.
  • Use the searchTypes field to define the search type for the product attribute.

To update existing product attribute metadata, use the update operation.

post/v1/catalog/products/metadata

Headers

Authorizationstring required

Authorization Bearer token

Content-Type'application/json' required
Content-Encoding'gzip'

Use this header if the payload is compressed with gzip.

Request body

codestring required

Attribute code

visibleInstring[]

Determines how the attribute is used on the storefront.

  • PRODUCT_DETAIL: Product attribute is visible on the Product Detail Page.
  • PRODUCT_LISTING: Product attribute is visible on Product Listing Page.
  • SEARCH_RESULTS: Product attribute is visible on Search Results Page.
  • PRODUCT_COMPARE: Product attribute is visible on Product Compare Page.
labelstring required

Label for the attribute that is displayed in user interfaces.

dataType'TEXT' | 'DECIMAL' | 'INTEGER' | 'BOOLEAN' required

Data type

filterableboolean

Indicates whether the attribute can be used to filter products.

sortableboolean

Indicates whether the attribute can be used to sort products.

searchableboolean

Indicates whether the attribute value can be used in search queries to filter results.

searchWeightnumber float

The weight associated with a searchable attribute. Attributes with a greater weight are returned before attributes with a lower weight.

searchTypesstring[]

Search types associated with this attribute, for example: autocomplete, starts_with, and so on.

Example request

[
  {
    "source": {
      "locale": "English"
    },
    "label": "Attribute Name",
    "dataType": "TEXT",
    "filterable": true,
    "sortable": true,
    "searchable": true
  }
]

Response

All items accepted and will be processed asynchronously