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