This guide provides a detailed walkthrough for enabling and utilizing SKU metadata through the Violet API. Metadata provides custom data applied by merchants to their products and is accessible through the Violet Offer and SKU objects. By following this guide, you will be able to enable SKU metadata syncing and include it in your API responses.
To enable the syncing of SKU metadata, you must use the Toggle Global Feature Flag endpoint in the Merchant Configuration API. Metadata syncing must be enabled for each merchant individually to avoid performance issues for merchants that do not use metadata.
sync_sku_metadata
false
By default, SKU metadata is not included in the API responses. To include metadata, use the include
query parameter with the value sku_metadata
.
include
sku_metadata
The following endpoints support the inclusion of SKU metadata:
When SKU metadata is included in the API response, it will be provided in the metadata
property of the Sku
object. The metadata will include the following fields:
version
: The schema version for the metadata (currently 1.0
).type
: The type of metadata value (e.g., STRING
, JSON
, INTEGER
, BOOLEAN
).external_type
: The raw value type from the external commerce platform.key
: The key or name representing the metadata.value
: The value of the metadata.source
: Source of the metadata (EXTERNAL
for all current metadata).If the type
property is JSON
, the value
property will contain a serialized JSON string.
After enabling metadata syncing and adding the appropriate query parameter (include=sku_metadata
), test the API responses to ensure that metadata is included.
metadata
property is present in the response.version
, type
, key
, and value
).value
property contains a valid serialized JSON string.By following these steps, you can successfully implement SKU metadata using the Violet API and provide merchants with access to their custom product data.
This guide provides a detailed walkthrough for enabling and utilizing SKU metadata through the Violet API. Metadata provides custom data applied by merchants to their products and is accessible through the Violet Offer and SKU objects. By following this guide, you will be able to enable SKU metadata syncing and include it in your API responses.
To enable the syncing of SKU metadata, you must use the Toggle Global Feature Flag endpoint in the Merchant Configuration API. Metadata syncing must be enabled for each merchant individually to avoid performance issues for merchants that do not use metadata.
sync_sku_metadata
false
By default, SKU metadata is not included in the API responses. To include metadata, use the include
query parameter with the value sku_metadata
.
include
sku_metadata
The following endpoints support the inclusion of SKU metadata:
When SKU metadata is included in the API response, it will be provided in the metadata
property of the Sku
object. The metadata will include the following fields:
version
: The schema version for the metadata (currently 1.0
).type
: The type of metadata value (e.g., STRING
, JSON
, INTEGER
, BOOLEAN
).external_type
: The raw value type from the external commerce platform.key
: The key or name representing the metadata.value
: The value of the metadata.source
: Source of the metadata (EXTERNAL
for all current metadata).If the type
property is JSON
, the value
property will contain a serialized JSON string.
After enabling metadata syncing and adding the appropriate query parameter (include=sku_metadata
), test the API responses to ensure that metadata is included.
metadata
property is present in the response.version
, type
, key
, and value
).value
property contains a valid serialized JSON string.By following these steps, you can successfully implement SKU metadata using the Violet API and provide merchants with access to their custom product data.