Skip to main content
Version: 202701

Get customization template

GET 

/openapi/2027-01/customization/templates/:id

Returns the detail of a single customization template, including components, groups and conditions.

Request​

Path Parameters

    id stringrequired

    Template ID

Responses​

OK

Schema
    codestring

    error code

    messagestring

    error message

    data object
    template object

    Template detail

    idstring

    Template ID

    namestring

    Template name

    with_previewint32

    Preview mode: 0-options only, 1-with preview, 2-with artwork

    components object[]

    Customization items

  • Array [
  • keystring

    Component key, format {type}-{8 chars}, unique within one configuration

    typestring

    Component type: text / dropdown / checkbox / button / image / upload / datetime / size-pricing / preview-*

    settingsobject

    Component settings. Common fields: label (required, unique within a product), order_label, required, support_condition, value, options[]; options[]: key (option identifier, used by ERP to match), label, value, imageUrl, price, link, children, parentKey; remaining fields depend on type

    price_settings object

    Pricing rule of this component

    calc_typestring

    Calculation type: component / option / bysize / formula

    price object

    Price map. Key is the component key when calc_type=component, the option key when option, the size key when bysize

    property name*double
    settingsobject

    Extra settings, contains formula when calc_type=formula

  • ]
  • groups object[]

    Component groups

  • Array [
  • keystring

    Group key

    group_namestring

    Group display name

    containsstring[]

    Keys of the components contained in this group

    typestring

    Group type: material (each component's default wrapping group, key equals the component key) / group (custom group, key looks like group-xxxxxxxx)

  • ]
  • conditions object[]

    Chained display rules

  • Array [
  • rulesobject

    {items: [{type: custom/product, left, right: []}], logic: and/or}. For custom: left is a component key, right is an option key; for product: left is a variant option name, right is a variant option value

    targetsstring[]

    Keys of the components or groups to show

  • ]
  • preview_settings object

    Preview settings, present when with_preview is 1 or 2

    physical_sizeobject

    {width, height, unit: mm/inch/px, dpi}

    layersGoogleProtobufValue

    Layers definition

    artwork_image object

    Artwork image

    srcstring

    Image URL

    widthint32

    Image width in pixels

    heightint32

    Image height in pixels