---
title: "Layout templates"
method: GET
path: "/mockup-generator/templates/{id}"
tags: ["Mockup Generator API"]
---

# Layout templates

`GET /mockup-generator/templates/{id}`

Retrieve list of templates that can be used for client-side positioning.

<div class="alert alert-info">
This endpoint uses DTG as a default printing technique for product layouts
with more than one technique available. For products with DTG and more
techniques available please specify the correct technique in query by using
the `technique` parameter. For more information read the <a href="#tag/Examples/Mockup-Generator-API-examples">examples</a>.
</div>

## Path parameters

- `id` integer, required

## Query parameters

- `orientation` 'horizontal' | 'vertical' — Optional orientation for wall art product printfiles. Allowed values: horizontal, vertical
- `technique` string — Optional technique for product. This can be used in cases where product supports multiple techniques like DTG and embroidery

## Headers

- `X-PF-Store-Id` string

## Response `200`

OK

- object
  - `code` integer — Response status code `200`
  - `result` ProductTemplate — Product Template
    - `version` integer — Resource version. If this changes, resources (positions, images, etc.) should be re-cached.
    - `min_dpi` integer — Recommended minimum DPI for given product.
    - `variant_mapping` TemplateVariantMapping[] — List of product variants mapped to templates. From this information you can determine which template should be used for a variant.
      - `variant_id` integer — Product variant ID.
      - `templates` TemplateVariantMappingItem[] — Array of Template Variant Mapping items
        - `placement` string — Placement ID.
        - `template_id` integer — Corresponding template id which should be used for this variant and placement combination.
    - `templates` Template[] — List of templates. Use variant_mapping to determine which template corresponds to which product variant.
      - `template_id` integer — Template ID.
      - `image_url` string — Main template image URL.
      - `background_url` string, nullable — Background image URL (optional).
      - `background_color` integer, nullable — HEX color code that should be used as a background color.
      - `printfile_id` integer — Printfile ID that should be generated for this template. See [printfile API endpoint](#operation/getPrintfiles) for list of Printfiles.
      - `template_width` integer — Width of the whole template in pixels.
      - `template_height` integer — Height of the whole template in pixels.
      - `print_area_width` integer — Print area width (image is positioned in this area).
      - `print_area_height` integer — Print area height (image is positioned in this area).
      - `print_area_top` integer — Print area top offset (offset in template).
      - `print_area_left` integer — Print area left offset (offset in template).
      - `is_template_on_front` boolean — Should the main template image (image_url) be used as an overlay or as a background.
      - `orientation` 'horizontal' | 'vertical' | 'any' — Wall art product orientation. Possible values: horizontal, vertical, any
    - `conflicting_placements` TemplatePlacementConflict[] — List of conflicting placements. Used to determine which placements can be used together.
      - `placement` string — Placement ID
      - `conflicts` string[] — List Placement IDs that are conflicting with given placement

## Other responses

- `401` — Unauthorized
- `404` — Not found

---

[API](https://skmtc.net/printful/apis/api-documentation-printful.md) · [All operations](https://skmtc.net/printful/apis/api-documentation-printful/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/printful/api-documentation-printful/revisions/18e2f2e178dd/schema)
