{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sudomock-com/json-schema/sudomock-com-photo-mockup-detail-response-schema.json",
  "title": "PhotoMockupDetailResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sudomock-com-photo-mockups-api-openapi.yml#/components/schemas/PhotoMockupDetailResponse",
  "properties": {
    "data": {
      "$ref": "#/$defs/PhotoMockupDetail",
      "description": "The mockup, its printable areas and its surfaces."
    },
    "success": {
      "type": "boolean",
      "const": true,
      "description": "Always true on a successful response.",
      "default": true
    }
  },
  "type": "object",
  "required": [
    "data"
  ],
  "$defs": {
    "PhotoMockupDetail": {
      "properties": {
        "mockup_id": {
          "type": "string",
          "description": "Unique identifier for the mockup."
        },
        "name": {
          "type": "string",
          "description": "Display name of the mockup."
        },
        "status": {
          "type": "string",
          "description": "Preparation state of the mockup: draft, processing, ready or error."
        },
        "customizable": {
          "type": "boolean",
          "description": "Whether the mockup is ready to accept artwork."
        },
        "thumbnail_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "URL of the mockup's thumbnail image."
        },
        "source_width": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Width of the source image in pixels."
        },
        "source_height": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Height of the source image in pixels."
        },
        "quads": {
          "items": {
            "$ref": "#/$defs/PhotoMockupPrintArea"
          },
          "type": "array",
          "description": "Printable areas saved on this mockup."
        },
        "surfaces": {
          "items": {
            "$ref": "#/$defs/PhotoMockupSurface"
          },
          "type": "array",
          "description": "Printable surfaces in the photo, products and the main wall of a room photo, each addressable as a render target."
        },
        "version": {
          "type": "integer",
          "description": "Version of this mockup's saved definition.",
          "default": 1
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "description": "When the mockup was created."
        },
        "updated_at": {
          "type": "string",
          "format": "date-time",
          "description": "When the mockup was last updated."
        }
      },
      "type": "object",
      "required": [
        "mockup_id",
        "name",
        "status",
        "customizable",
        "created_at",
        "updated_at"
      ],
      "title": "PhotoMockupDetail"
    },
    "PhotoMockupPrintArea": {
      "properties": {
        "print_area_id": {
          "type": "string",
          "description": "Unique identifier for the print area."
        },
        "points": {
          "anyOf": [
            {
              "items": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "description": "The area's four [x, y] corner points in source image pixels."
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Label for the print area, such as 'Front'."
        },
        "sort_order": {
          "type": "integer",
          "description": "Position of this print area in the mockup's own order, starting at 0.",
          "default": 0
        }
      },
      "type": "object",
      "required": [
        "print_area_id"
      ],
      "title": "PhotoMockupPrintArea"
    },
    "PhotoMockupSurface": {
      "properties": {
        "surface_uuid": {
          "type": "string",
          "description": "Unique identifier for the printable surface."
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "What was detected on this surface, such as \"wall\" or \"pillow\"."
        },
        "points": {
          "anyOf": [
            {
              "items": {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "description": "Outline of the surface as [x, y] points in source image pixels."
        },
        "bbox": {
          "anyOf": [
            {
              "additionalProperties": {
                "type": "number"
              },
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "description": "Box enclosing the surface, with x, y, width and height in source pixels."
        }
      },
      "type": "object",
      "required": [
        "surface_uuid"
      ],
      "title": "PhotoMockupSurface",
      "description": "One printable product in the photo, or the main wall of a room photo, addressed by its own id.\n\nSend ``surface_uuid`` as a render target to print across the whole of it."
    }
  }
}