SudoMock
GET

Get Mockup Detail

Retrieve detailed information about a specific mockup template including all smart objects and metadata.

GET/api/v1/mockups/{uuid}

Request

Headers

X-API-KEYstringRequired

Your SudoMock API key starting with sm_

Path Parameters

uuidstringRequired

The unique identifier of the mockup. Returned from upload or list endpoints.

Code Examples

Get Mockup Detail
bash
1curl -X GET "https://api.sudomock.com/api/v1/mockups/abc123-def456-ghi789" \
2 -H "X-API-KEY: sm_your_api_key"

Response

Success Response

200OK
Response 200 OK
1{
2 "success": true,
3 "data": {
4 "uuid": "abc123-def456-ghi789",
5 "name": "Product Mockup",
6 "thumbnail": "https://cdn.sudomock.com/abc123/thumbnails/thumb_720.jpg",
7 "width": 3000,
8 "height": 2000,
9 "smart_objects": [
10 {
11 "uuid": "so-uuid-001",
12 "name": "Product Image",
13 "layer_name": "Smart Object 1",
14 "size": { "width": 3000, "height": 3000 },
15 "position": { "x": 100, "y": 100, "width": 800, "height": 600 },
16 "quad": null,
17 "blend_mode": "normal",
18 "print_area_presets": [
19 {
20 "uuid": "preset-uuid-001",
21 "name": "Default",
22 "size": { "width": 3000, "height": 3000 },
23 "position": { "x": 0, "y": 0, "width": 3000, "height": 3000 }
24 }
25 ]
26 }
27 ],
28 "text_layers": [],
29 "collections": [],
30 "thumbnails": [
31 { "width": 720, "url": "https://cdn.sudomock.com/abc123/thumbnails/thumb_720.jpg" },
32 { "width": 480, "url": "https://cdn.sudomock.com/abc123/thumbnails/thumb_480.jpg" },
33 { "width": 240, "url": "https://cdn.sudomock.com/abc123/thumbnails/thumb_240.jpg" }
34 ]
35 },
36 "message": ""
37 }
38}

Response Fields

uuidstringRequired

Unique identifier for the mockup.

namestringRequired

Name of the mockup template.

thumbnailstring

URL to the mockup preview image (720px width).

widthinteger

Original PSD width in pixels.

heightinteger

Original PSD height in pixels.

smart_objectsarrayRequired

List of editable smart object layers.

smart_objects[].uuidstringRequired

UUID of the smart object. Use this when rendering.

smart_objects[].namestringRequired

Human-readable name of the smart object.

smart_objects[].layer_namestring

Original layer name from Photoshop.

smart_objects[].sizeobjectRequired

Original dimensions of the smart object content (width, height).

smart_objects[].positionobjectRequired

Position and size of the smart object in the mockup (x, y, width, height).

smart_objects[].quadarray

Four [x, y] coordinate pairs representing corners. Scale tier only.

smart_objects[].blend_modestring

Layer blend mode (e.g., normal, multiply).

smart_objects[].print_area_presetsarray

Predefined print area configurations for the smart object.

thumbnailsarray

Multiple thumbnail sizes (720px, 480px, 240px).

Quad Data (Scale Tier Only)

The quad field contains perspective corner coordinates for advanced canvas rendering. This is only available for Scale tier users. Free and Pro users will see null.

Error Responses

401Unauthorized
json
1{
2 "success": false,
3 "detail": "Invalid or missing API key"
4}
404Not Found
json
1{
2 "success": false,
3 "detail": "Mockup not found"
4}

This error occurs when the mockup doesn't exist or belongs to a different account.

500Internal Server Error
json
1{
2 "success": false,
3 "detail": "Internal error while getting mockup detail"
4}

Common Use Case

Use this endpoint to fetch mockup metadata before rendering. You'll need the smart object UUIDs to specify which layers to update:

Fetch Mockup then Render
1// 1. Get mockup details
2const mockup = await fetch(
3 "https://api.sudomock.com/api/v1/mockups/abc123",
4 { headers: { "X-API-KEY": apiKey } }
5).then(r => r.json());
6
7// 2. Extract smart object UUID
8const designArea = mockup.data.smart_objects.find(
9 so => so.name === "Design Area"
10);
11
12// 3. Render with your design
13const render = await fetch(
14 "https://api.sudomock.com/api/v1/renders",
15 {
16 method: "POST",
17 headers: {
18 "X-API-KEY": apiKey,
19 "Content-Type": "application/json"
20 },
21 body: JSON.stringify({
22 mockup_uuid: mockup.data.uuid,
23 smart_objects: [{
24 uuid: designArea.uuid,
25 asset: { url: "https://your-cdn.com/design.png" }
26 }]
27 })
28 }
29);

Try It Live

GET/api/v1/mockups/your-mockup-uuid-here

Get detailed information about a specific mockup.

Get your API key from the Dashboard

Best Practices

Performance Tips

  • Cache mockup details locally to avoid repeated API calls
  • Store smart object UUIDs after first fetch for rendering workflows
  • Use list-mockups for bulk fetching, this endpoint for single mockup details
  • The response includes all data needed for rendering—no additional calls required

Common Issues

  • 404 Not Found: Double-check the UUID format and ownership
  • Missing quad data: This is Scale tier only, Free/Pro users see null
  • Empty smart_objects: The PSD may not have any smart object layers