Skip to main content

Mockup Generator API

You can use this API to generate mockups for your products.

PrintfulStoreClient.mockupGenerator

Printful API Reference

Source


Create a mockup generation task

Printful API Reference

Creates an asynchronous mockup generation task. Generation result can be retrieved using

Method

PrintfulStoreClient.mockupGenerator.createMockupTask(id: number, mockup_task: MockupTask)

Arguments

id - Product ID.

mockup_task - Mockup Task Info

Example Usage:

// Soon to be added

Retrieve product variant printfiles

Printful API Reference

List of printfiles available for products variants. Printfile indicates what file resolution should be used to create a mockup or submit an order.

Method

PrintfulStoreClient.mockupGenerator.getProductVariantPrintFiles(id: number, orientation?: Orientation, technique?: string)

Arguments

id - Product ID.

Optional orientation - Enum: "horizontal" "vertical", Optional orientation for wall art product printfiles. Allowed values: horizontal, vertical

Optional technique - Optional technique for product. This can be used in cases where product supports multiple techniques like DTG and embroidery

Example Usage:

// Soon to be added

Mockup generation task result

Printful API Reference

Returns asynchronous mockup generation task result. If generation task is completed, it will contain a list of generated mockups.

Method

PrintfulStoreClient.mockupGenerator.getMockupTaskResult(task_key: string)

Arguments

task_key - Task key retrieved when creating the generation task.

Example Usage:

// Soon to be added

Layout templates

Printful API Reference

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

Method

PrintfulStoreClient.mockupGenerator.getLayoutTemplates(id: number, orientation?: Orientation, technique?: string)

Arguments

id - Product ID. Optional orientation - Enum: "horizontal" "vertical", Optional orientation for wall art product printfiles. Allowed values: horizontal, vertical Optional technique - Optional technique for product. This can be used in cases where product supports multiple techniques like DTG and embroidery

Example Usage:

// Soon to be added