Skip to main content

Preview Sales Channel Product Template Against Product

POST 

/api/v2/sales-channels/:salesChannel/product-templates/preview

Resolves a set of field mappings against a specific product and returns the value each channel field would receive — without saving a template. Use it to preview how a template will map a product's data (fields, attributes, static values, and expressions) before you create or update it.

Body fields:

  • product_id (required, integer) — the product to resolve values for.
  • sales_channel_category_id (required, integer) — the channel category whose fields are being mapped. Must belong to the sales channel in the path.
  • field_mappings (optional, array) — the in-progress mappings to resolve. Each item: sales_channel_category_field_id (integer), source_type (one of product_field, product_attribute, static, expression), source_value (string), OR core_field_name (string) to target a core listing field (Title/Description/Price) by name. Blank or empty mappings are ignored and fall through to any existing channel mapping or default.

The response values object is keyed by channel field name; each entry has the resolved value and its provenance (override, template, channel_mapping, integration_mapping, channel_default, or blank).

Authentication: Requires Bearer token.

Request

Responses

OK