{
  "openapi": "3.1.1",
  "info": {
    "title": "Prodigi Studio API",
    "description": "Create photo books from published Studio templates using images already held in your website or app. Call POST /v1/books from your backend with templateId and images containing clientId and sourceUrl. Studio downloads and stores the images, resolves the template, and returns the book ID and status. Placements and issues are reported by POST /v1/books/{bookId}/preflight and in each export manifest. This server API does not preload the embedded visual editor. Use immutable exports for review and integration testing; inspect each export's readiness before production use. Operations marked deprecated are legacy mutable paths kept for existing integrations; they are not the qualified production path. Guide: https://studio.prodigi.com/help/studio-api. Authentication: https://studio.prodigi.com/auth.md",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://studio.prodigi.com",
      "description": "Production"
    }
  ],
  "paths": {
    "/v1/templates/{templateId}": {
      "get": {
        "tags": [
          "Photobook API v1"
        ],
        "summary": "Retrieve a published template contract",
        "operationId": "GetApiTemplate",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTemplateResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or unsynchronised merchant API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error. The body carries a stable machine-readable code and a message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/books": {
      "post": {
        "tags": [
          "Photobook API v1"
        ],
        "summary": "Create a resolved book from a template and source images",
        "description": "Import images from your own service by HTTPS URL. Studio fetches the bytes server-side and stores a copy for the new book. URLs must be reachable without browser cookies or custom authorization headers; short-lived signed URLs are supported if valid during import. Images must decode as JPEG, PNG or WebP, be no larger than 50 MB and 80 megapixels each, and be at least 200 × 200 pixels. Provide unique clientId values to track placements and issues. The published template controls the SKU, image counts and required text. Omit placements for automatic assignment in template order, or supply explicit clientId/slotId pairs. A 201 response returns the new book ID, status and summary; it does not list placements or issues. Read those from POST /v1/books/{bookId}/preflight or from the preflight section of an export manifest (GET /v1/exports/{exportId}). The response is not a link or session for the embedded editor.",
        "operationId": "CreateApiBook",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Stable key for this logical operation. Reuse the same key and equivalent request when retrying. Changed input returns 409 idempotency_conflict. Recover via GET /v1/operations/{kind}/{key}. Recommended: without this header, each request creates a new book.",
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCreateBookRequest"
              },
              "example": {
                "templateId": "your-published-template-id",
                "images": [
                  {
                    "clientId": "photo-001",
                    "sourceUrl": "https://images.example.com/customer/photo-001.jpg"
                  },
                  {
                    "clientId": "photo-002",
                    "sourceUrl": "https://images.example.com/customer/photo-002.jpg"
                  }
                ],
                "text": {
                  "cover.title": "Our summer"
                },
                "externalReference": "customer-book-123"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiBookResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request: templateId or images missing; an image clientId missing or duplicated; sourceUrl missing, not an absolute HTTPS URL, or pointing to localhost or a private IP address; an unknown text slot; or a placement naming an unknown clientId or slotId, or assigning a slot twice. Also returned for a malformed Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "A source image was fetched but rejected: the image server returned a non-success HTTP status (image_download_failed), the image exceeds 50 MB (image_too_large) or 80 megapixels (image_dimensions_too_large), cannot be decoded as JPEG, PNG or WebP (invalid_image), redirects to an unsupported destination (image_redirect_invalid), or is smaller than 200 × 200 pixels (image_too_small). Any keyed operation is recorded as failed; fix the image and use a new Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or unsynchronised merchant API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error. The body carries a stable machine-readable code and a message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Published template not found for this merchant.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Template revision changed, or the idempotency key conflicts with an earlier request or an unfinished operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "book_creation_failed: an unexpected failure while fetching or storing source images, such as an import timeout or storage failure while importing. DNS, TLS, connection and HTTP failures from the image server return 422 instead. The book and any keyed operation are recorded as failed, so repeating the same Idempotency-Key returns 409; use a new key to try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/formats": {
      "get": {
        "tags": [
          "Photobook API v1"
        ],
        "summary": "List supported formats and this merchant's accessible templates",
        "operationId": "ListApiFormats",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiFormatAvailability"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or unsynchronised merchant API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error. The body carries a stable machine-readable code and a message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/print-profiles": {
      "get": {
        "tags": [
          "Photobook API v1"
        ],
        "summary": "List shared versioned production print setups and their release status",
        "operationId": "ListApiPrintProfiles",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProductionPrintSetup"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or unsynchronised merchant API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error. The body carries a stable machine-readable code and a message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/print-profiles/{sku}": {
      "get": {
        "tags": [
          "Photobook API v1"
        ],
        "summary": "Get a shared versioned production print setup by SKU",
        "operationId": "GetApiPrintProfile",
        "parameters": [
          {
            "name": "sku",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductionPrintSetup"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or unsynchronised merchant API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error. The body carries a stable machine-readable code and a message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/exports/{exportId}/production-readiness": {
      "post": {
        "tags": [
          "Photobook API v1"
        ],
        "summary": "Check exact immutable files against the versioned production setup and disclose outstanding acceptance evidence",
        "operationId": "CheckApiProductionReadiness",
        "parameters": [
          {
            "name": "exportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductionPrintSetupCheck"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or unsynchronised merchant API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error. The body carries a stable machine-readable code and a message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/books/{bookId}/spine-geometry": {
      "post": {
        "tags": [
          "Photobook API v1"
        ],
        "summary": "Measure the book's spine for a destination",
        "operationId": "MeasureApiSpineGeometry",
        "parameters": [
          {
            "name": "bookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiSpineGeometryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSpineGeometryResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or unsynchronised merchant API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error. The body carries a stable machine-readable code and a message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/templates/{templateId}/contract": {
      "get": {
        "tags": [
          "Photobook API v1"
        ],
        "summary": "Retrieve template version, digest and requirements",
        "operationId": "GetApiTemplateSelection",
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTemplateSelection"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or unsynchronised merchant API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error. The body carries a stable machine-readable code and a message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/templates": {
      "post": {
        "tags": [
          "Photobook API v1"
        ],
        "summary": "Create and publish a template from photobook.template.v1 JSON",
        "operationId": "CreateApiTemplate",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Stable key for this logical operation. Reuse the same key and equivalent request when retrying. Changed input returns 409 idempotency_conflict. Recover via GET /v1/operations/{kind}/{key}. Required.",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonElement"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTemplateSelection"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or unsynchronised merchant API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error. The body carries a stable machine-readable code and a message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/books/{bookId}/exports": {
      "post": {
        "tags": [
          "Photobook API v1"
        ],
        "summary": "Create an immutable review export or promote an exact checked export",
        "operationId": "CreateApiExport",
        "parameters": [
          {
            "name": "bookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Stable key for this logical operation. Reuse the same key and equivalent request when retrying. Changed input returns 409 idempotency_conflict. Recover via GET /v1/operations/{kind}/{key}. Required.",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiExportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiExportResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or unsynchronised merchant API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error. The body carries a stable machine-readable code and a message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/exports/{exportId}": {
      "get": {
        "tags": [
          "Photobook API v1"
        ],
        "summary": "Retrieve an immutable export manifest",
        "operationId": "GetApiExport",
        "parameters": [
          {
            "name": "exportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiExportResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or unsynchronised merchant API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error. The body carries a stable machine-readable code and a message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/exports/{exportId}/preflight": {
      "post": {
        "tags": [
          "Photobook API v1"
        ],
        "summary": "Inspect the exact immutable PDFs with Studio's owned artifact preflight and retain a hash-bound report",
        "operationId": "PreflightApiExport",
        "parameters": [
          {
            "name": "exportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiArtifactPreflightReport"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or unsynchronised merchant API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error. The body carries a stable machine-readable code and a message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/exports/{exportId}/preflight/{reportId}": {
      "get": {
        "tags": [
          "Photobook API v1"
        ],
        "summary": "Read a recorded preflight report for the exact export hashes",
        "operationId": "GetApiExportPreflight",
        "parameters": [
          {
            "name": "exportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiArtifactPreflightReport"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or unsynchronised merchant API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error. The body carries a stable machine-readable code and a message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/exports/{exportId}/order-preview": {
      "post": {
        "tags": [
          "Photobook API v1"
        ],
        "summary": "Build an order payload template from immutable export files without creating or submitting an order",
        "operationId": "PreviewApiExportOrder",
        "parameters": [
          {
            "name": "exportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Proposed future order key; the dry-run preview does not reserve or consume it.",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9_.:-]{1,128}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiOrderPreviewRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOrderPreviewResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or unsynchronised merchant API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error. The body carries a stable machine-readable code and a message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/exports/{exportId}/test-assets": {
      "post": {
        "tags": [
          "Photobook API v1"
        ],
        "summary": "Issue ten-minute read-only PDF URLs for a checked integration-test export; creates no order or payment",
        "operationId": "CreateApiExportTestAssets",
        "parameters": [
          {
            "name": "exportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiExportTestAssetsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiExportTestAssetsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or unsynchronised merchant API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error. The body carries a stable machine-readable code and a message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/exports/{exportId}/production-handoff": {
      "post": {
        "tags": [
          "Photobook API v1"
        ],
        "summary": "Issue bounded two-file downloader access for an exact promoted production export; never creates or submits an order",
        "operationId": "CreateApiProductionHandoff",
        "parameters": [
          {
            "name": "exportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiProductionHandoffRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProductionHandoffResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or unsynchronised merchant API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error. The body carries a stable machine-readable code and a message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/exports/{exportId}/artifacts/{role}": {
      "get": {
        "tags": [
          "Photobook API v1"
        ],
        "summary": "Download an immutable PDF artifact",
        "operationId": "DownloadApiExportArtifact",
        "parameters": [
          {
            "name": "exportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "role",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PDF file bytes.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or unsynchronised merchant API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error. The body carries a stable machine-readable code and a message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/operations/{kind}/{key}": {
      "get": {
        "tags": [
          "Photobook API v1"
        ],
        "summary": "Recover book, template or export creation by idempotency key",
        "operationId": "GetApiOperation",
        "parameters": [
          {
            "name": "kind",
            "in": "path",
            "description": "Operation kind used when the key was supplied: book, template or export.",
            "required": true,
            "schema": {
              "enum": [
                "book",
                "template",
                "export"
              ],
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiOperation"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or unsynchronised merchant API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error. The body carries a stable machine-readable code and a message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/books/{bookId}": {
      "get": {
        "tags": [
          "Photobook API v1"
        ],
        "summary": "Retrieve book status, placements and latest preflight",
        "operationId": "GetApiBook",
        "parameters": [
          {
            "name": "bookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiBookResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or unsynchronised merchant API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error. The body carries a stable machine-readable code and a message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/books/{bookId}/preflight": {
      "post": {
        "tags": [
          "Photobook API v1"
        ],
        "summary": "Run source-content preflight; this does not certify exported files",
        "operationId": "PreflightApiBook",
        "parameters": [
          {
            "name": "bookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiPreflightResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or unsynchronised merchant API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error. The body carries a stable machine-readable code and a message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/books/{bookId}/render": {
      "post": {
        "tags": [
          "Photobook API v1"
        ],
        "summary": "Generate a review PDF after source-content preflight",
        "description": "Renders a screen-quality review PDF (lighter images, the same pages and page sizes as the print files) and overwrites the book's previous review PDF. It is never sent to print. Deprecated legacy path: it works on the book's mutable, default-only review state and is separate from immutable exports. It is not the qualified production checkout path. It remains available for existing integrations with unchanged behaviour; new integrations should use POST /v1/books/{bookId}/exports and the export endpoints.",
        "operationId": "RenderApiBook",
        "parameters": [
          {
            "name": "bookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiRenderResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or unsynchronised merchant API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error. The body carries a stable machine-readable code and a message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/v1/books/{bookId}/artifacts/pdf": {
      "get": {
        "tags": [
          "Photobook API v1"
        ],
        "summary": "Download the latest review PDF; immutable exports use /exports",
        "description": "Downloads the book's latest mutable review PDF; its bytes can change when the book is rendered again. Deprecated legacy path: it works on the book's mutable, default-only review state and is separate from immutable exports. It is not the qualified production checkout path. It remains available for existing integrations with unchanged behaviour; new integrations should use POST /v1/books/{bookId}/exports and the export endpoints.",
        "operationId": "DownloadApiBookPdf",
        "parameters": [
          {
            "name": "bookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PDF file bytes.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or unsynchronised merchant API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error. The body carries a stable machine-readable code and a message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/v1/books/{bookId}/orders": {
      "post": {
        "tags": [
          "Photobook API v1"
        ],
        "summary": "Create an order intent for merchant-owned checkout",
        "description": "Creates an order intent for the book and freezes the exact book it will print. Deprecated order-intent path, kept for existing integrations: the order freezes the exact book when it is created, and after payment Studio's shared print fulfilment service makes the measured, checked print files (combined and spine) and submits them to Prodigi. Submission is asynchronous, so an order can be Paid before it is Submitted: read GET /v1/orders/{orderId} for printStatus. There is no dry run. It is not the qualified production checkout path; new integrations should use POST /v1/books/{bookId}/exports and the export endpoints.",
        "operationId": "CreateApiOrderIntent",
        "parameters": [
          {
            "name": "bookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiCreateOrderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or unsynchronised merchant API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error. The body carries a stable machine-readable code and a message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/v1/orders/{orderId}/submit": {
      "post": {
        "tags": [
          "Photobook API v1"
        ],
        "summary": "Submit a paid order to print",
        "description": "Confirms payment for an unpaid order and starts printing its frozen book. Call it from your server after your checkout has taken payment, with the order reference from the embedded editor's book-ready event (order.reference), the payment reference, the recipient your checkout collected and, optionally, shippingMethod. Studio makes the print files (combined and spine), checks them and submits them to Prodigi. Submission is asynchronous, so an order can be Paid before it is Submitted: read GET /v1/orders/{orderId}. Repeated with the same paymentReference, it retries a print job held for review. Another merchant's order returns 404. There is no dry run.",
        "operationId": "SubmitApiOrder",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiSubmitOrderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or unsynchronised merchant API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error. The body carries a stable machine-readable code and a message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{orderId}": {
      "get": {
        "tags": [
          "Photobook API v1"
        ],
        "summary": "Retrieve order and print-submission status",
        "description": "Retrieves an order and its print status: state, printStatus, printReasons, prodigiOrderId, and the stage, issues and shipments Prodigi last reported. Another merchant's order returns 404.",
        "operationId": "GetApiOrder",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or unsynchronised merchant API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error. The body carries a stable machine-readable code and a message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApiArtifactPreflightReport": {
        "required": [
          "id",
          "exportId",
          "validatorVersion",
          "profile",
          "validatedAt",
          "binding",
          "sourceSnapshotAvailable",
          "status",
          "isProductionReady",
          "pdfX4Conformance",
          "coverageLimits",
          "bindingChecks",
          "artifacts"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "exportId": {
            "type": "string"
          },
          "validatorVersion": {
            "type": "string"
          },
          "profile": {
            "type": "string"
          },
          "validatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "binding": {
            "$ref": "#/components/schemas/ApiExportBinding"
          },
          "sourceSnapshotAvailable": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "isProductionReady": {
            "type": "boolean"
          },
          "pdfX4Conformance": {
            "type": "string"
          },
          "coverageLimits": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "bindingChecks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiProductionCheck"
            }
          },
          "artifacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PdfArtifactInspection"
            }
          },
          "isIntegrationTestReady": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "ApiArtifactPreflightSummary": {
        "required": [
          "reportId",
          "url",
          "status",
          "validatorVersion",
          "pdfX4Conformance",
          "isProductionReady"
        ],
        "type": "object",
        "properties": {
          "reportId": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "validatorVersion": {
            "type": "string"
          },
          "pdfX4Conformance": {
            "type": "string"
          },
          "isProductionReady": {
            "type": "boolean"
          },
          "isIntegrationTestReady": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "ApiBookIssue": {
        "required": [
          "code",
          "severity",
          "message"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "severity": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "location": {
            "type": [
              "null",
              "string"
            ]
          },
          "clientId": {
            "type": [
              "null",
              "string"
            ]
          },
          "slotId": {
            "type": [
              "null",
              "string"
            ]
          },
          "page": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ApiBookPlacement": {
        "required": [
          "clientId",
          "assetId",
          "slotId",
          "location",
          "effectivePpi",
          "cropRisk",
          "issues"
        ],
        "type": "object",
        "properties": {
          "clientId": {
            "type": "string"
          },
          "assetId": {
            "type": "string"
          },
          "slotId": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "effectivePpi": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "cropRisk": {
            "type": "string"
          },
          "issues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiBookIssue"
            }
          }
        }
      },
      "ApiBookResponse": {
        "required": [
          "id",
          "status",
          "templateId",
          "templateVersion",
          "product",
          "externalReference",
          "createdAt",
          "summary",
          "preflight",
          "pdf",
          "orderId"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "templateId": {
            "type": "string"
          },
          "templateVersion": {
            "type": "string"
          },
          "product": {
            "$ref": "#/components/schemas/ApiProductSummary"
          },
          "externalReference": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "summary": {
            "$ref": "#/components/schemas/ApiBookSummary"
          },
          "preflight": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiPreflightResponse"
              }
            ]
          },
          "pdf": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiPdfArtifact"
              }
            ]
          },
          "orderId": {
            "type": [
              "null",
              "string"
            ]
          },
          "templateSha256": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiBookSummary": {
        "required": [
          "submittedImages",
          "acceptedImages",
          "assignedImages",
          "unassignedImages",
          "contentPageCount",
          "outputPageCount"
        ],
        "type": "object",
        "properties": {
          "submittedImages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "acceptedImages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "assignedImages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "unassignedImages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "contentPageCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "outputPageCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ApiCreateBookRequest": {
        "required": [
          "templateId"
        ],
        "type": "object",
        "properties": {
          "templateId": {
            "type": "string"
          },
          "images": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiImageInput"
            }
          },
          "text": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "placements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiPlacementInput"
            }
          },
          "externalReference": {
            "type": [
              "null",
              "string"
            ]
          },
          "expectedTemplateVersion": {
            "type": [
              "null",
              "string"
            ]
          },
          "expectedTemplateSha256": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "description": "Resolve a published template with your existing images and text. Read the template contract first; required content and valid slot IDs depend on that template."
      },
      "ApiCreateOrderRequest": {
        "type": "object",
        "properties": {
          "copies": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "shippingMethod": {
            "type": [
              "null",
              "string"
            ]
          },
          "recipient": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OrderRecipient"
              }
            ]
          }
        }
      },
      "ApiErrorResponse": {
        "required": [
          "code",
          "message"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "details": { }
        }
      },
      "ApiExportAsset": {
        "required": [
          "role",
          "printArea",
          "url",
          "mediaType",
          "sizeBytes",
          "sha256",
          "pageCount",
          "orderAssetPageCount",
          "widthMm",
          "heightMm"
        ],
        "type": "object",
        "properties": {
          "role": {
            "type": "string"
          },
          "printArea": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "mediaType": {
            "type": "string"
          },
          "sizeBytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "sha256": {
            "type": "string"
          },
          "pageCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "orderAssetPageCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "widthMm": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "heightMm": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "ApiExportBinding": {
        "required": [
          "bookId",
          "templateId",
          "templateVersion",
          "templateSha256",
          "resolvedSha256",
          "product"
        ],
        "type": "object",
        "properties": {
          "bookId": {
            "type": "string"
          },
          "templateId": {
            "type": "string"
          },
          "templateVersion": {
            "type": "string"
          },
          "templateSha256": {
            "type": [
              "null",
              "string"
            ]
          },
          "resolvedSha256": {
            "type": "string"
          },
          "product": {
            "$ref": "#/components/schemas/ApiProductSummary"
          }
        }
      },
      "ApiExportReadiness": {
        "required": [
          "isProductionReady",
          "status",
          "profile",
          "checks"
        ],
        "type": "object",
        "properties": {
          "isProductionReady": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "profile": {
            "type": "string"
          },
          "checks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiProductionCheck"
            }
          },
          "isIntegrationTestReady": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "ApiExportRequest": {
        "type": "object",
        "properties": {
          "purpose": {
            "type": "string"
          },
          "expectedResolvedSha256": {
            "type": [
              "null",
              "string"
            ]
          },
          "destinationCountryCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "state": {
            "type": [
              "null",
              "string"
            ]
          },
          "sourceExportId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiExportResponse": {
        "required": [
          "id",
          "purpose",
          "createdAt",
          "binding",
          "preflight",
          "readiness",
          "artifacts",
          "geometrySource",
          "spineWidthMm"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "purpose": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "binding": {
            "$ref": "#/components/schemas/ApiExportBinding"
          },
          "preflight": {
            "$ref": "#/components/schemas/ApiPreflightResponse"
          },
          "readiness": {
            "$ref": "#/components/schemas/ApiExportReadiness"
          },
          "artifacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiExportAsset"
            }
          },
          "geometrySource": {
            "type": "string"
          },
          "spineWidthMm": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "spineGeometry": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiSpineGeometryResponse"
              }
            ]
          },
          "artifactPreflight": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiArtifactPreflightSummary"
              }
            ]
          },
          "sourceExportId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiExportTestAsset": {
        "required": [
          "role",
          "printArea",
          "url",
          "sha256",
          "sizeBytes",
          "pdfPageCount"
        ],
        "type": "object",
        "properties": {
          "role": {
            "type": "string"
          },
          "printArea": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "sha256": {
            "type": "string"
          },
          "sizeBytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "pdfPageCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pageCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ApiExportTestAssetsRequest": {
        "required": [
          "expectedResolvedSha256"
        ],
        "type": "object",
        "properties": {
          "expectedResolvedSha256": {
            "type": "string"
          }
        }
      },
      "ApiExportTestAssetsResponse": {
        "required": [
          "mode",
          "exportId",
          "binding",
          "spineGeometry",
          "preflightReportId",
          "expiresAt",
          "isIntegrationTestReady",
          "isProductionReady",
          "orderCreated",
          "paymentCreated",
          "assets",
          "scope"
        ],
        "type": "object",
        "properties": {
          "mode": {
            "type": "string"
          },
          "exportId": {
            "type": "string"
          },
          "binding": {
            "$ref": "#/components/schemas/ApiExportBinding"
          },
          "spineGeometry": {
            "$ref": "#/components/schemas/ApiSpineGeometryResponse"
          },
          "preflightReportId": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "isIntegrationTestReady": {
            "type": "boolean"
          },
          "isProductionReady": {
            "type": "boolean"
          },
          "orderCreated": {
            "type": "boolean"
          },
          "paymentCreated": {
            "type": "boolean"
          },
          "assets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiExportTestAsset"
            }
          },
          "scope": {
            "type": "string"
          }
        }
      },
      "ApiFormatAvailability": {
        "required": [
          "sku",
          "status",
          "templates",
          "blockers",
          "discoveryIssues"
        ],
        "type": "object",
        "properties": {
          "sku": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "templates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiTemplateSelection"
            }
          },
          "blockers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "discoveryIssues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiTemplateDiscoveryIssue"
            }
          },
          "printSetup": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProductionPrintSetup"
              }
            ]
          }
        }
      },
      "ApiImageInput": {
        "required": [
          "clientId",
          "sourceUrl"
        ],
        "type": "object",
        "properties": {
          "clientId": {
            "minLength": 1,
            "type": "string",
            "description": "Unique image identifier within this request, returned in placements and issues."
          },
          "sourceUrl": {
            "type": "string",
            "description": "Server-reachable HTTPS URL to JPEG, PNG or WebP bytes, at most 50 MB and at least 200 × 200 pixels. A signed URL must remain valid during import. Studio does not send your browser cookies or custom authentication headers.",
            "format": "uri"
          },
          "filename": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "description": "An existing image to import into a book. Studio stores a copy; no separate customer upload is needed."
      },
      "ApiOperation": {
        "required": [
          "kind",
          "resourceId",
          "status",
          "requestSha256",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "resourceId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "requestSha256": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "response": { },
          "errorCode": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiOrderPayloadAddress": {
        "required": [
          "line1",
          "line2",
          "postalOrZipCode",
          "countryCode",
          "townOrCity",
          "stateOrCounty"
        ],
        "type": "object",
        "properties": {
          "line1": {
            "type": "string"
          },
          "line2": {
            "type": [
              "null",
              "string"
            ]
          },
          "postalOrZipCode": {
            "type": "string"
          },
          "countryCode": {
            "type": "string"
          },
          "townOrCity": {
            "type": "string"
          },
          "stateOrCounty": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiOrderPayloadAsset": {
        "required": [
          "printArea",
          "url",
          "pageCount"
        ],
        "type": "object",
        "properties": {
          "printArea": {
            "type": "string"
          },
          "url": {
            "type": [
              "null",
              "string"
            ]
          },
          "pageCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ApiOrderPayloadItem": {
        "required": [
          "merchantReference",
          "sku",
          "copies",
          "sizing",
          "assets"
        ],
        "type": "object",
        "properties": {
          "merchantReference": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "copies": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "sizing": {
            "type": "string"
          },
          "assets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiOrderPayloadAsset"
            }
          }
        }
      },
      "ApiOrderPayloadRecipient": {
        "required": [
          "name",
          "email",
          "address"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "address": {
            "$ref": "#/components/schemas/ApiOrderPayloadAddress"
          }
        }
      },
      "ApiOrderPayloadTemplate": {
        "required": [
          "merchantReference",
          "idempotencyKey",
          "shippingMethod",
          "recipient",
          "items"
        ],
        "type": "object",
        "properties": {
          "merchantReference": {
            "type": "string"
          },
          "idempotencyKey": {
            "type": "string"
          },
          "shippingMethod": {
            "type": "string"
          },
          "recipient": {
            "$ref": "#/components/schemas/ApiOrderPayloadRecipient"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiOrderPayloadItem"
            }
          }
        }
      },
      "ApiOrderPreviewAsset": {
        "required": [
          "role",
          "printArea",
          "downloadPath",
          "mediaType",
          "sizeBytes",
          "sha256",
          "pdfPageCount",
          "proposedOrderPageCount",
          "pageCountBasis",
          "widthMm",
          "heightMm"
        ],
        "type": "object",
        "properties": {
          "role": {
            "type": "string"
          },
          "printArea": {
            "type": "string"
          },
          "downloadPath": {
            "type": "string"
          },
          "mediaType": {
            "type": "string"
          },
          "sizeBytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "sha256": {
            "type": "string"
          },
          "pdfPageCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "proposedOrderPageCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pageCountBasis": {
            "type": "string"
          },
          "widthMm": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "heightMm": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "ApiOrderPreviewRequest": {
        "type": "object",
        "properties": {
          "merchantReference": {
            "type": "string"
          },
          "copies": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "shippingMethod": {
            "type": "string"
          },
          "recipient": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OrderRecipient"
              }
            ]
          },
          "expectedResolvedSha256": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiOrderPreviewResponse": {
        "required": [
          "mode",
          "canSubmit",
          "submissionAttempted",
          "orderCreated",
          "previewSha256",
          "payloadSha256",
          "exportId",
          "binding",
          "spineGeometry",
          "artifactIntegrityVerified",
          "assets",
          "payloadTemplate",
          "blockers"
        ],
        "type": "object",
        "properties": {
          "mode": {
            "type": "string"
          },
          "canSubmit": {
            "type": "boolean"
          },
          "submissionAttempted": {
            "type": "boolean"
          },
          "orderCreated": {
            "type": "boolean"
          },
          "previewSha256": {
            "type": "string"
          },
          "payloadSha256": {
            "type": "string"
          },
          "exportId": {
            "type": "string"
          },
          "binding": {
            "$ref": "#/components/schemas/ApiExportBinding"
          },
          "spineGeometry": {
            "$ref": "#/components/schemas/ApiSpineGeometryResponse"
          },
          "artifactIntegrityVerified": {
            "type": "boolean"
          },
          "assets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiOrderPreviewAsset"
            }
          },
          "payloadTemplate": {
            "$ref": "#/components/schemas/ApiOrderPayloadTemplate"
          },
          "blockers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiProductionCheck"
            }
          }
        }
      },
      "ApiPageRuleSummary": {
        "required": [
          "sectionId",
          "type",
          "minPages",
          "maxPages",
          "allowedPageIds",
          "pageIds"
        ],
        "type": "object",
        "properties": {
          "sectionId": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "minPages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "maxPages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "allowedPageIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "pageIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ApiPdfArtifact": {
        "required": [
          "url",
          "mediaType",
          "sizeBytes",
          "sha256",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "mediaType": {
            "type": "string"
          },
          "sizeBytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "sha256": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApiPlacementInput": {
        "type": "object",
        "properties": {
          "clientId": {
            "type": "string"
          },
          "slotId": {
            "type": "string"
          }
        }
      },
      "ApiPreflightResponse": {
        "required": [
          "status",
          "canProceed",
          "isPrintReady",
          "outputPageCount",
          "contentPageCount",
          "pageWidthMm",
          "pageHeightMm",
          "summary",
          "placements",
          "issues"
        ],
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "canProceed": {
            "type": "boolean"
          },
          "isPrintReady": {
            "type": "boolean"
          },
          "outputPageCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "contentPageCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pageWidthMm": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "pageHeightMm": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "summary": {
            "$ref": "#/components/schemas/ApiBookSummary"
          },
          "placements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiBookPlacement"
            }
          },
          "issues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiBookIssue"
            }
          },
          "readinessScope": {
            "type": "string",
            "default": "source_content_only"
          }
        }
      },
      "ApiProductionCheck": {
        "required": [
          "code",
          "status",
          "detail"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          }
        }
      },
      "ApiProductionHandoffAsset": {
        "required": [
          "role",
          "printArea",
          "url",
          "sha256",
          "sizeBytes",
          "pdfPageCount"
        ],
        "type": "object",
        "properties": {
          "role": {
            "type": "string"
          },
          "printArea": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "sha256": {
            "type": "string"
          },
          "sizeBytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "pdfPageCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pageCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ApiProductionHandoffRequest": {
        "required": [
          "expectedResolvedSha256",
          "destinationCountryCode"
        ],
        "type": "object",
        "properties": {
          "expectedResolvedSha256": {
            "type": "string"
          },
          "destinationCountryCode": {
            "type": "string"
          },
          "state": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiProductionHandoffResponse": {
        "required": [
          "mode",
          "exportId",
          "sourceExportId",
          "binding",
          "spineGeometry",
          "preflightReportId",
          "expiresAt",
          "isProductionReady",
          "orderCreated",
          "submissionAttempted",
          "assets",
          "scope"
        ],
        "type": "object",
        "properties": {
          "mode": {
            "type": "string"
          },
          "exportId": {
            "type": "string"
          },
          "sourceExportId": {
            "type": "string"
          },
          "binding": {
            "$ref": "#/components/schemas/ApiExportBinding"
          },
          "spineGeometry": {
            "$ref": "#/components/schemas/ApiSpineGeometryResponse"
          },
          "preflightReportId": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "isProductionReady": {
            "type": "boolean"
          },
          "orderCreated": {
            "type": "boolean"
          },
          "submissionAttempted": {
            "type": "boolean"
          },
          "assets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiProductionHandoffAsset"
            }
          },
          "scope": {
            "type": "string"
          }
        }
      },
      "ApiProductSummary": {
        "required": [
          "sku",
          "coverType",
          "pageSize",
          "minPages",
          "maxPages",
          "pageIncrement"
        ],
        "type": "object",
        "properties": {
          "sku": {
            "type": [
              "null",
              "string"
            ]
          },
          "coverType": {
            "type": [
              "null",
              "string"
            ]
          },
          "pageSize": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PageSize"
              }
            ]
          },
          "minPages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "maxPages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pageIncrement": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pageCountBasis": {
            "type": "string",
            "default": "interior_excluding_covers"
          }
        }
      },
      "ApiRenderResponse": {
        "required": [
          "status",
          "artifact",
          "preflight"
        ],
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "artifact": {
            "$ref": "#/components/schemas/ApiPdfArtifact"
          },
          "preflight": {
            "$ref": "#/components/schemas/ApiPreflightResponse"
          },
          "purpose": {
            "type": "string",
            "default": "review"
          },
          "isProductionReady": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "ApiSlotConstraints": {
        "required": [
          "minPpi",
          "aspectRatioMin",
          "aspectRatioMax",
          "maxLength",
          "optional"
        ],
        "type": "object",
        "properties": {
          "minPpi": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "aspectRatioMin": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "aspectRatioMax": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "maxLength": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "optional": {
            "type": "boolean"
          }
        }
      },
      "ApiSlotSummary": {
        "required": [
          "slotId",
          "type",
          "label",
          "required",
          "location",
          "widthMm",
          "heightMm",
          "constraints"
        ],
        "type": "object",
        "properties": {
          "slotId": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "required": {
            "type": "boolean"
          },
          "location": {
            "type": "string"
          },
          "widthMm": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "heightMm": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "constraints": {
            "$ref": "#/components/schemas/ApiSlotConstraints"
          }
        }
      },
      "ApiSpineGeometryRequest": {
        "required": [
          "destinationCountryCode"
        ],
        "type": "object",
        "properties": {
          "destinationCountryCode": {
            "type": "string"
          },
          "state": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiSpineGeometryResponse": {
        "required": [
          "bookId",
          "sku",
          "templateVersion",
          "templateSha256",
          "destinationCountryCode",
          "state",
          "numberOfPages",
          "pageCountBasis",
          "widthMm",
          "source",
          "apiEnvironment",
          "isProductionReady",
          "resolvedSha256",
          "retrievedAt"
        ],
        "type": "object",
        "properties": {
          "bookId": {
            "type": "string"
          },
          "sku": {
            "type": [
              "null",
              "string"
            ]
          },
          "templateVersion": {
            "type": "string"
          },
          "templateSha256": {
            "type": [
              "null",
              "string"
            ]
          },
          "destinationCountryCode": {
            "type": "string"
          },
          "state": {
            "type": [
              "null",
              "string"
            ]
          },
          "numberOfPages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pageCountBasis": {
            "type": "string"
          },
          "widthMm": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "source": {
            "type": "string"
          },
          "apiEnvironment": {
            "type": "string"
          },
          "isProductionReady": {
            "type": "boolean"
          },
          "resolvedSha256": {
            "type": "string"
          },
          "retrievedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApiSubmitOrderRequest": {
        "type": "object",
        "properties": {
          "paymentReference": {
            "type": "string"
          },
          "paymentProvider": {
            "type": [
              "null",
              "string"
            ]
          },
          "requireLiveSubmission": {
            "type": "boolean"
          },
          "recipient": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OrderRecipient"
              }
            ]
          },
          "shippingMethod": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiTemplateDiscoveryIssue": {
        "required": [
          "templateId",
          "code",
          "message"
        ],
        "type": "object",
        "properties": {
          "templateId": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ApiTemplateRequirements": {
        "required": [
          "minimumImages",
          "maximumImages",
          "assignmentMode",
          "imageSlots",
          "textSlots",
          "pageRules"
        ],
        "type": "object",
        "properties": {
          "minimumImages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "maximumImages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "assignmentMode": {
            "type": "string"
          },
          "imageSlots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSlotSummary"
            }
          },
          "textSlots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiSlotSummary"
            }
          },
          "pageRules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiPageRuleSummary"
            }
          }
        }
      },
      "ApiTemplateResponse": {
        "required": [
          "id",
          "version",
          "name",
          "description",
          "product",
          "requirements"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "product": {
            "$ref": "#/components/schemas/ApiProductSummary"
          },
          "requirements": {
            "$ref": "#/components/schemas/ApiTemplateRequirements"
          }
        }
      },
      "ApiTemplateSelection": {
        "required": [
          "template",
          "templateSha256"
        ],
        "type": "object",
        "properties": {
          "template": {
            "$ref": "#/components/schemas/ApiTemplateResponse"
          },
          "templateSha256": {
            "type": "string"
          }
        }
      },
      "JsonElement": { },
      "Order": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "projectId": {
            "type": "string"
          },
          "merchantId": {
            "type": "string"
          },
          "prodigiEnvironment": {
            "type": [
              "null",
              "string"
            ]
          },
          "sku": {
            "type": "string"
          },
          "copies": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pageCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "shippingMethod": {
            "type": "string"
          },
          "recipient": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OrderRecipient"
              }
            ]
          },
          "state": {
            "$ref": "#/components/schemas/OrderState"
          },
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderStateChange"
            }
          },
          "paymentReference": {
            "type": [
              "null",
              "string"
            ]
          },
          "paymentProvider": {
            "type": [
              "null",
              "string"
            ]
          },
          "paidAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "templateId": {
            "type": [
              "null",
              "string"
            ]
          },
          "templateSha256": {
            "type": [
              "null",
              "string"
            ]
          },
          "resolvedSha256": {
            "type": [
              "null",
              "string"
            ]
          },
          "sourceSha256": {
            "type": [
              "null",
              "string"
            ]
          },
          "contentPageCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "frozenAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "prodigiOrderId": {
            "type": [
              "null",
              "string"
            ]
          },
          "submissionDryRun": {
            "type": "boolean"
          },
          "submittedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "printJobId": {
            "type": [
              "null",
              "string"
            ]
          },
          "printStatus": {
            "type": [
              "null",
              "string"
            ]
          },
          "printReasons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "fulfilmentStage": {
            "type": [
              "null",
              "string"
            ]
          },
          "printIssues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PrintIssue"
            }
          },
          "shipments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PrintShipment"
            }
          },
          "lastError": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "OrderRecipient": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "addressLine1": {
            "type": "string"
          },
          "addressLine2": {
            "type": [
              "null",
              "string"
            ]
          },
          "townOrCity": {
            "type": "string"
          },
          "stateOrCounty": {
            "type": [
              "null",
              "string"
            ]
          },
          "postalOrZipCode": {
            "type": "string"
          },
          "countryCode": {
            "type": "string"
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "OrderState": {
        "enum": [
          "Completed",
          "AwaitingPayment",
          "Paid",
          "Submitted",
          "Failed",
          "Cancelled"
        ]
      },
      "OrderStateChange": {
        "type": "object",
        "properties": {
          "state": {
            "$ref": "#/components/schemas/OrderState"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PageSize": {
        "required": [
          "width",
          "height"
        ],
        "type": "object",
        "properties": {
          "width": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "height": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PdfArtifactCheck": {
        "required": [
          "code",
          "status",
          "findings"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "findings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PdfArtifactInspection": {
        "required": [
          "role",
          "sha256",
          "sizeBytes",
          "actualPageCount",
          "supportedChecksPassed",
          "pdfX4Conformance",
          "checks"
        ],
        "type": "object",
        "properties": {
          "role": {
            "type": "string"
          },
          "sha256": {
            "type": "string"
          },
          "sizeBytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "actualPageCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "supportedChecksPassed": {
            "type": "boolean"
          },
          "pdfX4Conformance": {
            "type": "string"
          },
          "checks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PdfArtifactCheck"
            }
          }
        }
      },
      "PrintIssue": {
        "required": [
          "code",
          "description"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PrintProfileAsset": {
        "required": [
          "role",
          "printArea",
          "pageCountRule",
          "dimensionsRule"
        ],
        "type": "object",
        "properties": {
          "role": {
            "type": "string"
          },
          "printArea": {
            "type": "string"
          },
          "pageCountRule": {
            "type": "string"
          },
          "dimensionsRule": {
            "type": "string"
          }
        }
      },
      "PrintProfilePageCounts": {
        "required": [
          "minimumCombined",
          "maximumCombined",
          "increment",
          "minimumInterior",
          "maximumInterior",
          "orderAssetPageCountBasis"
        ],
        "type": "object",
        "properties": {
          "minimumCombined": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "maximumCombined": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "increment": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "minimumInterior": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "maximumInterior": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "orderAssetPageCountBasis": {
            "type": "string"
          }
        }
      },
      "PrintShipment": {
        "required": [
          "carrier",
          "service",
          "trackingNumber",
          "trackingUrl",
          "dispatchDate",
          "status"
        ],
        "type": "object",
        "properties": {
          "carrier": {
            "type": [
              "null",
              "string"
            ]
          },
          "service": {
            "type": [
              "null",
              "string"
            ]
          },
          "trackingNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "trackingUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "dispatchDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "status": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ProductionPrintProfile": {
        "required": [
          "id",
          "version",
          "sku",
          "coverType",
          "release",
          "trimMm",
          "destinationCountryCodes",
          "stateRequiredCountryCodes",
          "validStateCodes",
          "pageCounts",
          "insideCovers",
          "contentSafeArea",
          "suppliedBleedMm",
          "criticalContentMarginMm",
          "minimumImagePpi",
          "sourceColourSpace",
          "pdfX4Policy",
          "assets",
          "evidence",
          "releaseRequirements"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "coverType": {
            "type": "string"
          },
          "release": {
            "type": "string"
          },
          "trimMm": {
            "$ref": "#/components/schemas/PageSize"
          },
          "destinationCountryCodes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "stateRequiredCountryCodes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "validStateCodes": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "pageCounts": {
            "$ref": "#/components/schemas/PrintProfilePageCounts"
          },
          "insideCovers": {
            "type": "string"
          },
          "contentSafeArea": {
            "type": "string"
          },
          "suppliedBleedMm": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "criticalContentMarginMm": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "minimumImagePpi": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "sourceColourSpace": {
            "type": "string"
          },
          "pdfX4Policy": {
            "type": "string"
          },
          "assets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PrintProfileAsset"
            }
          },
          "evidence": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "releaseRequirements": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ProductionPrintSetup": {
        "required": [
          "profile",
          "profileSha256",
          "status",
          "isProductionReady"
        ],
        "type": "object",
        "properties": {
          "profile": {
            "$ref": "#/components/schemas/ProductionPrintProfile"
          },
          "profileSha256": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "isProductionReady": {
            "type": "boolean"
          }
        }
      },
      "ProductionPrintSetupCheck": {
        "required": [
          "exportId",
          "binding",
          "setup",
          "preflightReportId",
          "isIntegrationTestReady",
          "isProductionReady",
          "checks"
        ],
        "type": "object",
        "properties": {
          "exportId": {
            "type": "string"
          },
          "binding": {
            "$ref": "#/components/schemas/ApiExportBinding"
          },
          "setup": {
            "$ref": "#/components/schemas/ProductionPrintSetup"
          },
          "preflightReportId": {
            "type": "string"
          },
          "isIntegrationTestReady": {
            "type": "boolean"
          },
          "isProductionReady": {
            "type": "boolean"
          },
          "checks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiProductionCheck"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "description": "Your merchant's existing Prodigi API key, synchronised by signing in to Studio. Send it from your backend only; never include it in browser or iframe code. All data is scoped to that merchant.",
        "name": "X-API-Key",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "ApiKey": [ ]
    }
  ],
  "tags": [
    {
      "name": "Photobook API v1"
    }
  ]
}