GET/mockup

Generate Mockup

Generate a product mockup image with custom artwork and options.

Endpoint

GET https://i.merchify.io/mockup

Required Parameters

productIdstring

The unique identifier for the product.

mockupIdstring

The mockup template ID to use for rendering.

designstring

Base64-encoded JSON array of design elements (artwork, colors).

sigstring

Request signature for authentication.

Optional Parameters

variantIdstring

The variant ID for color/size specific mockups.

widthnumber

Output image width in pixels. Allowed values: 400, 600, 800, 1000 (default), 1200, 1400, 1600, 1800, 2000, 2500, 3000, 4000.

grainnumber

Add film grain effect. Values: 0 (none), 1 (subtle), 2 (strong).

arstringNew

Aspect ratio for the output image. Crops the mockup to fit the specified ratio.

Values:

  • 16:9 - Landscape (default, no cropping)
  • 2:3 - Portrait (crops sides to fit)

accountIdstring

Your Merchify account ID.

Example Request

GET /mockup?productId=BEEB77&mockupId=abc123&variantId=var1&design=W3siaW1hZ2VVcmwiOiJodHRwczovL...&width=1000&ar=2:3&sig=your_signature

Using JavaScript? The SDK documentation provides a simpler way to generate signed mockup URLs with the mockupUrl() helper.

Aspect Ratio Comparison

The ar parameter controls how the mockup is cropped:

16:9
ar=16:9

Default landscape

2:3
ar=2:3

Portrait (social/mobile)

Response

Returns a PNG or WebP image binary with the rendered mockup.

200Image binary (Content-Type: image/png or image/webp)
400Invalid parameters (missing required fields, invalid ar value)
401Invalid or missing signature