Skip to content

Render template preview

GET
/communication/template-text/template-texts/{id}/rendered
Required scope: templatetext:read

Renders the template body and subject line with dummy data for the requested locale. Country conditionals are resolved for the requested country, for all countries that no block names if the country is OTHER, or for the default country of the locale if none is requested, translation tokens substituted, the repeat block expanded with fixture products, and scalar tokens substituted. The subject and the sender are those of the country that was used (OTHER: those of the language), exactly as a test send resolves them. Returns unresolved scalar token keys, the sender, the country that was used and the countries of the rendered template that have their own rows (country blocks and country settings; the saved template for GET) alongside the rendered HTML. To preview content that has not been saved, use POST /{id}/rendered.

Parameters ​

Query parameters

locale  string
Required
Locale code (e.g. 'sv', 'en').
country  string
ISO 3166-1 alpha-2 code of the country to resolve the country blocks for, in any case (e.g. 'FI'), or 'OTHER' for all countries that no country block names. Optional: the default country of the locale is used if it is left out.

Response ​

The rendered preview.