v55

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

Update product attribute metadata

Update existing product attribute metadata with new values. When the update is processed, the merge strategy is used to apply changes to scalar and object type fields. The replace strategy is used to apply changes for fields in an array.

Note: Before submitting an update request, verify that the target entity exists using the attributeMetadata GraphQL query. Update operations do not verify that the entity exists. Requests targeting a nonexistent entity are accepted, but the update has no effect.

patch/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

Label for the attribute that is displayed in user interfaces.

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

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