getTemplatesPreviewByMarker
Getting one template object by marker.
Description
This method retrieves a single template object based on its textual identifier (marker) from the API. It returns a Promise that resolves to a template preview object ITemplatePreviewsEntity.
TemplatePreviews.getTemplatesPreviewByMarker(
marker*,
langCode
);
Parameters schema
Schema
marker(required): string
The unique product marker used to identify the template. If not provided, a default behavior or error may occur
example: "template_12345"
langCode: string
Language code. Default: "en_US"
example: "en_US"
Examples
Minimal example
const response = await TemplatePreviews.getTemplatePreviewByMarker('my-marker');
Example with attributes
const response = await TemplatePreviews.getTemplatePreviewByMarker('my-marker', 'en_US');
Example response
{
"id": 3,
"title": "Preview Templates",
"proportions": {
"default": {
"horizontal": {
"width": 234,
"height": 324,
"alignmentType": "middleBottom"
},
"vertical": {
"width": 2,
"height": 3,
"alignmentType": "leftTop"
},
"square": {
"side": 3,
"alignmentType": "leftTop"
}
}
},
"identifier": "preview-templates",
"version": 0,
"attributeValues": {},
"position": 1,
"isUsed": false
}