Skip to main content

PDP Metafield Reference


The configuration for the preview is stored as a variant-level metafield with the following specifications:

Namespace: tinytags

Key: configuration

The schema is as-follows:

{
"Fields": [
{
"Type": "textbox",
"Limit": 15,
"URL": "",
"FontFamily": "Arial",
"FontSize": 40,
"TextAlignment": "left",
"Left": 1005,
"Top": 1363,
"Width": 399.41,
"Height": 45.2,
"Angle": 0,
"Fill": "rgb(0,0,0)",
"ScaleX": 1.57,
"ScaleY": 1.57,
"Position": "front"
},
{
"Type": "image",
"Limit": 30,
"URL": "gemstone.png",
"FontFamily": "",
"FontSize": 40,
"TextAlignment": "",
"Left": 1371,
"Top": 1330,
"Width": 900,
"Height": 900,
"Angle": 0,
"Fill": "rgb(0,0,0)",
"ScaleX": 0.07,
"ScaleY": 0.07,
"Position": "front"
}
],
"Options": [
{
"ID": 1,
"ValueID": 1,
"SKUPrefix": "L",
"Enabled": true,
"Position": "front"
},
{
"ID": 1,
"ValueID": 2,
"SKUPrefix": "C",
"Enabled": true,
"Position": "front"
},
{
"ID": 1,
"ValueID": 3,
"SKUPrefix": "R",
"Enabled": true,
"Position": "front"
},
{
"ID": 1,
"ValueID": 6,
"SKUPrefix": "J",
"Enabled": false,
"Position": "front"
},
{
"ID": 12,
"ValueID": 14,
"SKUPrefix": "U",
"Enabled": false,
"Position": "front"
},
{
"ID": 12,
"ValueID": 15,
"SKUPrefix": "L",
"Enabled": false,
"Position": "front"
},
{
"ID": 13,
"ValueID": 16,
"SKUPrefix": "Blue",
"Enabled": false,
"Position": "front"
},
{
"ID": 13,
"ValueID": 17,
"SKUPrefix": "Green",
"Enabled": false,
"Position": "front"
},
{
"ID": 13,
"ValueID": 18,
"SKUPrefix": "Red",
"Enabled": false,
"Position": "front"
},
{
"ID": 1,
"ValueID": 1,
"SKUPrefix": "L",
"Enabled": false,
"Position": "back"
},
{
"ID": 1,
"ValueID": 2,
"SKUPrefix": "C",
"Enabled": false,
"Position": "back"
},
{
"ID": 1,
"ValueID": 3,
"SKUPrefix": "R",
"Enabled": false,
"Position": "back"
},
{
"ID": 1,
"ValueID": 6,
"SKUPrefix": "J",
"Enabled": false,
"Position": "back"
},
{
"ID": 12,
"ValueID": 14,
"SKUPrefix": "U",
"Enabled": false,
"Position": "back"
},
{
"ID": 12,
"ValueID": 15,
"SKUPrefix": "L",
"Enabled": false,
"Position": "back"
},
{
"ID": 13,
"ValueID": 16,
"SKUPrefix": "Blue",
"Enabled": false,
"Position": "back"
},
{
"ID": 13,
"ValueID": 17,
"SKUPrefix": "Green",
"Enabled": false,
"Position": "back"
},
{
"ID": 13,
"ValueID": 18,
"SKUPrefix": "Red",
"Enabled": false,
"Position": "back"
}
],
"FrontBackgroundImage": "3942265ba8a0499882cb.jpg",
"BackBackgroundImage": "",
"FrontBaseSKU": "BA0VER",
"BackBaseSKU": "BA0VER"
}

Variant Customization Fields

Fields

An array of fields for the variant customizations

FieldDescription
TypeAllowed values are textbox or image
LimitApplies only to textboxes. Integer value used to specify how many characters are allowed in the entry field
URLApplies only to images. String value linked to the filename of the image to display
FontFamilyApplies only to textboxes. String value used to specify the font face to render the text in
FontSizeApplies only to textboxes. Decimal value used to specify the font size to render the text in
TextAlignmentApplies only to textboxes. String value used to specify how the text should be aligned in the preview
LeftThe absolute left position of the field in relation to the canvas. Can be a decimal data type
TopThe absolute top position of the field in relation to the canvas. Can be a decimal data type
WidthThe width of the field. Can be a decimal data type
HeightThe height of the field. Can be a decimal data type
AngleThe rotation of the element in terms of a degree. Can be a negative and/or a decimal
FillThe fill color of the field. Can be transparent and can be presented in either RGB, RGBA, or HEX format
ScaleXThe horizontal scale factor of the field. Can be a decimal data type
ScaleYThe vertical scale factor of the field. Can be a decimal data type
PositionThe position of the field in relation to the product. Allowed values are front or back

Options

An array of available options

FieldDescription
IDThe option ID. Will be an integer and will map to a shop level metafield
ValueIDThe value ID. Will be an integer and will map to a shop level metafield
SKUPrefixThe SKU prefix for this option. String datatype
EnabledDetermines whether the option is available for use. Boolean data type
PositionThe position of the option in relation to the product. Allowed values are front or back

Background Images

FrontBackgroundImage

The filename of the background of the front of the variant. String datatype

BackBackgroundImage

The filename of the background of the back of the variant preview. String datatype. Can be null

Base SKUs

FrontBaseSKU

The base SKU for the front of the variant

BackBaseSKU

The base SKU for the back of the variant