{
    "openapi": "3.1.0",
    "info": {
        "title": "HeatApplied API",
        "version": "v1",
        "description": "Generated from the endpoint definitions (RESOURCES / DOCS / SCHEMAS constants)."
    },
    "servers": [
        {
            "url": "https://api.heatapplied.com"
        }
    ],
    "security": [
        {
            "bearerAuth": []
        }
    ],
    "paths": {
        "/v1/artwork/mutators": {
            "get": {
                "tags": [
                    "Artwork"
                ],
                "summary": "List variable mutators (staff)",
                "description": "Staff only. Staff keys. Enumerates the registered variable mutators a master's `mutator_rules` may use, with each one's `params` schema. Mutators run in rule order on every derivative data row: splitters write `<variable_in>_Line1` / `_Line2`, cutters rewrite `<variable_in>`, `TransformText` rewrites `<variable_in>` per `mode`, `CreateField` writes `<variable_in>` from a `{Var}` template, `DismissField` drops `<variable_in>` from the output. Required account permission: _AdminConsole_Artwork_Edit.",
                "operationId": "getArtworkMutators",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "List variable mutators (staff)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Mutator"
                                            }
                                        },
                                        "page": {
                                            "type": "integer"
                                        },
                                        "pages": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        },
                                        "errors": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Key is not owned by a staff account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/artwork/{uuid}/unarchive": {
            "get": {
                "tags": [
                    "Artwork"
                ],
                "summary": "Unarchive artwork",
                "description": "Restores an archived artwork to the active list. Required account permission: _Account_Artwork_Archive or _AdminConsole_Artwork_Archive.",
                "operationId": "getArtworkUnarchive",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "customer",
                        "in": "query",
                        "required": false,
                        "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                        "schema": {
                            "type": "string",
                            "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                            "example": "customer@example.com"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Unarchive artwork",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Artwork"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Artwork not found on this account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Not archived.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/artwork/{uuid}/archive": {
            "get": {
                "tags": [
                    "Artwork"
                ],
                "summary": "Archive artwork",
                "description": "Hides the artwork from listings and blocks new orders for it. Emits the `artwork.archived` webhook. Required account permission: _Account_Artwork_Archive or _AdminConsole_Artwork_Archive.",
                "operationId": "getArtworkArchive",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "customer",
                        "in": "query",
                        "required": false,
                        "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                        "schema": {
                            "type": "string",
                            "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                            "example": "customer@example.com"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Archive artwork",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Artwork"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Artwork not found on this account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Already archived.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/artwork/{uuid}/download": {
            "get": {
                "tags": [
                    "Artwork"
                ],
                "summary": "Download current file",
                "description": "Streams the artwork's current file as an attachment: the file you uploaded until preflight completes, then the print-ready file produced by preflight (each preflight completion creates a new version). System-generated artwork (designer output, pre-spaced names) is locked until it has been ordered at least once. Required account permission: _Account_Artwork_Download or _AdminConsole_Artwork_Download.",
                "operationId": "getArtworkDownload",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "customer",
                        "in": "query",
                        "required": false,
                        "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                        "schema": {
                            "type": "string",
                            "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                            "example": "customer@example.com"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Binary file body with `Content-Disposition: attachment`.",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Download locked until first order.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Artwork or file not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/artwork/{uuid}/document": {
            "get": {
                "tags": [
                    "Artwork"
                ],
                "summary": "Get master design document (staff)",
                "description": "Staff only. Staff keys. Returns the schema-v1 design document a lab master was compiled from — the input to re-send (edited) as `PATCH … {document}`. 409 for a non-master, or for an uploaded Illustrator-package master (no document — download its PDF/package with `GET …/download` and replace it with `POST …/package`). Required account permission: _AdminConsole_Artwork_Edit.",
                "operationId": "getArtworkDocument",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`{artwork_uuid, design_uuid, document: {…}}`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Key is not owned by a staff account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Artwork not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Not a master, or the master has no design document.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/artwork/{uuid}/production": {
            "post": {
                "tags": [
                    "Artwork"
                ],
                "summary": "Attach production file (staff)",
                "description": "Staff only. Staff keys. Attaches a print-ready production PDF to the artwork — the file production actually images from, as Admin → Artwork → Print Files does. The artwork may belong to any customer account. The PDF is stored as a new `print_file` row for the given `print_method_id`, versioned above the artwork's existing files for that method (production always picks the highest version); a 72 dpi preview is rendered and the trimmed image / page dimensions are measured from it. The artwork's `status` is NOT changed — pair with `POST /v1/artwork` using `customer` + `status: 3`, or set the status separately. Send as `multipart/form-data`. Required account permission: _AdminConsole_Artwork_Edit.",
                "operationId": "postArtworkProduction",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Attach production file (staff)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PrintFile"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation failed, file not a PDF, or the PDF could not be rendered.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Key is not owned by a staff account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Artwork or print method not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "The production PDF (≤ 50 MB). Only `.pdf` is accepted."
                                    },
                                    "print_method_id": {
                                        "type": "integer",
                                        "description": "Print method the file is prepared for. 1 = Screen Printing Sheet-Fed (default).",
                                        "default": 1
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Display name for the file (≤ 255). Defaults to the artwork name."
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/v1/artwork/{uuid}/derivative": {
            "post": {
                "tags": [
                    "Artwork"
                ],
                "summary": "Ingest a finished derivative (staff)",
                "description": "Staff only. Staff keys. Adds an already-finished derivative to a master **without running the generator**. `:uuid` is the MASTER (its uuid, any version of the lineage, or its numeric artwork id); the body carries the completed art file and the variable values that file represents.\n\nUse it when a derivative cannot come from the template: it was drawn and sold before the master existed, or the generated output had to be hand-corrected to look right. The result is a true derivative — it lists under the master, inherits its `type`, `formula`, artboard size and colour count, gets the master's press rotations, print colours and tags cloned onto it, and carries one variable row per value you send — so nothing downstream can tell it from a generated one.\n\n`variables` is a JSON object of variable name to the value the file shows, e.g. `{\"City\":\"Dayton\",\"State\":\"OH\"}`. Send the values as they appear in the art. If you are sending a raw data row instead and want the master's mutator waterfall applied first, add `apply_mutators=1` and the mutated result is what gets stored. `name` defaults to the master name with the variable values appended (City first, State abbreviated), matching generated derivatives.\n\n`status` defaults to 3 (Preflight Approved), since the file is finished art; no preflight is run and no preflight webhook fires. Attach the print-ready production PDF afterwards with `POST /v1/artwork/:uuid/production` using the uuid THIS call returns. Send as `multipart/form-data`. Required account permission: _AdminConsole_Artwork_Edit.",
                "operationId": "postArtworkDerivative",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Ingest a finished derivative (staff)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Artwork"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation failed, `variables` missing or malformed, the target is not a master, or the PDF could not be rendered.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Key is not owned by a staff account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Master artwork not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "The finished derivative art file (≤ 50 MB). Only `.pdf` is accepted."
                                    },
                                    "variables": {
                                        "type": "string",
                                        "description": "JSON object of variable name to the value the file represents, e.g. `{\"City\":\"Dayton\",\"State\":\"OH\"}`. Stored as the derivative's resolved values."
                                    },
                                    "apply_mutators": {
                                        "type": "boolean",
                                        "description": "When true, run the master's mutator rules over `variables` first and store the result. Use when sending a raw data row rather than resolved values.",
                                        "default": false
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Derivative name (≤ 255). Defaults to the master name with the variable values appended."
                                    },
                                    "status": {
                                        "type": "integer",
                                        "description": "Status to create the derivative in. Defaults to 3 (Preflight Approved) because the supplied file is finished art.",
                                        "enum": [
                                            1,
                                            2,
                                            3,
                                            4,
                                            5,
                                            6
                                        ],
                                        "default": 3
                                    }
                                },
                                "required": [
                                    "file",
                                    "variables"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/v1/artwork/{uuid}/package": {
            "post": {
                "tags": [
                    "Artwork"
                ],
                "summary": "Replace master package (staff)",
                "description": "Staff only. Staff keys. Replaces a master template's finished Illustrator package — the master PDF you hand-finished outside the system — as a NEW version of the master, **without recompiling anything**. `:uuid` is any version of the master lineage (or its numeric id). The ZIP is File → Package output: the master PDF beside `Fonts/` and `Links/` (a wrapper folder is fine). The PDF is stored byte for byte, so a custom distress mask, a re-fit envelope mesh or corrected kerning ship exactly as you drew them.\n\nWhat happens: the PDF is preflighted and refused for the same reasons as creation (several pages, RGB, no Illustrator variables, an ink the colour catalogue cannot name — `errors[0].message` lists them). A PDF edited outside Illustrator (the master downloaded, its text replaced by a tool, re-uploaded) has lost its variables: send `variables` as a JSON object of the text as drawn → variable name (`{\"MISSION BEACH\": \"City\", \"CALIFORNIA\": \"State\"}`) and the API binds those text objects as Illustrator variables before vetting, exactly as on create (see POST /v1/artwork, \"Binding text as variables\"); the refusal for a PDF without variables quotes the text it contains so the map can be written from it. Then a new artwork version is opened on the lineage (new uuid, version N+1, the old version archived and kept for history); the new version takes the package's PDF, ZIP, preview, dimensions, colour type and colour count; print colours and press rotations, variables, fonts and linked files are authored fresh from the package; mutator rules are carried from the previous version pruned to the variables that still exist (send `mutator_rules` to replace them, `[]` to clear); derivatives are re-pointed and live carts / orders / work orders relinked, as a `PATCH {document}` recompile does. Works on a lab master too — its Design Lab entry follows the new version, but the package is now what production reads until someone recompiles it with `PATCH {document}`.\n\nThe response is the new version (its `uuid` differs from the one you sent; `master.document_url` / `master.design_uuid` tell you whether a design document still exists). 409 when the artwork is not a master, or when the uuid you sent is no longer the head of its lineage (someone replaced or recompiled it first — fetch again and resend). Required account permission: _AdminConsole_Artwork_Edit.",
                "operationId": "postArtworkPackage",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Replace master package (staff)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Artwork"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Not a ZIP, no / several PDFs in it, unreadable PDF, several pages, RGB colourspace, no Illustrator variables and no `variables` map, a mapped text the PDF does not contain or a name it already binds, ink not in the colour catalogue, or bad `formula` / `mutator_rules` / `variables`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Key is not owned by a staff account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Artwork not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Not a master, or the uuid is not the current head of its lineage.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "The Illustrator Package `.zip` (≤ 200 MB): exactly one master PDF outside `Fonts/` / `Links/`."
                                    },
                                    "formula": {
                                        "type": "string",
                                        "description": "Ink formula for the new version. Defaults to the master's current formula.",
                                        "enum": [
                                            "Formula-1",
                                            "Formula-2",
                                            "Formula-4",
                                            "Formula-5"
                                        ]
                                    },
                                    "variables": {
                                        "type": "string",
                                        "description": "JSON object of text as drawn → variable name, e.g. `{\"MISSION BEACH\": \"City\", \"CALIFORNIA\": \"State\"}`. Binds those text objects as Illustrator variables in the PDF before it is vetted (default value = the text). Omit when the PDF already carries its variables. Names ≤ 64 characters, no braces / whitespace, each used once."
                                    },
                                    "mutator_rules": {
                                        "type": "string",
                                        "description": "JSON array `[{\"mutator\": \"<name>\", \"variable_in\": \"<key>\", \"param\": {…}}]` validated against the variables detected in the new PDF (same rules as create). Omit to carry the current rules, minus any whose `variable_in` no longer exists; `[]` clears them."
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/v1/artwork/{uuid}": {
            "patch": {
                "tags": [
                    "Artwork"
                ],
                "summary": "Update artwork",
                "description": "Renames the artwork and/or replaces its description. Both fields optional; omitted fields are unchanged.\n\n**Master templates (staff keys).** On an `is_master` artwork with a design document, staff keys may also send `document` (the edited schema-v1 document — recompiled exactly as creation does into a NEW artwork version: new uuid, derivatives re-pointed, live orders relinked; the response is the new version), `variables` (replaces the variable set — with `document` it names the new document's layers, without it the current document's; variables for dropped layers and the mutator rules bound to them are removed), `mutator_rules` (replaces the whole ordered waterfall), `scope` (+ `customer` for `customer` scope; moves the master between the house stock account and the customer) and `categories` (replaces the gallery category set). Validation is the same as on create. `name` renames the Design Lab idea too. A package master (uploaded Illustrator package, no document) takes `name` / `description` / `status` here but 409s on the document fields — replace its PDF with `POST /v1/artwork/:uuid/package` instead. Required account permission: _Account_Artwork_Edit or _AdminConsole_Artwork_Edit.",
                "operationId": "patchArtworkByUuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Update artwork",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Artwork"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation / compile failed — see `errors[]`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Customer key sent a staff-only field (`status`, `document`, …).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Artwork not found on this account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Artwork name already taken; master field sent for a non-master or a master without a design document; the artwork is no longer the head of its lineage (reload).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "New unique name (≤ 255).",
                                        "example": "Team Logo — 2026 season"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "New description (≤ 65535).",
                                        "example": "Front chest, 2-colour spot"
                                    },
                                    "status": {
                                        "type": "integer",
                                        "description": "Staff keys only. Manual status change with the SAME downstream effects as Admin → Artwork → Change Status: 2 (Pending Preflight) places the hold and creates the preflight contract / service request; 3 (Preflight Approved) releases the hold, emails the owner \"preflight approved\" and pushes every Pending Artwork order carrying this artwork into production; 4 records the failure; 1 / 5 / 6 are set with their hold bookkeeping. Each change writes a status event attributed to the key user, mirrored onto open orders, and emits the preflight / approval webhooks. A staff key without `customer` may address artwork on any account.",
                                        "enum": [
                                            1,
                                            2,
                                            3,
                                            4,
                                            5,
                                            6
                                        ]
                                    },
                                    "document": {
                                        "type": "object",
                                        "description": "Staff keys only, masters only. Replacement schema-v1 design document (object, or JSON string). Recompiles into a new artwork version."
                                    },
                                    "variables": {
                                        "type": "array",
                                        "items": {
                                            "type": "object",
                                            "properties": [
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "string"
                                                }
                                            ]
                                        },
                                        "description": "Staff keys only, masters only. Replacement `[{layer_id, key}]` set (same rules as create)."
                                    },
                                    "mutator_rules": {
                                        "type": "array",
                                        "items": {
                                            "type": "object",
                                            "properties": [
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "object"
                                                }
                                            ]
                                        },
                                        "description": "Staff keys only, masters only. Replacement ordered rule list (same rules as create). `[]` clears all rules."
                                    },
                                    "scope": {
                                        "type": "string",
                                        "description": "Staff keys only, masters only. New gallery scope; `customer` takes the account from `customer` (or keeps the current owner when the master is already customer-owned).",
                                        "enum": [
                                            "global",
                                            "customer"
                                        ]
                                    },
                                    "categories": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "description": "Staff keys only, masters only. Replacement gallery category names (created when new). `[]` clears."
                                    },
                                    "customer": {
                                        "type": "string",
                                        "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                                        "example": "customer@example.com"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Artwork"
                ],
                "summary": "Delete master (staff)",
                "description": "Staff only. Staff keys. Permanently deletes a master template that has never been ordered or printed, along with its derivatives when THEY have never been ordered or printed. Every version row of the master and of each current derivative is checked: on an order line, in print production (print images), in an open preflight / art-service request, in retain inventory, or on an ordered sheet → 409 listing every blocker, and nothing is deleted. Otherwise all lineage rows are hard-deleted in one transaction (print rotations, variables, mutator rules, print-file rows, pivots), the master Design row leaves the idea gallery (customer designs forked from it survive, unlinked), and an audit event is written. Stored files are not removed. Ordinary (non-master) artwork cannot be deleted — archive it. Required account permission: _AdminConsole_Artwork_Edit.",
                "operationId": "deleteArtworkByUuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`{deleted: 1, uuid, versions_deleted, derivatives_deleted, design_uuid}`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Key is not owned by a staff account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Artwork not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Not a master, or the master / a derivative is ordered, printed, in review, in retain inventory or on an ordered sheet — `errors[0].message` lists the blockers.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "tags": [
                    "Artwork"
                ],
                "summary": "Retrieve artwork",
                "description": " Required account permission: _Account_Artwork_List or _AdminConsole_Artwork_List.",
                "operationId": "getArtworkByUuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "customer",
                        "in": "query",
                        "required": false,
                        "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                        "schema": {
                            "type": "string",
                            "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                            "example": "customer@example.com"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Retrieve artwork",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Artwork"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Artwork not found on this account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/artwork": {
            "post": {
                "tags": [
                    "Artwork"
                ],
                "summary": "Upload artwork",
                "description": "Creates a new artwork from an uploaded print file, exactly as the website's Art Library → Add Artwork flow does. The artwork is returned with `status` 5 (Preflight Required) and is not preflighted until it is ordered — `POST /v1/orders` submits it and the order waits in status 10 (Pending Artwork) until preflight passes. Pass `preflight=1` to queue preflight immediately instead (the \"Queue for early preflight\" option on the website). Preflight completes asynchronously — subscribe to `artwork.preflight_passed` / `artwork.preflight_failed` or poll `GET /v1/artwork/:uuid`. For `Spot` artwork every PMS colour used in the file must be supplied via `spot_color[]` (name or Pantone code). Staff keys may additionally send `customer` to create the artwork on that customer's account (as Admin → Artwork → Create does) and `status` to create it in any status: 2 (Pending Preflight) submits it to preflight at once, creating the preflight contract and service request exactly as an order would; 1 / 3 / 4 / 6 are written directly with an audit event and without a preflight run — use 3 when importing artwork approved elsewhere, then attach its print-ready file with the staff production-file resource. Customer keys sending either field receive 403. `artwork.created` is emitted to the owning account's webhooks in every case. Send as `multipart/form-data`.\n\n**Master templates (staff keys).** Send `master=1` with `document` — a schema-v1 Design Lab document (the same JSON the design compiler's `--compile` takes: `{schema_version:1, design:{artboard:{width_in,height_in}, layers:[…], colors:[{ref,pms,c,m,y,k}], fonts:[{ref,font}], distress?}}`) — instead of `file` / `type` / `width` / `height`. The document is compiled through the design compiler exactly as Admin → Designs → Convert to Master does and becomes a fully usable master: an `is_master` artwork (Spot, Preflight Approved, print colours + press rotations from the compiled separations, hidden backer plates when inks touch, a Package archive), a master Design row in the Design Lab idea gallery under `scope` / `categories`, one variable per text layer named in `variables` (what derivatives substitute), and the `mutator_rules` waterfall. Every `fonts[].font` must name an installed face (`<Family>-<Style>`, exactly as the font library lists it); unknown faces are listed in the 400. `name` is required (≤ 128); `formula` optional (default Formula-1). Omit `type` / `width` / `height` / `file` / `spot_color`. The `master` block in the response carries `design_uuid`, variables and rules. Edit later with `PATCH` (document recompiles into a new version), read the stored document with `GET /v1/artwork/:uuid/document`, enumerate mutators with `GET /v1/artwork/mutators`, delete with `DELETE /v1/artwork/:uuid`.\n\n**Package masters (staff keys).** Send `master=1` with `file` = an Illustrator Package ZIP (File → Package: the master PDF beside its `Fonts/` and `Links/` folders, wrapper folder allowed) and NO `document` — the API twin of Admin → Artwork → Create Master Template → Upload Master Package. The PDF is stored **byte for byte** (nothing is recompiled, no backer is grafted, any distress mask is whatever the file carries): preflight vets it (exactly one page, CMYK/Spot inks only, at least one Illustrator variable bound to text), the separations become the print colours and press rotations (CMYK + an `HA Underbase` spot = CMYK; CMYK alone = CMYK 4 Lights; otherwise Spot — every ink must name a catalogue colour or the upload is 400 listing the misses), the Illustrator variables become the variable set (`{trait, default}` per field), `mutator_rules` are validated against those names, fonts under `Fonts/` are ingested and `Links/` recorded. The result is a master with no design document, so `GET …/document` and `PATCH {document}` are 409 for it; replace its package with `POST /v1/artwork/:uuid/package`.\n\n**Binding text as variables (package masters).** A PDF that was edited outside Illustrator — a downloaded master whose text a tool replaced, a file exported by another application — usually carries NO Illustrator variables, and the upload is refused for that reason (the message lists the text the PDF does contain). Send `variables` as a JSON object of **the text exactly as it appears in the art → the variable name**, e.g. `{\"MISSION BEACH\": \"City\", \"CALIFORNIA\": \"State\"}`, and the API binds those text objects as Illustrator variables in the PDF before anything else runs — the same step the Design Lab's Convert to Master table performs when it asks which detected text is which variable. Each text is matched whole (trimmed, case-sensitive); every object showing it is bound; the variable's default value is the text itself. A text the PDF does not contain is a 400 that quotes the text it does; a name the PDF already binds as a variable is a 400 (drop or rename it). A PDF that already carries its variables needs no map, and may take one for additional text. This is the one case where the stored PDF differs from the upload — by the variable library and bindings only. Required account permission: _Account_Artwork_Create or _AdminConsole_Artwork_Edit.",
                "operationId": "postArtwork",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Upload artwork",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Artwork"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation failed — see `errors[]` (lab masters: malformed document, unknown font faces, bad variables / mutator rules, compile failure; package masters: not a ZIP, no / several PDFs, unreadable PDF, multi-page, RGB, no variables and no `variables` map, a mapped text the PDF does not contain or a name it already binds, ink not in the colour catalogue).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Customer key sent a staff-only field (`customer`, `status`, `master`, …).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "`customer` does not name a customer account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Artwork name already taken on the owning account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "The print file (≤ 50 MB). Vector PDF/AI/EPS preferred. With `master=1`: an Illustrator Package `.zip` (≤ 200 MB) creates a package master; omit it and send `document` for a lab master."
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Unique name for this artwork on the owning account (≤ 255; ≤ 128 for a master)."
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "Colour process. Not used when `master=1` (masters are always Spot, from the compiled separations).",
                                        "enum": [
                                            "CMYK",
                                            "CMYK4Lights",
                                            "Spot"
                                        ]
                                    },
                                    "formula": {
                                        "type": "string",
                                        "description": "Ink formula. Optional for `master=1` (default Formula-1).",
                                        "enum": [
                                            "Formula-1",
                                            "Formula-2",
                                            "Formula-4",
                                            "Formula-5"
                                        ]
                                    },
                                    "width": {
                                        "type": "number",
                                        "format": "double",
                                        "description": "Requested print width in inches (≤ 26.5). Not used when `master=1` (artboard from the document)."
                                    },
                                    "height": {
                                        "type": "number",
                                        "format": "double",
                                        "description": "Requested print height in inches (≤ 19.25, or 19.5 when alternate size C is enabled on the owning account). Not used when `master=1`."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Optional notes (≤ 65535)."
                                    },
                                    "spot_color": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "description": "Required for `Spot`. One entry per print colour: a colour name or Pantone code, e.g. `spot_color[]=286 C`. Not used when `master=1`."
                                    },
                                    "preflight": {
                                        "type": "integer",
                                        "description": "1 to queue preflight now (status 2) rather than when first ordered. Ignored when a staff key sends `status`.",
                                        "enum": [
                                            0,
                                            1
                                        ],
                                        "default": 0
                                    },
                                    "customer": {
                                        "type": "string",
                                        "description": "Staff keys only. Customer account to create the artwork on: the account's user uuid or sign-in email (a sub-user resolves to its account root). Omit to create on the key's own account. For `master=1` this is the customer a `customer`-scoped master belongs to (and whose library artwork the document may place); omit for a `global` master."
                                    },
                                    "status": {
                                        "type": "integer",
                                        "description": "Staff keys only. Status to create the artwork in: 2 creates the preflight contract + service request; 1 / 3 / 4 / 6 are set directly; 5 is the customer-upload default. Ignored for `master=1` (masters are created Preflight Approved).",
                                        "enum": [
                                            1,
                                            2,
                                            3,
                                            4,
                                            5,
                                            6
                                        ],
                                        "default": 5
                                    },
                                    "master": {
                                        "type": "integer",
                                        "description": "Staff keys only. 1 creates a master template: from `document` (lab master) or from a package `.zip` in `file` (package master) — one or the other, never both.",
                                        "enum": [
                                            0,
                                            1
                                        ],
                                        "default": 0
                                    },
                                    "document": {
                                        "type": "string",
                                        "description": "Staff keys only, with `master=1` and no `file`. The schema-v1 design document as a JSON string (≤ 128 MB). At least one layer; `artboard.width_in` / `height_in` in inches; every `fonts[].font` an installed face; an optional `distress.uuid` must exist."
                                    },
                                    "variables": {
                                        "type": "string",
                                        "description": "Staff keys only, with `master=1` + `document`. JSON array `[{\"layer_id\": \"<text layer id>\", \"key\": \"<VariableName>\"}]` — the text layers derivatives substitute. Each `layer_id` must be a non-blank text layer of the document and may appear once; each `key` (≤ 64) may bind one layer. Layers not listed stay static text. With `master=1` + `file` (package master): a JSON OBJECT of text → variable name, e.g. `{\"MISSION BEACH\": \"City\", \"CALIFORNIA\": \"State\"}`, binding the PDF's text objects showing that text as Illustrator variables (see \"Binding text as variables\"). Optional when the PDF already carries its variables."
                                    },
                                    "design_lab_optout": {
                                        "type": "integer",
                                        "description": "Staff keys only, package masters only. 1 keeps the master out of the Design Lab conversion sweep (the \"Design Lab opt-out\" box on the admin form).",
                                        "enum": [
                                            0,
                                            1
                                        ],
                                        "default": 0
                                    },
                                    "mutator_rules": {
                                        "type": "string",
                                        "description": "Staff keys only, with `master=1`. JSON array `[{\"mutator\": \"<name>\", \"variable_in\": \"<key>\", \"param\": {…}}]`, applied in order to every derivative data row. `mutator` must be a registered name (`GET /v1/artwork/mutators`); `param` is validated against that mutator's params (omitted keys take defaults); `variable_in` must be a declared variable or a field an earlier rule produced (`CreateField` creates its `variable_in`)."
                                    },
                                    "scope": {
                                        "type": "string",
                                        "description": "Staff keys only, with `master=1`. Gallery scope. Default `customer` when `customer` is sent, else `global`. `customer` requires `customer`.",
                                        "enum": [
                                            "global",
                                            "customer"
                                        ]
                                    },
                                    "categories": {
                                        "type": "string",
                                        "description": "Staff keys only, with `master=1`. JSON array of gallery category names (created when new), or a comma-separated list."
                                    }
                                },
                                "required": [
                                    "file",
                                    "name",
                                    "type",
                                    "formula",
                                    "width",
                                    "height"
                                ]
                            }
                        }
                    }
                }
            },
            "get": {
                "tags": [
                    "Artwork"
                ],
                "summary": "List artwork",
                "description": "Returns the latest version of every artwork on the account, newest first by default. Archived artwork is excluded unless `archived=1`. Use `query` to search name, TIN, description and formula. Required account permission: _Account_Artwork_List or _AdminConsole_Artwork_List.",
                "operationId": "getArtwork",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "1-based page number.",
                        "schema": {
                            "type": "integer",
                            "description": "1-based page number.",
                            "default": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Rows per page, 1–100.",
                        "schema": {
                            "type": "integer",
                            "description": "Rows per page, 1–100.",
                            "default": 24
                        }
                    },
                    {
                        "name": "query",
                        "in": "query",
                        "required": false,
                        "description": "Free-text search across name, TIN, description and formula.",
                        "schema": {
                            "type": "string",
                            "description": "Free-text search across name, TIN, description and formula."
                        }
                    },
                    {
                        "name": "archived",
                        "in": "query",
                        "required": false,
                        "description": "When true, list archived artwork instead of active artwork.",
                        "schema": {
                            "type": "boolean",
                            "description": "When true, list archived artwork instead of active artwork.",
                            "default": false
                        }
                    },
                    {
                        "name": "master",
                        "in": "query",
                        "required": false,
                        "description": "When true, list master templates only. For a staff key without `customer` this lists masters on EVERY account (global masters belong to the house stock account, not the key's).",
                        "schema": {
                            "type": "boolean",
                            "description": "When true, list master templates only. For a staff key without `customer` this lists masters on EVERY account (global masters belong to the house stock account, not the key's).",
                            "default": false
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "required": false,
                        "description": "",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "updated_at",
                                "created_at",
                                "name",
                                "tin"
                            ],
                            "default": "updated_at"
                        }
                    },
                    {
                        "name": "order",
                        "in": "query",
                        "required": false,
                        "description": "",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "asc",
                                "desc"
                            ],
                            "default": "desc"
                        }
                    },
                    {
                        "name": "customer",
                        "in": "query",
                        "required": false,
                        "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                        "schema": {
                            "type": "string",
                            "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                            "example": "customer@example.com"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List artwork",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Artwork"
                                            }
                                        },
                                        "page": {
                                            "type": "integer"
                                        },
                                        "pages": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        },
                                        "errors": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/bundles/sheets": {
            "get": {
                "tags": [
                    "Bundles"
                ],
                "summary": "List sheet sizes",
                "description": "The sheet sizes a bundle can be built on. Each entry gives the physical sheet, the smaller printable area designs are placed within, and `required_gap` — the space the cutter needs between adjacent pieces, which the server already accounts for when it arranges a sheet. Call this before creating a bundle rather than hardcoding sizes. Required account permission: _Account_Artwork_List or _AdminConsole_Artwork_List.",
                "operationId": "getBundlesSheets",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "customer",
                        "in": "query",
                        "required": false,
                        "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                        "schema": {
                            "type": "string",
                            "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                            "example": "customer@example.com"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`{sheet, physical:{width,height}, printable:{width,height}, required_gap}[]`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/bundles/{uuid}": {
            "patch": {
                "tags": [
                    "Bundles"
                ],
                "summary": "Update a bundle",
                "description": "Changes a sheet's designs, size or name. Sending `designs` REPLACES the sheet's contents and re-arranges them — it is not a merge; omit it to keep them. As with create, check `overflow`, or send `placements` on every design to impose the sheet yourself. A sheet that is already on an order cannot be changed. Required account permission: _Account_Cart_Create or _AdminConsole_Artwork_Edit.",
                "operationId": "patchBundlesByUuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Update a bundle",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Bundle"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Same validation as create.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "`scope` or `customer` sent by a customer key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Bundle not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "The sheet is on an order, or has been deleted.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "designs": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "description": "The artwork to place: `[{\"artwork\": \"<uuid>\", \"number_up\": 4}]`. A bare uuid string is accepted and means `number_up: 1`. Every design must be in the owning account's library, and all designs on a sheet must share a compatible formula. Required on create; on update it REPLACES the sheet's contents. **To impose the sheet yourself**, give each design a `placements` list with one entry per copy — `{\"artwork\": \"<uuid>\", \"placements\": [{\"x\": 0, \"y\": 0}, {\"x\": 6.5, \"y\": 0, \"rotated\": true}]}` — `x`/`y` in inches from the printable-area top-left to the piece's top-left corner, `rotated` for a 90° turn; `number_up` then defaults to the list length. Supply placements for every design or for none. The piece size is taken from the artwork, not from you. The finished sheet must pass the same rules the Sheet Run Builder enforces: every piece inside the printable area, at least `required_gap` (see `GET /v1/bundles/sheets`) between pieces, and the whole sheet cuttable with straight edge-to-edge guillotine cuts — otherwise the request is rejected with every violation listed."
                                    },
                                    "sheet": {
                                        "type": "string",
                                        "description": "Sheet size key — see `GET /v1/bundles/sheets`.",
                                        "default": "28x20"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Sheet name.",
                                        "default": "Untitled Bundle"
                                    },
                                    "layout": {
                                        "type": "object",
                                        "description": "A raw layout blob in the stored sheet format, instead of letting the server arrange the designs. Prefer `designs[].placements` — it needs only coordinates. Whatever you send is checked against the sheet run rules (inside the printable area, required gap, guillotine-cuttable, placements matching `designs`) and rejected with 400 listing every violation."
                                    },
                                    "scope": {
                                        "type": "string",
                                        "description": "Staff only. `global` builds the sheet on the house stock account, where global master artwork lives.",
                                        "enum": [
                                            "global",
                                            "customer"
                                        ]
                                    },
                                    "customer": {
                                        "type": "string",
                                        "description": "Staff only. Build on this customer account — uuid or sign-in email."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Bundles"
                ],
                "summary": "Delete a bundle",
                "description": "Deletes a sheet and retires the hidden kit product behind it. Refused when the sheet is on an order, or while a design on it is still in preflight or art-service review — the reason comes back in `errors[]`. Required account permission: _Account_Cart_Create or _AdminConsole_Artwork_Edit.",
                "operationId": "deleteBundlesByUuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "customer",
                        "in": "query",
                        "required": false,
                        "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                        "schema": {
                            "type": "string",
                            "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                            "example": "customer@example.com"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`{deleted: 1, uuid}`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Bundle not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "On an order, mid-preflight, or already deleted.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "tags": [
                    "Bundles"
                ],
                "summary": "Retrieve a bundle",
                "description": "One sheet with its designs, arrangement and status. Required account permission: _Account_Artwork_List or _AdminConsole_Artwork_List.",
                "operationId": "getBundlesByUuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "customer",
                        "in": "query",
                        "required": false,
                        "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                        "schema": {
                            "type": "string",
                            "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                            "example": "customer@example.com"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Retrieve a bundle",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Bundle"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Bundle not found (or not on this account).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/bundles": {
            "post": {
                "tags": [
                    "Bundles"
                ],
                "summary": "Create a bundle",
                "description": "Creates a sheet from a set of designs and arranges them on it. By default the server places the designs largest-first, rotating where it helps and leaving the cutter's gap, and the result is always guillotine-cuttable. **Check `overflow` on the response** — designs that did not fit are listed there and are NOT on the sheet; the call still succeeds with everything that did fit. Alternatively, pre-calculate the imposition yourself by sending `placements` on every design: the pieces go exactly where you put them, nothing overflows, and the sheet is rejected (400, every violation listed) if it breaks a sheet run rule. Saving also builds the hidden kit product that makes the sheet orderable and priceable. Required account permission: _Account_Cart_Create or _AdminConsole_Artwork_Edit.",
                "operationId": "postBundles",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Create a bundle",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Bundle"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "No designs, an unknown sheet size, a design that is not in the account's library, mixed formulas, a design with no recorded artboard size, `placements` on some designs but not all, a malformed placement, or a sheet that breaks the sheet run rules (piece outside the printable area, pieces closer than the required gap, not guillotine-cuttable, placements not matching the designs).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "`scope` or `customer` sent by a customer key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "designs": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "description": "The artwork to place: `[{\"artwork\": \"<uuid>\", \"number_up\": 4}]`. A bare uuid string is accepted and means `number_up: 1`. Every design must be in the owning account's library, and all designs on a sheet must share a compatible formula. Required on create; on update it REPLACES the sheet's contents. **To impose the sheet yourself**, give each design a `placements` list with one entry per copy — `{\"artwork\": \"<uuid>\", \"placements\": [{\"x\": 0, \"y\": 0}, {\"x\": 6.5, \"y\": 0, \"rotated\": true}]}` — `x`/`y` in inches from the printable-area top-left to the piece's top-left corner, `rotated` for a 90° turn; `number_up` then defaults to the list length. Supply placements for every design or for none. The piece size is taken from the artwork, not from you. The finished sheet must pass the same rules the Sheet Run Builder enforces: every piece inside the printable area, at least `required_gap` (see `GET /v1/bundles/sheets`) between pieces, and the whole sheet cuttable with straight edge-to-edge guillotine cuts — otherwise the request is rejected with every violation listed."
                                    },
                                    "sheet": {
                                        "type": "string",
                                        "description": "Sheet size key — see `GET /v1/bundles/sheets`.",
                                        "default": "28x20"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Sheet name.",
                                        "default": "Untitled Bundle"
                                    },
                                    "layout": {
                                        "type": "object",
                                        "description": "A raw layout blob in the stored sheet format, instead of letting the server arrange the designs. Prefer `designs[].placements` — it needs only coordinates. Whatever you send is checked against the sheet run rules (inside the printable area, required gap, guillotine-cuttable, placements matching `designs`) and rejected with 400 listing every violation."
                                    },
                                    "scope": {
                                        "type": "string",
                                        "description": "Staff only. `global` builds the sheet on the house stock account, where global master artwork lives.",
                                        "enum": [
                                            "global",
                                            "customer"
                                        ]
                                    },
                                    "customer": {
                                        "type": "string",
                                        "description": "Staff only. Build on this customer account — uuid or sign-in email."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "tags": [
                    "Bundles"
                ],
                "summary": "List bundles",
                "description": "Sheets on the account, newest first. Deleted sheets are hidden unless you ask for them with `status=deleted`. Required account permission: _Account_Artwork_List or _AdminConsole_Artwork_List.",
                "operationId": "getBundles",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "",
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Max 100.",
                        "schema": {
                            "type": "integer",
                            "description": "Max 100.",
                            "default": 24
                        }
                    },
                    {
                        "name": "query",
                        "in": "query",
                        "required": false,
                        "description": "Matches the sheet name.",
                        "schema": {
                            "type": "string",
                            "description": "Matches the sheet name."
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Only sheets in this state.",
                        "schema": {
                            "type": "string",
                            "description": "Only sheets in this state.",
                            "enum": [
                                "draft",
                                "saved",
                                "ordered",
                                "deleted"
                            ]
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "required": false,
                        "description": "",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "updated_at",
                                "created_at",
                                "name"
                            ],
                            "default": "updated_at"
                        }
                    },
                    {
                        "name": "order",
                        "in": "query",
                        "required": false,
                        "description": "",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "asc",
                                "desc"
                            ],
                            "default": "desc"
                        }
                    },
                    {
                        "name": "scope",
                        "in": "query",
                        "required": false,
                        "description": "Staff only. `global` lists the house stock account's sheets.",
                        "schema": {
                            "type": "string",
                            "description": "Staff only. `global` lists the house stock account's sheets.",
                            "enum": [
                                "global",
                                "customer"
                            ]
                        }
                    },
                    {
                        "name": "customer",
                        "in": "query",
                        "required": false,
                        "description": "Staff only. List this customer's sheets (uuid or email).",
                        "schema": {
                            "type": "string",
                            "description": "Staff only. List this customer's sheets (uuid or email)."
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List bundles",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Bundle"
                                            }
                                        },
                                        "page": {
                                            "type": "integer"
                                        },
                                        "pages": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        },
                                        "errors": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/colors/pantone": {
            "get": {
                "tags": [
                    "Colors"
                ],
                "summary": "List Pantone inks",
                "description": "The ink catalogue — every ink the platform can print, with hex/RGB/CMYK values. An ink is listed when it carries a Pantone code or a name; `pms` holds whichever it has (code first, name as the fallback), so it is always populated and is the key to match on. Sorted by that same label.\n\n**Cheap refresh** — the response's `revision` is a fingerprint of the full catalogue and is also sent as an `ETag` header. Send it back as `If-None-Match` on your next pull: an unchanged catalogue returns `304 Not Modified` with no body. Alternatively pass `?updated_since=<ISO 8601>` to receive only rows changed after that moment; `revision` and `count` always describe the full set, so a mismatch against your mirror tells you to do a full pull (e.g. after a deletion). Required account permission: None (any valid API key).",
                "operationId": "getColorsPantone",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "updated_since",
                        "in": "query",
                        "required": false,
                        "description": "ISO 8601 timestamp; only inks updated strictly after this moment are returned.",
                        "schema": {
                            "type": "string",
                            "description": "ISO 8601 timestamp; only inks updated strictly after this moment are returned.",
                            "example": "2026-09-08T00:00:00Z"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Object `{revision, updated_at, count, colors: [pantone_color]}` — `revision` (fingerprint) and `count` cover the full catalogue regardless of `updated_since`; `updated_at` is the newest row stamp in the full catalogue.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Unparseable `updated_since` value.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/customers/{uuid}": {
            "patch": {
                "tags": [
                    "Customers"
                ],
                "summary": "Update a customer account",
                "description": "Staff only. Partial update of the account fields and / or the default contact, as Admin → Customers → Edit. Omitted fields are unchanged; `contact` merges field by field. Records a `customer.updated` event attributed to the key user. Status may move between Active, Inactive and Lead; delinquency is managed by billing, not here. Required account permission: _AdminConsole_Customer_Edit.",
                "operationId": "patchCustomersByUuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Update a customer account",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Customer"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Malformed field or empty required value.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Key is not a staff key or lacks `_AdminConsole_Customer_Edit`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No customer account matches.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "Email belongs to another user.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "description": "New sign-in email; must not belong to another user."
                                    },
                                    "organization": {
                                        "type": "string"
                                    },
                                    "contact": {
                                        "allOf": [
                                            {
                                                "$ref": "#/components/schemas/Contact"
                                            }
                                        ],
                                        "description": "Any subset of the contact fields."
                                    },
                                    "status": {
                                        "type": "integer",
                                        "enum": [
                                            1,
                                            3,
                                            5
                                        ]
                                    },
                                    "website": {
                                        "type": "string",
                                        "nullable": true
                                    },
                                    "tax_exempt": {
                                        "type": "boolean"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "tags": [
                    "Customers"
                ],
                "summary": "Retrieve a customer account",
                "description": "Staff only. Full account record including staff notes and every sign-in (root + sub-users). The uuid may be the root's or any sub-user's — a sub-user resolves to its account. A sign-in email is accepted in place of the uuid. Required account permission: _AdminConsole_Customer_List.",
                "operationId": "getCustomersByUuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Retrieve a customer account",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Customer"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Key is not a staff key or lacks `_AdminConsole_Customer_List`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No customer account matches.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/customers": {
            "post": {
                "tags": [
                    "Customers"
                ],
                "summary": "Create a customer account",
                "description": "Staff only. Creates a root customer account with its default contact, exactly as Admin → Customers → Create does: the account gets the customer role, a `customer.created` event attributed to the key user, and no password (send `send_email: true` to email a set-password link when the account is Active). An existing Lead placeholder with the same email is upgraded in place; any other existing email is 409. Supports Lead accounts (`status: 5`) for prospects captured from a conversation. Required account permission: _AdminConsole_Customer_Create.",
                "operationId": "postCustomers",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Create a customer account",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Customer"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Missing / malformed fields.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Key is not a staff key or lacks `_AdminConsole_Customer_Create`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "A non-lead user already exists with that email.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "description": "Sign-in email; unique across all users."
                                    },
                                    "organization": {
                                        "type": "string"
                                    },
                                    "contact": {
                                        "allOf": [
                                            {
                                                "$ref": "#/components/schemas/Contact"
                                            }
                                        ],
                                        "description": "`name` is required; address / phone fields optional. `email_address` defaults to the sign-in email."
                                    },
                                    "status": {
                                        "type": "integer",
                                        "description": "1 Active, 3 Inactive, 5 Lead.",
                                        "enum": [
                                            1,
                                            3,
                                            5
                                        ],
                                        "default": 1
                                    },
                                    "website": {
                                        "type": "string"
                                    },
                                    "tax_exempt": {
                                        "type": "boolean",
                                        "default": false
                                    },
                                    "notes": {
                                        "type": "string"
                                    },
                                    "send_email": {
                                        "type": "boolean",
                                        "description": "Email the customer a set-password link (Active accounts only).",
                                        "default": false
                                    }
                                },
                                "required": [
                                    "email",
                                    "organization",
                                    "contact"
                                ]
                            }
                        }
                    }
                }
            },
            "get": {
                "tags": [
                    "Customers"
                ],
                "summary": "Search / list customer accounts",
                "description": "Staff only. Root customer accounts (sub-users are folded into their account), newest-updated first. `query` is the lookup an agent needs to resolve a name heard in conversation to an account: it matches the organization, the sign-in email, any sub-user email, and the default contact's name, email, phone and mobile (digits-only phone matching). Pass the returned `uuid` as `customer` on the Orders / Invoices / Artwork / Shipments resources to act for that account. Required account permission: _AdminConsole_Customer_List.",
                "operationId": "getCustomers",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "",
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Max 100.",
                        "schema": {
                            "type": "integer",
                            "description": "Max 100.",
                            "default": 24
                        }
                    },
                    {
                        "name": "query",
                        "in": "query",
                        "required": false,
                        "description": "Organization, email, contact name or phone number fragment.",
                        "schema": {
                            "type": "string",
                            "description": "Organization, email, contact name or phone number fragment."
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Comma-separated status codes (e.g. `1,2`).",
                        "schema": {
                            "type": "string",
                            "description": "Comma-separated status codes (e.g. `1,2`)."
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "required": false,
                        "description": "",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "created_at",
                                "updated_at",
                                "organization",
                                "email",
                                "status"
                            ],
                            "default": "updated_at"
                        }
                    },
                    {
                        "name": "order",
                        "in": "query",
                        "required": false,
                        "description": "",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "asc",
                                "desc"
                            ],
                            "default": "desc"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Search / list customer accounts",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Customer"
                                            }
                                        },
                                        "page": {
                                            "type": "integer"
                                        },
                                        "pages": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        },
                                        "errors": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Key is not a staff key or lacks `_AdminConsole_Customer_List`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/die-cut-nesting/requests/{uuid}/unarchive": {
            "post": {
                "tags": [
                    "Die-Cut Nesting Requests"
                ],
                "summary": "Unarchive a nesting request",
                "description": " Required account permission: _Account_DieCutNesting_Edit.",
                "operationId": "postDieCutNestingRequestsUnarchive",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/die-cut-nesting/requests/{uuid}/archive": {
            "post": {
                "tags": [
                    "Die-Cut Nesting Requests"
                ],
                "summary": "Archive a nesting request",
                "description": " Required account permission: _Account_DieCutNesting_Edit.",
                "operationId": "postDieCutNestingRequestsArchive",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/die-cut-nesting/requests/{uuid}/download": {
            "get": {
                "tags": [
                    "Die-Cut Nesting Requests"
                ],
                "summary": "Download the nested output",
                "description": " Required account permission: _Account_DieCutNesting_Download.",
                "operationId": "getDieCutNestingRequestsDownload",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Binary file body.",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/die-cut-nesting/requests/{uuid}/files/{fuuid}/download": {
            "get": {
                "tags": [
                    "Die-Cut Nesting Requests"
                ],
                "summary": "Download an input file",
                "description": " Required account permission: _Account_DieCutNesting_Download.",
                "operationId": "getDieCutNestingRequestsFilesDownload",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "fuuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Binary file body.",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/die-cut-nesting/requests/{uuid}/files/{fuuid}": {
            "get": {
                "tags": [
                    "Die-Cut Nesting Requests"
                ],
                "summary": "Retrieve an input file",
                "description": " Required account permission: _Account_DieCutNesting_List.",
                "operationId": "getDieCutNestingRequestsFilesByFuuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "fuuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/die-cut-nesting/requests/{uuid}/files": {
            "get": {
                "tags": [
                    "Die-Cut Nesting Requests"
                ],
                "summary": "List input files",
                "description": " Required account permission: _Account_DieCutNesting_List.",
                "operationId": "getDieCutNestingRequestsFiles",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/die-cut-nesting/requests/{uuid}": {
            "get": {
                "tags": [
                    "Die-Cut Nesting Requests"
                ],
                "summary": "Retrieve a nesting request",
                "description": " Required account permission: _Account_DieCutNesting_List.",
                "operationId": "getDieCutNestingRequestsByUuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "404": {
                        "description": "Request not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/die-cut-nesting/requests": {
            "post": {
                "tags": [
                    "Die-Cut Nesting Requests"
                ],
                "summary": "Create a nesting request",
                "description": "Multipart upload of PDF artwork files plus a template uuid; imposition runs asynchronously after the response is returned. Required account permission: _Account_DieCutNesting_Create.",
                "operationId": "postDieCutNestingRequests",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "tags": [
                    "Die-Cut Nesting Requests"
                ],
                "summary": "List nesting requests",
                "description": "Paginated die-cut nesting jobs (`page`, `per_page`). Required account permission: _Account_DieCutNesting_List.",
                "operationId": "getDieCutNestingRequests",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/die-cut-nesting/templates/{uuid}/download": {
            "get": {
                "tags": [
                    "Die-Cut Nesting Templates"
                ],
                "summary": "Download the template file",
                "description": " Required account permission: _Account_DieCutNesting_Download.",
                "operationId": "getDieCutNestingTemplatesDownload",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Binary file body.",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/die-cut-nesting/templates/{uuid}/files/{fuuid}/download": {
            "get": {
                "tags": [
                    "Die-Cut Nesting Templates"
                ],
                "summary": "Download a template file",
                "description": " Required account permission: _Account_DieCutNesting_Download.",
                "operationId": "getDieCutNestingTemplatesFilesDownload",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "fuuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Binary file body.",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/die-cut-nesting/templates/{uuid}/files/{fuuid}": {
            "get": {
                "tags": [
                    "Die-Cut Nesting Templates"
                ],
                "summary": "Retrieve a template file",
                "description": " Required account permission: _Account_DieCutNesting_List.",
                "operationId": "getDieCutNestingTemplatesFilesByFuuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "fuuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Die-Cut Nesting Templates"
                ],
                "summary": "Delete a template file",
                "description": " Required account permission: _Account_DieCutNesting_Edit.",
                "operationId": "deleteDieCutNestingTemplatesFilesByFuuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "fuuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/die-cut-nesting/templates/{uuid}/files": {
            "get": {
                "tags": [
                    "Die-Cut Nesting Templates"
                ],
                "summary": "List template files",
                "description": " Required account permission: _Account_DieCutNesting_List.",
                "operationId": "getDieCutNestingTemplatesFiles",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/die-cut-nesting/templates/{uuid}": {
            "delete": {
                "tags": [
                    "Die-Cut Nesting Templates"
                ],
                "summary": "Delete a template",
                "description": " Required account permission: _Account_DieCutNesting_Delete.",
                "operationId": "deleteDieCutNestingTemplatesByUuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "404": {
                        "description": "Template not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "tags": [
                    "Die-Cut Nesting Templates"
                ],
                "summary": "Retrieve a template",
                "description": " Required account permission: _Account_DieCutNesting_List.",
                "operationId": "getDieCutNestingTemplatesByUuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "404": {
                        "description": "Template not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "tags": [
                    "Die-Cut Nesting Templates"
                ],
                "summary": "Update a template",
                "description": " Required account permission: _Account_DieCutNesting_Edit.",
                "operationId": "putDieCutNestingTemplatesByUuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "404": {
                        "description": "Template not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/die-cut-nesting/templates": {
            "post": {
                "tags": [
                    "Die-Cut Nesting Templates"
                ],
                "summary": "Create a template",
                "description": " Required account permission: _Account_DieCutNesting_Create.",
                "operationId": "postDieCutNestingTemplates",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "tags": [
                    "Die-Cut Nesting Templates"
                ],
                "summary": "List templates",
                "description": "Paginated die-cut nesting templates (block positions used by imposition). Required account permission: _Account_DieCutNesting_List.",
                "operationId": "getDieCutNestingTemplates",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/fonts": {
            "get": {
                "tags": [
                    "Fonts"
                ],
                "summary": "List designer-visible fonts",
                "description": "The curated font catalogue — every typeface selectable in the Artwork Designer, with its canonical name, print file name and woff2 URL. Sorted by `family`, then `style`.\n\nThis is the canonical machine-readable source of the visible set: the S3 `font/` prefix and cli font mirrors intentionally retain HIDDEN fonts (culled or license-flagged rows keep their files so existing artwork keeps rendering), so a bucket listing always overcounts.\n\n**Cheap refresh** — the response's `revision` is a fingerprint of the full catalogue and is also sent as an `ETag` header. Send it back as `If-None-Match` on your next pull: an unchanged catalogue returns `304 Not Modified` with no body. Alternatively pass `?updated_since=<ISO 8601>` to receive only rows changed after that moment; `revision` and `count` always describe the full set, so a mismatch against your mirror tells you to do a full pull (e.g. after a font is hidden). Required account permission: None (any valid API key).",
                "operationId": "getFonts",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "updated_since",
                        "in": "query",
                        "required": false,
                        "description": "ISO 8601 timestamp; only fonts updated strictly after this moment are returned.",
                        "schema": {
                            "type": "string",
                            "description": "ISO 8601 timestamp; only fonts updated strictly after this moment are returned.",
                            "example": "2026-09-08T00:00:00Z"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Object `{revision, updated_at, count, fonts: [font]}` — `revision` (fingerprint) and `count` cover the full catalogue regardless of `updated_since`; `updated_at` is the newest row stamp in the full catalogue.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Unparseable `updated_since` value.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/invoices/{uuid}/download": {
            "get": {
                "tags": [
                    "Invoices"
                ],
                "summary": "Download invoice PDF",
                "description": "Streams the invoice as `application/pdf` (regenerated on each request so status and payments are current). Required account permission: _Account_Invoice_View or _AdminConsole_Invoice_View.",
                "operationId": "getInvoicesDownload",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "customer",
                        "in": "query",
                        "required": false,
                        "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                        "schema": {
                            "type": "string",
                            "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                            "example": "customer@example.com"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Binary PDF body with `Content-Disposition: attachment`.",
                        "content": {
                            "application/pdf": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Invoice not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/invoices/{uuid}": {
            "get": {
                "tags": [
                    "Invoices"
                ],
                "summary": "Retrieve an invoice",
                "description": " Required account permission: _Account_Invoice_View or _AdminConsole_Invoice_View.",
                "operationId": "getInvoicesByUuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "customer",
                        "in": "query",
                        "required": false,
                        "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                        "schema": {
                            "type": "string",
                            "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                            "example": "customer@example.com"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Retrieve an invoice",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Invoice"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Invoice not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/invoices": {
            "get": {
                "tags": [
                    "Invoices"
                ],
                "summary": "List invoices",
                "description": "Invoices for the account, newest first. Line items and transactions are omitted in the listing. Required account permission: _Account_Invoice_List or _AdminConsole_Invoice_List.",
                "operationId": "getInvoices",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "",
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Max 100.",
                        "schema": {
                            "type": "integer",
                            "description": "Max 100.",
                            "default": 24
                        }
                    },
                    {
                        "name": "query",
                        "in": "query",
                        "required": false,
                        "description": "Matches invoice number (`I000123`), order number or your PO number.",
                        "schema": {
                            "type": "string",
                            "description": "Matches invoice number (`I000123`), order number or your PO number."
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Comma-separated status codes, e.g. `1,5` for anything with a balance.",
                        "schema": {
                            "type": "string",
                            "description": "Comma-separated status codes, e.g. `1,5` for anything with a balance."
                        }
                    },
                    {
                        "name": "order",
                        "in": "query",
                        "required": false,
                        "description": "Order uuid — only invoices for that order.",
                        "schema": {
                            "type": "string",
                            "description": "Order uuid — only invoices for that order."
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "required": false,
                        "description": "",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "created_at",
                                "updated_at",
                                "total_amount",
                                "full_id",
                                "status"
                            ],
                            "default": "created_at"
                        }
                    },
                    {
                        "name": "order_by",
                        "in": "query",
                        "required": false,
                        "description": "Sort direction (`order` is taken by the order-uuid filter).",
                        "schema": {
                            "type": "string",
                            "description": "Sort direction (`order` is taken by the order-uuid filter).",
                            "enum": [
                                "asc",
                                "desc"
                            ],
                            "default": "desc"
                        }
                    },
                    {
                        "name": "customer",
                        "in": "query",
                        "required": false,
                        "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                        "schema": {
                            "type": "string",
                            "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                            "example": "customer@example.com"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List invoices",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Invoice"
                                            }
                                        },
                                        "page": {
                                            "type": "integer"
                                        },
                                        "pages": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        },
                                        "errors": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/orders/{uuid}/shipments": {
            "get": {
                "tags": [
                    "Orders"
                ],
                "summary": "List shipments for an order",
                "description": "All shipments carrying the order, as `{data: [shipment…]}` (not paginated). Required account permission: _Account_Shipment_List or _AdminConsole_Shipment_List.",
                "operationId": "getOrdersShipments",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "customer",
                        "in": "query",
                        "required": false,
                        "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                        "schema": {
                            "type": "string",
                            "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                            "example": "customer@example.com"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List shipments for an order",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Shipment"
                                            }
                                        },
                                        "page": {
                                            "type": "integer"
                                        },
                                        "pages": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        },
                                        "errors": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Order not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/orders/{uuid}/invoices": {
            "get": {
                "tags": [
                    "Orders"
                ],
                "summary": "List invoices for an order",
                "description": "All invoices for the order, as `{data: [invoice…]}` (not paginated). Required account permission: _Account_Invoice_List or _AdminConsole_Invoice_List.",
                "operationId": "getOrdersInvoices",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "customer",
                        "in": "query",
                        "required": false,
                        "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                        "schema": {
                            "type": "string",
                            "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                            "example": "customer@example.com"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List invoices for an order",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Invoice"
                                            }
                                        },
                                        "page": {
                                            "type": "integer"
                                        },
                                        "pages": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        },
                                        "errors": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Order not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/orders/{uuid}": {
            "get": {
                "tags": [
                    "Orders"
                ],
                "summary": "Retrieve an order",
                "description": "Full order detail including line items with artwork and services, shipment summaries with tracking, and invoice summaries with balance due. Required account permission: _Account_Order_View or _AdminConsole_Order_View.",
                "operationId": "getOrdersByUuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "customer",
                        "in": "query",
                        "required": false,
                        "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                        "schema": {
                            "type": "string",
                            "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                            "example": "customer@example.com"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Retrieve an order",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Order"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Order not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/orders": {
            "post": {
                "tags": [
                    "Orders"
                ],
                "summary": "Create an order",
                "description": "Creates and (unless paying by terms) pays for a sales order in one call.\n\nRecommended flow: `POST /v1/pricing/quote` per design → `POST /v1/shipping/rates` with the same `ship_to` and `line_items` → `POST /v1/orders` naming the chosen `shipping.service` and a `payment.payment_method`. Pricing is identical across all three calls.\n\nTax (4.3%) applies only to US/VA destinations for non-exempt accounts. Rush is honoured only for accounts with rush enabled and creates a rush service request for production review. Orders whose artwork is not yet preflight-approved start in status 10 (Pending Artwork) and move to 6 (In Production) automatically once approved. Required account permission: _Account_Order_Create or _AdminConsole_Order_Edit.",
                "operationId": "postOrders",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Create an order",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Order"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation failure — `errors[0].message` names the offending field (e.g. `line_items[0].artwork.uuid '…' not found`).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "Payment declined / could not be authorised.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "customer_purchase_order": {
                                        "type": "string",
                                        "description": "Your PO number (255 chars max). Echoed on the invoice.",
                                        "example": "PO-10422"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Free-form production notes."
                                    },
                                    "ship_to": {
                                        "$ref": "#/components/schemas/ShipTo"
                                    },
                                    "line_items": {
                                        "type": "array",
                                        "items": {
                                            "$ref": "#/components/schemas/LineItemRequest"
                                        }
                                    },
                                    "shipping": {
                                        "$ref": "#/components/schemas/ShippingRequest"
                                    },
                                    "payment": {
                                        "allOf": [
                                            {
                                                "$ref": "#/components/schemas/PaymentRequest"
                                            }
                                        ],
                                        "description": "Optional for accounts with payment terms (defaults to `terms`)."
                                    },
                                    "customer": {
                                        "type": "string",
                                        "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                                        "example": "customer@example.com"
                                    }
                                },
                                "required": [
                                    "ship_to",
                                    "line_items",
                                    "shipping"
                                ]
                            }
                        }
                    }
                }
            },
            "get": {
                "tags": [
                    "Orders"
                ],
                "summary": "List orders",
                "description": "Paginated sales orders for the account, newest first. Line items, shipments and invoices are omitted in the listing — fetch `GET /v1/orders/:uuid` for detail. Required account permission: _Account_Order_List or _AdminConsole_Order_List.",
                "operationId": "getOrders",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "",
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Max 100.",
                        "schema": {
                            "type": "integer",
                            "description": "Max 100.",
                            "default": 24
                        }
                    },
                    {
                        "name": "query",
                        "in": "query",
                        "required": false,
                        "description": "Matches order number (`S01234`) or your PO number.",
                        "schema": {
                            "type": "string",
                            "description": "Matches order number (`S01234`) or your PO number."
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Comma-separated status codes, e.g. `6,7`.",
                        "schema": {
                            "type": "string",
                            "description": "Comma-separated status codes, e.g. `6,7`."
                        }
                    },
                    {
                        "name": "created_after",
                        "in": "query",
                        "required": false,
                        "description": "Y-m-d inclusive.",
                        "schema": {
                            "type": "string",
                            "description": "Y-m-d inclusive."
                        }
                    },
                    {
                        "name": "created_before",
                        "in": "query",
                        "required": false,
                        "description": "Y-m-d inclusive.",
                        "schema": {
                            "type": "string",
                            "description": "Y-m-d inclusive."
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "required": false,
                        "description": "",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "created_at",
                                "updated_at",
                                "ship_date",
                                "delivery_date",
                                "total_amount",
                                "full_id",
                                "status"
                            ],
                            "default": "created_at"
                        }
                    },
                    {
                        "name": "order",
                        "in": "query",
                        "required": false,
                        "description": "",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "asc",
                                "desc"
                            ],
                            "default": "desc"
                        }
                    },
                    {
                        "name": "customer",
                        "in": "query",
                        "required": false,
                        "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                        "schema": {
                            "type": "string",
                            "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                            "example": "customer@example.com"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List orders",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Order"
                                            }
                                        },
                                        "page": {
                                            "type": "integer"
                                        },
                                        "pages": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        },
                                        "errors": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/payment-methods/cards/setup": {
            "get": {
                "tags": [
                    "Payment Methods"
                ],
                "summary": "Start card setup",
                "description": "Returns the Stripe **publishable** key for this account's sales channel so your client can tokenise a card with Stripe.js / Stripe Elements (or `POST https://api.stripe.com/v1/payment_methods` authenticated with the publishable key). Card numbers go straight from the cardholder to Stripe — never to this API. Post the resulting `pm_…` id to `POST /v1/payment-methods/cards`. `mode` is `test` or `live`; in test mode use Stripe's test cards (e.g. 4242 4242 4242 4242). Required account permission: _Account_PaymentMethod_Create.",
                "operationId": "getPaymentMethodsCardsSetup",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Object `{provider: \\\"stripe\\\", publishable_key, mode}`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "No card-capable payment provider is configured for the sales channel.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/payment-methods/banks/setup": {
            "post": {
                "tags": [
                    "Payment Methods"
                ],
                "summary": "Start bank account setup",
                "description": "Creates a Stripe SetupIntent for a US bank account and returns its `client_secret`. Complete it client-side with `stripe.collectBankAccountForSetup()` + `stripe.confirmUsBankAccountSetup()` (Financial Connections instant verification or micro-deposits), then call `POST /v1/payment-methods/banks` with the resulting `pm_…` id. Required account permission: _Account_PaymentMethod_Create.",
                "operationId": "postPaymentMethodsBanksSetup",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Object `{client_secret}`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/payment-methods/banks": {
            "post": {
                "tags": [
                    "Payment Methods"
                ],
                "summary": "Save a bank account",
                "description": "Persists a bank account after the SetupIntent has been confirmed client-side. If micro-deposits were used the method is returned with `status: pending` and must be verified via `POST /v1/payment-methods/:uuid/verify` before it can be charged. Required account permission: _Account_PaymentMethod_Create.",
                "operationId": "postPaymentMethodsBanks",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Save a bank account",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PaymentMethod"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Missing field, limit reached, or the provider rejected the payment method.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "payment_method_id": {
                                        "type": "string",
                                        "description": "The `pm_…` id from the confirmed SetupIntent (`setup_intent.payment_method`)."
                                    },
                                    "label": {
                                        "type": "string",
                                        "description": "Friendly name, e.g. \"Operating account\"."
                                    },
                                    "billing_contact": {
                                        "$ref": "#/components/schemas/BillingContact"
                                    }
                                },
                                "required": [
                                    "payment_method_id",
                                    "label",
                                    "billing_contact"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/v1/payment-methods/cards": {
            "post": {
                "tags": [
                    "Payment Methods"
                ],
                "summary": "Save a card",
                "description": "Tokenise the card with Stripe.js / Stripe Elements using the publishable key from `GET /v1/payment-methods/cards/setup`, then post the resulting `pm_…` id here. The billing contact is stored as the card's billing address and used for AVS. Accounts are limited to 50 saved methods. Required account permission: _Account_PaymentMethod_Create.",
                "operationId": "postPaymentMethodsCards",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Save a card",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PaymentMethod"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Missing field, limit reached, or the provider rejected the token (`errors[0].message`).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "token": {
                                        "type": "string",
                                        "description": "Stripe PaymentMethod id (`pm_…`) or legacy token (`tok_…`) created client-side with the publishable key — never send raw card numbers."
                                    },
                                    "label": {
                                        "type": "string",
                                        "description": "Friendly name."
                                    },
                                    "billing_contact": {
                                        "$ref": "#/components/schemas/BillingContact"
                                    }
                                },
                                "required": [
                                    "token",
                                    "billing_contact"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/v1/payment-methods/{uuid}/verify": {
            "post": {
                "tags": [
                    "Payment Methods"
                ],
                "summary": "Verify a bank account",
                "description": "Submit the two micro-deposit amounts Stripe sent to the account, as integer cents (`{\"amount1\": 32, \"amount2\": 45}`). Decimal dollar values are rejected. Required account permission: _Account_PaymentMethod_Create.",
                "operationId": "postPaymentMethodsVerify",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Verify a bank account",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PaymentMethod"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Amounts not integer cents, out of range (1–100) or do not match.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Payment method not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "amount1": {
                                        "type": "integer",
                                        "description": "First micro-deposit in cents (1–100), e.g. `32` for $0.32.",
                                        "example": 32
                                    },
                                    "amount2": {
                                        "type": "integer",
                                        "description": "Second micro-deposit in cents (1–100).",
                                        "example": 45
                                    }
                                },
                                "required": [
                                    "amount1",
                                    "amount2"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/v1/payment-methods/{uuid}": {
            "delete": {
                "tags": [
                    "Payment Methods"
                ],
                "summary": "Remove a payment method",
                "description": "Detaches the method at the provider and deletes the saved record. Orders already placed with it are unaffected. Required account permission: _Account_PaymentMethod_Delete.",
                "operationId": "deletePaymentMethodsByUuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Object `{deleted: true}`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Payment method not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/payment-methods": {
            "get": {
                "tags": [
                    "Payment Methods"
                ],
                "summary": "List payment methods",
                "description": "Saved cards and bank accounts plus whether the account may pay by terms or check. Pick a `uuid` with `usable: true` for `payment.payment_method` on `POST /v1/orders`. Required account permission: _Account_PaymentMethod_List.",
                "operationId": "getPaymentMethods",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "List payment methods",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PaymentMethodList"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/pricing/quote": {
            "post": {
                "tags": [
                    "Pricing"
                ],
                "summary": "Quote transfers",
                "description": "Prices one design at one quantity. Pass `artwork` (uuid) for an existing file or `spec` for a design you have not uploaded yet. The quote is binding for the same inputs at order time (shipping and tax excluded). A `matched: null` response means the design does not fit any transfer size — reduce `width`/`height`.\n\n**Colour changes** — to run the same design in additional ink colourways, add `color_changes[]`, each with its own `quantity` and a `colors[]` list giving the replacement ink for every swappable colour of the base artwork in the artwork's `colors` order. All colourways share one price break (`total_quantity`); each colourway under 300 pcs bills the colour-change fee once per changed ink. The same `color_changes[]` shape is accepted on `POST /v1/orders` line items. Required account permission: _Account_Quote_Create or _AdminConsole_Order_Edit.",
                "operationId": "postPricingQuote",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Quote transfers",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Quote"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Missing/invalid inputs, neither `artwork` nor `spec` given, or a `color_changes[]` entry that does not match the artwork's colour count / names an unknown ink.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Artwork not found on this account.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "artwork": {
                                        "type": "string",
                                        "description": "Artwork UUID (alternative to `spec`)."
                                    },
                                    "spec": {
                                        "allOf": [
                                            {
                                                "$ref": "#/components/schemas/DesignSpec"
                                            }
                                        ],
                                        "description": "Design specification (alternative to `artwork`)."
                                    },
                                    "quantity": {
                                        "type": "integer",
                                        "description": "Base colourway quantity."
                                    },
                                    "rush_days": {
                                        "type": "integer",
                                        "description": "0–3.",
                                        "default": 0
                                    },
                                    "color_changes": {
                                        "type": "array",
                                        "items": {
                                            "$ref": "#/components/schemas/ColorChange"
                                        },
                                        "description": "Additional colourways (see `color_change`)."
                                    },
                                    "customer": {
                                        "type": "string",
                                        "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                                        "example": "customer@example.com"
                                    }
                                },
                                "required": [
                                    "quantity"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/v1/shipments/{id}": {
            "get": {
                "tags": [
                    "Shipments"
                ],
                "summary": "Retrieve a shipment",
                "description": "One shipment by its `P######` number with boxes, tracking numbers and tracking URLs. Required account permission: _Account_Shipment_View or _AdminConsole_Shipment_View.",
                "operationId": "getShipmentsById",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "customer",
                        "in": "query",
                        "required": false,
                        "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                        "schema": {
                            "type": "string",
                            "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                            "example": "customer@example.com"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Retrieve a shipment",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Shipment"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Shipment not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/shipments": {
            "get": {
                "tags": [
                    "Shipments"
                ],
                "summary": "List shipments",
                "description": "Shipments carrying any of the account's orders, newest first. Subscribe to `shipment.created` / `shipment.tracking_updated` / `order.shipped` webhooks instead of polling where possible. Required account permission: _Account_Shipment_List or _AdminConsole_Shipment_List.",
                "operationId": "getShipments",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "",
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Max 100.",
                        "schema": {
                            "type": "integer",
                            "description": "Max 100.",
                            "default": 24
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Comma-separated status codes.",
                        "schema": {
                            "type": "string",
                            "description": "Comma-separated status codes."
                        }
                    },
                    {
                        "name": "order",
                        "in": "query",
                        "required": false,
                        "description": "Order uuid — only shipments for that order.",
                        "schema": {
                            "type": "string",
                            "description": "Order uuid — only shipments for that order."
                        }
                    },
                    {
                        "name": "tracking_number",
                        "in": "query",
                        "required": false,
                        "description": "Find the shipment containing a tracking number.",
                        "schema": {
                            "type": "string",
                            "description": "Find the shipment containing a tracking number."
                        }
                    },
                    {
                        "name": "customer",
                        "in": "query",
                        "required": false,
                        "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                        "schema": {
                            "type": "string",
                            "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                            "example": "customer@example.com"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List shipments",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Shipment"
                                            }
                                        },
                                        "page": {
                                            "type": "integer"
                                        },
                                        "pages": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        },
                                        "errors": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/shipping/options": {
            "get": {
                "tags": [
                    "Shipping"
                ],
                "summary": "Shipping options",
                "description": "Carriers, service names and which `shipping.method` values the account may use. Service names are matched case-insensitively on the order. Required account permission: _Account_Order_Create or _AdminConsole_Order_Edit.",
                "operationId": "getShippingOptions",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "customer",
                        "in": "query",
                        "required": false,
                        "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                        "schema": {
                            "type": "string",
                            "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                            "example": "customer@example.com"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Shipping options",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ShippingOptions"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/shipping/rates": {
            "post": {
                "tags": [
                    "Shipping"
                ],
                "summary": "Quote shipping rates",
                "description": "Live UPS rates for a destination and the line items you intend to order. Parcels are estimated from the artwork sheet sizes and quantities; pickup is the computed production ship date. The `amount` returned for a service is exactly what `POST /v1/orders` bills when you pass the same `ship_to`, `line_items` and `shipping.service` with `shipping.method: rate`.\n\nAmounts are integer cents. Accounts with delayed billing see `amount: 0`. Rates are not stored — quote again if the cart changes. Required account permission: _Account_Order_Create or _AdminConsole_Order_Edit.",
                "operationId": "postShippingRates",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Quote shipping rates",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ShippingRates"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation failure or carrier rating error (`errors[0].message`).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "ship_to": {
                                        "$ref": "#/components/schemas/ShipTo"
                                    },
                                    "line_items": {
                                        "type": "array",
                                        "items": {
                                            "$ref": "#/components/schemas/LineItemRequest"
                                        }
                                    },
                                    "customer": {
                                        "type": "string",
                                        "description": "Staff keys only. Act for this customer account (user uuid or sign-in email; a sub-user resolves to its account root). The request then reads and writes that account exactly as the customer's own key would. 404 when no customer account matches; 403 from a customer key.",
                                        "example": "customer@example.com"
                                    }
                                },
                                "required": [
                                    "ship_to",
                                    "line_items"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/v1/ping": {
            "get": {
                "tags": [
                    "Status"
                ],
                "summary": "Liveness check",
                "description": "Returns the current server time. No authentication required; not written to the request log. Required account permission: None (any valid API key).",
                "operationId": "getPing",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Object `{timestamp}`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/teams/events/{uuid}": {
            "delete": {
                "tags": [
                    "Team Events"
                ],
                "summary": "Delete a team event",
                "description": " Required account permission: _Account_Team_Delete.",
                "operationId": "deleteTeamsEventsByUuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "404": {
                        "description": "Event not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "tags": [
                    "Team Events"
                ],
                "summary": "Retrieve a team event",
                "description": " Required account permission: _Account_Team_List.",
                "operationId": "getTeamsEventsByUuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "404": {
                        "description": "Event not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "tags": [
                    "Team Events"
                ],
                "summary": "Update a team event",
                "description": " Required account permission: _Account_Team_Edit.",
                "operationId": "putTeamsEventsByUuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "404": {
                        "description": "Event not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/teams/events": {
            "post": {
                "tags": [
                    "Team Events"
                ],
                "summary": "Create a team event",
                "description": " Required account permission: _Account_Team_Create.",
                "operationId": "postTeamsEvents",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "tags": [
                    "Team Events"
                ],
                "summary": "List team events",
                "description": "Paginated team events (games, tournaments, fundraisers) for the account (`page`, `per_page`). Required account permission: _Account_Team_List.",
                "operationId": "getTeamsEvents",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/teams/rosters/{uuid}": {
            "delete": {
                "tags": [
                    "Team Rosters"
                ],
                "summary": "Delete a roster",
                "description": " Required account permission: _Account_Team_Delete.",
                "operationId": "deleteTeamsRostersByUuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "404": {
                        "description": "Roster not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "tags": [
                    "Team Rosters"
                ],
                "summary": "Retrieve a roster",
                "description": " Required account permission: _Account_Team_List.",
                "operationId": "getTeamsRostersByUuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "404": {
                        "description": "Roster not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "tags": [
                    "Team Rosters"
                ],
                "summary": "Update a roster",
                "description": " Required account permission: _Account_Team_Edit.",
                "operationId": "putTeamsRostersByUuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "404": {
                        "description": "Roster not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/teams/rosters": {
            "post": {
                "tags": [
                    "Team Rosters"
                ],
                "summary": "Create a roster",
                "description": "Creates a roster of members (name, number, sizes) attached to a team event. Required account permission: _Account_Team_Create.",
                "operationId": "postTeamsRosters",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "tags": [
                    "Team Rosters"
                ],
                "summary": "List rosters",
                "description": "Paginated rosters for the account (`page`, `per_page`). Required account permission: _Account_Team_List.",
                "operationId": "getTeamsRosters",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/tickets/options": {
            "get": {
                "tags": [
                    "Tickets"
                ],
                "summary": "List ticket enumerations",
                "description": "Code → label maps for `type`, `status`, `priority` and (staff keys) `classification`, plus the subsets a customer key may set. Use it to render pickers without hard-coding the tables above. Required account permission: _Account_Ticket_List or _AdminConsole_Ticket_List.",
                "operationId": "getTicketsOptions",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "`{types, statuses, priorities, classifications?, customer_types, customer_statuses}`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/tickets/tags": {
            "get": {
                "tags": [
                    "Tickets"
                ],
                "summary": "List tags",
                "description": "Every tag in the catalogue, alphabetical. Tags categorise tickets and drive the knowledgebase (`knowledgebase` = guide card, `faq` = FAQ accordion, others = category chips). Required account permission: _Account_Ticket_List or _AdminConsole_Ticket_List.",
                "operationId": "getTicketsTags",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "List tags",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/TicketTag"
                                            }
                                        },
                                        "page": {
                                            "type": "integer"
                                        },
                                        "pages": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        },
                                        "errors": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "Tickets"
                ],
                "summary": "Create a tag",
                "description": "Staff only. Staff keys. Adds a tag to the catalogue; returns the existing tag when the name is already taken. Required account permission: _AdminConsole_Ticket_Edit.",
                "operationId": "postTicketsTags",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Create a tag",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TicketTag"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Missing or too-long name.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "≤ 64 characters."
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/v1/tickets/{uuid}/files/{fuuid}/download": {
            "get": {
                "tags": [
                    "Tickets"
                ],
                "summary": "Download an attachment",
                "description": "Streams a ticket or reply attachment. Customer keys may download only files their account uploaded. Required account permission: _Account_Ticket_Download or _AdminConsole_Ticket_Download.",
                "operationId": "getTicketsFilesDownload",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "fuuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Binary file body with `Content-Disposition: attachment`.",
                        "content": {
                            "application/octet-stream": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Ticket or file not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/tickets/{uuid}/files/{fuuid}": {
            "delete": {
                "tags": [
                    "Tickets"
                ],
                "summary": "Remove an attachment",
                "description": "Detaches the file from the ticket / reply and deletes it from storage (private bucket, or the public bucket for Article assets). Customer keys may remove only files their account uploaded. Required account permission: _Account_Ticket_Edit or _AdminConsole_Ticket_Edit.",
                "operationId": "deleteTicketsFilesByFuuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "fuuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Remove an attachment",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ticket"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Ticket or file not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/tickets/{uuid}/files": {
            "post": {
                "tags": [
                    "Tickets"
                ],
                "summary": "Attach files",
                "description": "Uploads one or more attachments to the ticket (or to one of its replies when `message` is given). Send as `multipart/form-data` with `file` or `file[]`. Support-ticket files are private (download via the authenticated endpoint). Files attached directly to a knowledgebase Article (`type: 1`, no `message`) are stored publicly under `knowledgebase/<ticket uuid>/<name>` and each DTO carries its public `url`; the article body references them by bare filename. Filenames pass through a safe-name filter — use the `name` returned in `files[]`. Required account permission: _Account_Ticket_Reply or _AdminConsole_Ticket_Edit.",
                "operationId": "postTicketsFiles",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Attach files",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ticket"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "No file / file too large.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Ticket or message not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "One or more files (≤ 50 MB each)."
                                    },
                                    "message": {
                                        "type": "string",
                                        "description": "Reply uuid to attach to instead of the ticket."
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/v1/tickets/{uuid}/messages/{muuid}": {
            "patch": {
                "tags": [
                    "Tickets"
                ],
                "summary": "Edit a reply",
                "description": "Replaces the body of a reply. Customer keys may edit only messages their account sent. Required account permission: _Account_Ticket_Edit or _AdminConsole_Ticket_Edit.",
                "operationId": "patchTicketsMessagesByMuuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "muuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Edit a reply",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ticket"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Not the author (customer keys).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Ticket or message not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "body": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "body"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Tickets"
                ],
                "summary": "Delete a reply",
                "description": "Removes a reply from the thread. Customer keys may delete only messages their account sent. Required account permission: _Account_Ticket_Delete or _AdminConsole_Ticket_Delete.",
                "operationId": "deleteTicketsMessagesByMuuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "muuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Delete a reply",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ticket"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Not the author (customer keys).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Ticket or message not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/tickets/{uuid}/messages": {
            "post": {
                "tags": [
                    "Tickets"
                ],
                "summary": "Reply to a ticket",
                "description": "Appends a reply to the thread as the key user and auto-follows the ticket. Staff replies on a ticket that backs a customer conversation are mirrored to the customer's inbox and emailed to them (`conversation-message-customer`); every reply emails the other participants (`ticket-response`). Attach files afterwards with `POST /v1/tickets/:uuid/files` using `message=<message uuid>`. Required account permission: _Account_Ticket_Reply or _AdminConsole_Ticket_View.",
                "operationId": "postTicketsMessages",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Reply to a ticket",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ticket"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Empty body.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Ticket not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "body": {
                                        "type": "string",
                                        "description": "Reply HTML (≤ 256 KB)."
                                    }
                                },
                                "required": [
                                    "body"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/v1/tickets/{uuid}/followers/{user}": {
            "delete": {
                "tags": [
                    "Tickets"
                ],
                "summary": "Remove a follower",
                "description": "Staff only. Removes one user from the follower list — the × beside a follower in the admin console. `:user` is the follower's uuid or sign-in email address. Other participants (assignee, project manager, creator) are unaffected. Required account permission: _AdminConsole_Ticket_Edit.",
                "operationId": "deleteTicketsFollowersByUser",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "user",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Remove a follower",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ticket"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Customer key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Ticket not found, user not found, or user is not following this ticket.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/tickets/{uuid}/followers": {
            "post": {
                "tags": [
                    "Tickets"
                ],
                "summary": "Add followers",
                "description": "Staff only. Adds one or more staff / customer users to the ticket's follower list without disturbing the existing followers — the admin console's Followers picker. Followers receive the `ticket-updated` and `ticket-response` notifications and can see the ticket when it is private. Users already following are skipped, so the call is idempotent. Identify users by uuid or by the email address they sign in with. Nobody is emailed by this call. Required account permission: _AdminConsole_Ticket_Edit.",
                "operationId": "postTicketsFollowers",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Add followers",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ticket"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "No users given, or a user was not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Customer key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Ticket not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "users": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "description": "User uuids or sign-in email addresses to add. A single string is accepted too."
                                    }
                                },
                                "required": [
                                    "users"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/v1/tickets/{uuid}/assignee": {
            "delete": {
                "tags": [
                    "Tickets"
                ],
                "summary": "Unassign a ticket",
                "description": "Staff only. Clears the assignee and delegator and removes their calendar events — the admin console's Remove Assignee action. Succeeds (no-op) when the ticket is already unassigned. Required account permission: _AdminConsole_Ticket_Edit.",
                "operationId": "deleteTicketsAssignee",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Unassign a ticket",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ticket"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Customer key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Ticket not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "tags": [
                    "Tickets"
                ],
                "summary": "Assign a ticket",
                "description": "Staff only. Assigns the ticket to one staff member — the admin console's Assignee picker. A ticket has a single assignee: assigning replaces the current one. The key user is recorded as delegator (unless assigning to themselves), the assignee's and delegator's calendar events are rebuilt from `due_at`, and the new assignee is emailed with the `ticket-updated` notification. Use followers for additional people who should be kept in the loop. Required account permission: _AdminConsole_Ticket_Edit.",
                "operationId": "postTicketsAssignee",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Assign a ticket",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ticket"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "No user given, or user not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Customer key.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Ticket not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user": {
                                        "type": "string",
                                        "description": "User uuid or sign-in email address."
                                    }
                                },
                                "required": [
                                    "user"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/v1/tickets/{uuid}/merge": {
            "post": {
                "tags": [
                    "Tickets"
                ],
                "summary": "Merge tickets",
                "description": "Staff only. Staff keys. Merges `target` into this ticket (`direction: \"that_into_this\"`, default) or this ticket into `target` (`\"this_into_that\"`), exactly as the admin console's Merge action: the master keeps its values and fills blanks from the child, the child's summary, replies, followers and tags move to the master, and the child is Closed under the master with a \"merged with\" note. Required account permission: _AdminConsole_Ticket_Edit.",
                "operationId": "postTicketsMerge",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Merge tickets",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ticket"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Same ticket / bad direction.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Ticket not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "target": {
                                        "type": "string",
                                        "description": "Uuid of the other ticket."
                                    },
                                    "direction": {
                                        "type": "string",
                                        "enum": [
                                            "that_into_this",
                                            "this_into_that"
                                        ],
                                        "default": "that_into_this"
                                    }
                                },
                                "required": [
                                    "target"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/v1/tickets/{uuid}": {
            "get": {
                "tags": [
                    "Tickets"
                ],
                "summary": "Retrieve a ticket",
                "description": "One ticket with its linked order, artwork, tags, thread, attachments and child tickets. Staff keys also receive participants, classification and privacy. Required account permission: _Account_Ticket_View or _AdminConsole_Ticket_View.",
                "operationId": "getTicketsByUuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Retrieve a ticket",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ticket"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Ticket not found (or not visible to the account)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "tags": [
                    "Tickets"
                ],
                "summary": "Update a ticket",
                "description": "Changes any combination of fields and relations — the equivalent of the admin console's title / summary / type / status / priority / classification / due date / privacy / assignment / customer / order / artwork / item / followers / tags actions in one call. Omitted fields are unchanged; send `null` to clear a relation. Customer keys may change title, summary, priority, status (Open / Closed), order, artwork and parent on their own tickets (published Articles are read-only to them: 403). Article `summary` updates extract inline images exactly as on create. Participants are emailed with the `ticket-updated` notification when type, status, priority, classification, due date or privacy change. Required account permission: _Account_Ticket_Edit or _AdminConsole_Ticket_Edit.",
                "operationId": "patchTicketsByUuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Update a ticket",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ticket"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation failed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Field not allowed for this key's account type, or classification above clearance.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Ticket not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Required on create (≤ 255)."
                                    },
                                    "summary": {
                                        "type": "string",
                                        "description": "Body HTML (≤ 256 KB after processing); `null` clears. Support tickets: `<script>`/`<style>` blocks and inline event handlers are stripped. Articles (`type: 1`): the full page is kept as sent — inline `<style>`, `<script>` and `<link>` are allowed and the knowledgebase renders such pages in a sandboxed frame; `<img src=\"data:image/...\">` payloads are extracted to the public bucket (`knowledgebase/<ticket uuid>/<sha1>.<ext>`), attached as `files[]` and the `src` rewritten to the public URL, so the 256 KB limit applies to the markup only. Relative `src`/`href` values (`hero.png`, `styles.css`) resolve against the Article's attached files."
                                    },
                                    "type": {
                                        "type": "integer",
                                        "description": "See `type_text`. Customer keys: 2 Bug, 3 Complaint, 5 Discussion (default), 6 Feature Request, 12 Task."
                                    },
                                    "status": {
                                        "type": "integer",
                                        "description": "See `status_text`. Customer keys: 9 Open (default) or 2 Closed. Staff keys: any; 11 Published makes an Article public on the knowledgebase when tagged `knowledgebase` or `faq`."
                                    },
                                    "priority": {
                                        "type": "integer",
                                        "description": "1 High, 2 Medium, 3 Low, 4 Shelved, 127 None (default)."
                                    },
                                    "classification": {
                                        "type": "integer",
                                        "description": "Staff keys. 1 Top Secret … 127 Unclassified (default). Cannot exceed the key owner's clearance."
                                    },
                                    "is_private": {
                                        "type": "boolean",
                                        "description": "Staff keys. Private tickets are visible only to participants."
                                    },
                                    "due_at": {
                                        "type": "string",
                                        "description": "Staff keys. ISO 8601; without an offset it is read in the key user's timezone. `null` clears."
                                    },
                                    "is_all_day": {
                                        "type": "boolean",
                                        "description": "Staff keys. Whole-day deadline."
                                    },
                                    "order": {
                                        "type": "string",
                                        "description": "Order uuid to link (`null` unlinks). Customer keys: must be the account's own order."
                                    },
                                    "artwork": {
                                        "type": "string",
                                        "description": "Artwork uuid to link (`null` unlinks). Customer keys: must be the account's own artwork."
                                    },
                                    "item": {
                                        "type": "string",
                                        "description": "Staff keys. Warehouse item uuid (`null` unlinks)."
                                    },
                                    "parent": {
                                        "type": "string",
                                        "description": "Parent ticket uuid (`null` clears). Must be visible to the account."
                                    },
                                    "customer": {
                                        "type": "string",
                                        "description": "Staff keys. Customer account user uuid or sign-in email address (`null` clears). Defaults from the linked order / artwork."
                                    },
                                    "assignee": {
                                        "type": "string",
                                        "description": "Staff keys. User uuid or sign-in email address (`null` unassigns). The key user is recorded as delegator. For set / unset without touching other fields see `POST` / `DELETE /v1/tickets/:uuid/assignee`."
                                    },
                                    "project_manager": {
                                        "type": "string",
                                        "description": "Staff keys. User uuid or sign-in email address (`null` clears)."
                                    },
                                    "followers": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "description": "Staff keys. User uuids or sign-in email addresses; REPLACES the follower list (send the full list). To add or remove one follower without resending the list use `POST` / `DELETE /v1/tickets/:uuid/followers`."
                                    },
                                    "tags": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "description": "Staff keys. Tag names; replaces the tag list, creating tags that do not exist yet (e.g. `[\"knowledgebase\", \"getting-started\"]`)."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Tickets"
                ],
                "summary": "Delete a ticket",
                "description": "Permanently deletes the ticket and its calendar events (replies and attachments stay in storage, as in the admin console). Customer keys may delete only tickets their account created. Required account permission: _Account_Ticket_Delete or _AdminConsole_Ticket_Delete.",
                "operationId": "deleteTicketsByUuid",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`{deleted: true, uuid}`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Customer key deleting a ticket its account did not create.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Ticket not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/tickets": {
            "post": {
                "tags": [
                    "Tickets"
                ],
                "summary": "Create a ticket",
                "description": "Opens a ticket exactly as Admin → Support → Tickets → New does (staff keys) or as a customer raising a support request (customer keys — the ticket is filed against the key's account as Open and Unclassified). Staff keys create knowledgebase content by posting `type: 1` (Article), `status: 11` (Published) and `tags: [\"knowledgebase\"]` or `[\"faq\"]`; the response carries `knowledgebase_url`. Every Article also carries `knowledgebase_preview_url` (`knowledgebase/<slug>/?preview=<ticket uuid>`), which renders the page as it will look once published — use it to proof a draft before flipping `status` to 11. Rich articles: send the complete HTML page in `summary` (inline `<style>`/`<script>` allowed), embed images as `data:` URIs (extracted to public storage automatically) or reference files by bare filename and attach them with `POST /v1/tickets/:uuid/files` — Article attachments are stored publicly under `knowledgebase/<ticket uuid>/` and relative references resolve against them on the public page. Draft with `status: 9` and `PATCH` to `11` once the files are attached. Participants are emailed with the `ticket-created` notification. Required account permission: _Account_Ticket_Create or _AdminConsole_Ticket_Create.",
                "operationId": "postTickets",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "Create a ticket",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Ticket"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Validation failed — see `errors[]`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Field not allowed for this key's account type, or classification above clearance.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Required on create (≤ 255)."
                                    },
                                    "summary": {
                                        "type": "string",
                                        "description": "Body HTML (≤ 256 KB after processing); `null` clears. Support tickets: `<script>`/`<style>` blocks and inline event handlers are stripped. Articles (`type: 1`): the full page is kept as sent — inline `<style>`, `<script>` and `<link>` are allowed and the knowledgebase renders such pages in a sandboxed frame; `<img src=\"data:image/...\">` payloads are extracted to the public bucket (`knowledgebase/<ticket uuid>/<sha1>.<ext>`), attached as `files[]` and the `src` rewritten to the public URL, so the 256 KB limit applies to the markup only. Relative `src`/`href` values (`hero.png`, `styles.css`) resolve against the Article's attached files."
                                    },
                                    "type": {
                                        "type": "integer",
                                        "description": "See `type_text`. Customer keys: 2 Bug, 3 Complaint, 5 Discussion (default), 6 Feature Request, 12 Task."
                                    },
                                    "status": {
                                        "type": "integer",
                                        "description": "See `status_text`. Customer keys: 9 Open (default) or 2 Closed. Staff keys: any; 11 Published makes an Article public on the knowledgebase when tagged `knowledgebase` or `faq`."
                                    },
                                    "priority": {
                                        "type": "integer",
                                        "description": "1 High, 2 Medium, 3 Low, 4 Shelved, 127 None (default)."
                                    },
                                    "classification": {
                                        "type": "integer",
                                        "description": "Staff keys. 1 Top Secret … 127 Unclassified (default). Cannot exceed the key owner's clearance."
                                    },
                                    "is_private": {
                                        "type": "boolean",
                                        "description": "Staff keys. Private tickets are visible only to participants."
                                    },
                                    "due_at": {
                                        "type": "string",
                                        "description": "Staff keys. ISO 8601; without an offset it is read in the key user's timezone. `null` clears."
                                    },
                                    "is_all_day": {
                                        "type": "boolean",
                                        "description": "Staff keys. Whole-day deadline."
                                    },
                                    "order": {
                                        "type": "string",
                                        "description": "Order uuid to link (`null` unlinks). Customer keys: must be the account's own order."
                                    },
                                    "artwork": {
                                        "type": "string",
                                        "description": "Artwork uuid to link (`null` unlinks). Customer keys: must be the account's own artwork."
                                    },
                                    "item": {
                                        "type": "string",
                                        "description": "Staff keys. Warehouse item uuid (`null` unlinks)."
                                    },
                                    "parent": {
                                        "type": "string",
                                        "description": "Parent ticket uuid (`null` clears). Must be visible to the account."
                                    },
                                    "customer": {
                                        "type": "string",
                                        "description": "Staff keys. Customer account user uuid or sign-in email address (`null` clears). Defaults from the linked order / artwork."
                                    },
                                    "assignee": {
                                        "type": "string",
                                        "description": "Staff keys. User uuid or sign-in email address (`null` unassigns). The key user is recorded as delegator. For set / unset without touching other fields see `POST` / `DELETE /v1/tickets/:uuid/assignee`."
                                    },
                                    "project_manager": {
                                        "type": "string",
                                        "description": "Staff keys. User uuid or sign-in email address (`null` clears)."
                                    },
                                    "followers": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "description": "Staff keys. User uuids or sign-in email addresses; REPLACES the follower list (send the full list). To add or remove one follower without resending the list use `POST` / `DELETE /v1/tickets/:uuid/followers`."
                                    },
                                    "tags": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "description": "Staff keys. Tag names; replaces the tag list, creating tags that do not exist yet (e.g. `[\"knowledgebase\", \"getting-started\"]`)."
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "tags": [
                    "Tickets"
                ],
                "summary": "List tickets",
                "description": "Tickets visible to the account, newest first. A customer key sees the tickets raised for its account (never private or classified ones) plus, read-only, every published knowledgebase Article (`type=1&tag=knowledgebase` or `tag=faq`); a staff key sees tickets within its clearance, as in the admin console. Required account permission: _Account_Ticket_List or _AdminConsole_Ticket_List.",
                "operationId": "getTickets",
                "security": [
                    {
                        "bearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "",
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Max 100.",
                        "schema": {
                            "type": "integer",
                            "description": "Max 100.",
                            "default": 25
                        }
                    },
                    {
                        "name": "query",
                        "in": "query",
                        "required": false,
                        "description": "Matches title, summary or uuid.",
                        "schema": {
                            "type": "string",
                            "description": "Matches title, summary or uuid."
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Comma-separated status codes, e.g. `9,1,7` for anything still being worked.",
                        "schema": {
                            "type": "string",
                            "description": "Comma-separated status codes, e.g. `9,1,7` for anything still being worked."
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "description": "Comma-separated type codes, e.g. `1` for knowledgebase articles.",
                        "schema": {
                            "type": "string",
                            "description": "Comma-separated type codes, e.g. `1` for knowledgebase articles."
                        }
                    },
                    {
                        "name": "priority",
                        "in": "query",
                        "required": false,
                        "description": "Comma-separated priority codes.",
                        "schema": {
                            "type": "string",
                            "description": "Comma-separated priority codes."
                        }
                    },
                    {
                        "name": "tag",
                        "in": "query",
                        "required": false,
                        "description": "Tag name — only tickets carrying it, e.g. `faq`.",
                        "schema": {
                            "type": "string",
                            "description": "Tag name — only tickets carrying it, e.g. `faq`."
                        }
                    },
                    {
                        "name": "order",
                        "in": "query",
                        "required": false,
                        "description": "Order uuid — only tickets linked to that order.",
                        "schema": {
                            "type": "string",
                            "description": "Order uuid — only tickets linked to that order."
                        }
                    },
                    {
                        "name": "artwork",
                        "in": "query",
                        "required": false,
                        "description": "Artwork uuid — only tickets linked to that artwork.",
                        "schema": {
                            "type": "string",
                            "description": "Artwork uuid — only tickets linked to that artwork."
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "required": false,
                        "description": "",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "created_at",
                                "updated_at",
                                "due_at",
                                "status",
                                "priority",
                                "type",
                                "title"
                            ],
                            "default": "created_at"
                        }
                    },
                    {
                        "name": "order_by",
                        "in": "query",
                        "required": false,
                        "description": "Sort direction (`order` is taken by the order-uuid filter).",
                        "schema": {
                            "type": "string",
                            "description": "Sort direction (`order` is taken by the order-uuid filter).",
                            "enum": [
                                "asc",
                                "desc"
                            ],
                            "default": "desc"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List tickets",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Ticket"
                                            }
                                        },
                                        "page": {
                                            "type": "integer"
                                        },
                                        "pages": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        },
                                        "errors": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Authentication failed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden (HTTPS, CIDR or scope)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited (see Retry-After)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "Error": {
                "type": "object",
                "properties": {
                    "errors": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string"
                                },
                                "type": {
                                    "type": "string",
                                    "enum": [
                                        "auth_error",
                                        "security_error",
                                        "invalid_request_error",
                                        "rate_limit_error",
                                        "api_connection_error",
                                        "api_error"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "Artwork": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "description": "Identifier of the current version. Use it in every other artwork call and in order line items. Preflight completion creates a new version with a new uuid; any earlier uuid of the same artwork still resolves to the current version, and the response always carries the current uuid — store the one you get back.",
                        "example": "3f1c2a9e-8b2d-4c3e-9a1f-1b2c3d4e5f60"
                    },
                    "name": {
                        "type": "string",
                        "description": "Unique per account. Shown on invoices, packing slips and transfer labels."
                    },
                    "description": {
                        "type": "string",
                        "description": "Free text notes.",
                        "nullable": true
                    },
                    "tin": {
                        "type": "string",
                        "description": "Transfer Item Number — the SKU we manufacture this artwork under. Assigned once a compatible transfer size is resolved.",
                        "nullable": true
                    },
                    "type": {
                        "type": "string",
                        "description": "Colour process. Spot = one screen per PMS colour; CMYK = 4-colour process; CMYK4Lights = process with white underbase for light garments.",
                        "enum": [
                            "CMYK",
                            "CMYK4Lights",
                            "Spot"
                        ]
                    },
                    "formula": {
                        "type": "string",
                        "description": "Ink formula / transfer family the artwork is manufactured with.",
                        "enum": [
                            "Formula-1",
                            "Formula-2",
                            "Formula-4",
                            "Formula-5"
                        ]
                    },
                    "status": {
                        "type": "integer",
                        "description": "1 Needs Reviewed, 2 Pending Preflight, 3 Preflight Approved, 4 Preflight Failed, 5 Preflight Required, 6 Pending Customer Approval. New uploads are 5; ordering a status-5 artwork submits it to preflight and the order waits in status 10 until it reaches 3. Status 4 cannot be ordered.",
                        "enum": [
                            1,
                            2,
                            3,
                            4,
                            5,
                            6
                        ]
                    },
                    "status_text": {
                        "type": "string",
                        "description": "Human label for `status`."
                    },
                    "color_count": {
                        "type": "integer",
                        "description": "Number of print colours (screens)."
                    },
                    "colors": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Color"
                        },
                        "description": "Print colours attached to the artwork."
                    },
                    "art_width": {
                        "type": "number",
                        "format": "double",
                        "description": "Detected artwork width in inches.",
                        "nullable": true
                    },
                    "art_height": {
                        "type": "number",
                        "format": "double",
                        "description": "Detected artwork height in inches.",
                        "nullable": true
                    },
                    "artboard_width": {
                        "type": "number",
                        "format": "double",
                        "description": "Artboard / requested print width in inches.",
                        "nullable": true
                    },
                    "artboard_height": {
                        "type": "number",
                        "format": "double",
                        "description": "Artboard / requested print height in inches.",
                        "nullable": true
                    },
                    "format": {
                        "type": "string",
                        "description": "File extension of the stored original (pdf, ai, eps, png…).",
                        "nullable": true
                    },
                    "version": {
                        "type": "integer",
                        "description": "Version number. Each edit creates a new version; the list endpoint only returns the latest."
                    },
                    "is_latest_version": {
                        "type": "boolean"
                    },
                    "is_archived": {
                        "type": "boolean",
                        "description": "Archived artwork is hidden from the default listing and cannot be ordered."
                    },
                    "preview_png_url": {
                        "type": "string",
                        "description": "Public PNG preview URL.",
                        "nullable": true
                    },
                    "preview_svg_url": {
                        "type": "string",
                        "description": "Public SVG preview URL (vector artwork only).",
                        "nullable": true
                    },
                    "download_url": {
                        "type": "string",
                        "description": "API URL that streams the current file — your upload until preflight completes, then the print-ready file (requires the same Bearer key)."
                    },
                    "is_master": {
                        "type": "boolean",
                        "description": "True for a master template (the artwork derivatives and Design Lab ideas are generated from)."
                    },
                    "master": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/Master"
                            }
                        ],
                        "description": "Master template details; null unless `is_master`."
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                }
            },
            "BankAccountRequest": {
                "type": "object",
                "properties": {
                    "payment_method_id": {
                        "type": "string",
                        "description": "The `pm_…` id from the confirmed SetupIntent (`setup_intent.payment_method`)."
                    },
                    "label": {
                        "type": "string",
                        "description": "Friendly name, e.g. \"Operating account\"."
                    },
                    "billing_contact": {
                        "$ref": "#/components/schemas/BillingContact"
                    }
                },
                "required": [
                    "payment_method_id",
                    "label",
                    "billing_contact"
                ]
            },
            "BillingContact": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "Cardholder / account holder name."
                    },
                    "street1": {
                        "type": "string"
                    },
                    "street2": {
                        "type": "string"
                    },
                    "street3": {
                        "type": "string"
                    },
                    "city": {
                        "type": "string"
                    },
                    "state": {
                        "type": "string"
                    },
                    "postal_code": {
                        "type": "string"
                    },
                    "country": {
                        "type": "string",
                        "description": "ISO 3166-1 alpha-2.",
                        "example": "US"
                    },
                    "email_address": {
                        "type": "string"
                    },
                    "phone_number": {
                        "type": "string"
                    },
                    "mobile_number": {
                        "type": "string"
                    },
                    "attention": {
                        "type": "string"
                    },
                    "title": {
                        "type": "string"
                    }
                },
                "required": [
                    "name",
                    "street1",
                    "city",
                    "state",
                    "postal_code",
                    "country",
                    "email_address"
                ]
            },
            "Bundle": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "description": "Identifier of the sheet. Use it in every other bundle call.",
                        "example": "7c2f1a9e-4b2d-4c3e-9a1f-1b2c3d4e5f60"
                    },
                    "name": {
                        "type": "string",
                        "description": "Sheet name, shown in the library and on the sell sheet."
                    },
                    "sheet": {
                        "type": "string",
                        "description": "Sheet size key.",
                        "example": "28x17"
                    },
                    "dimensions": {
                        "type": "object",
                        "description": "Physical and printable size of the sheet, in inches."
                    },
                    "status": {
                        "type": "string",
                        "description": "`saved` is ready to order. `ordered` means it is on at least one order and can no longer be deleted. `deleted` sheets are hidden from the library.",
                        "enum": [
                            "draft",
                            "saved",
                            "ordered",
                            "deleted"
                        ]
                    },
                    "designs": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "The artwork on the sheet: `artwork` (uuid), `name` and `number_up` (how many times it is repeated)."
                    },
                    "placements": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Where each piece sits, in inches from the printable-area top-left, with `rotated` set when it was turned 90°. Returned only when the sheet has been arranged."
                    },
                    "overflow": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Designs that did NOT fit on the sheet and were therefore not placed. Present on create/update responses only; an empty array means everything fit."
                    },
                    "preview_url": {
                        "type": "string",
                        "description": "Sheet preview image. Null for sheets created through the API — the preview is produced by the web designer's canvas, so an API-created sheet has none until it is opened and saved there.",
                        "nullable": true
                    },
                    "created_at": {
                        "type": "string",
                        "description": "ISO-8601 UTC."
                    },
                    "updated_at": {
                        "type": "string",
                        "description": "ISO-8601 UTC."
                    }
                }
            },
            "CardRequest": {
                "type": "object",
                "properties": {
                    "token": {
                        "type": "string",
                        "description": "Stripe PaymentMethod id (`pm_…`) or legacy token (`tok_…`) created client-side with the publishable key — never send raw card numbers."
                    },
                    "label": {
                        "type": "string",
                        "description": "Friendly name."
                    },
                    "billing_contact": {
                        "$ref": "#/components/schemas/BillingContact"
                    }
                },
                "required": [
                    "token",
                    "billing_contact"
                ]
            },
            "Color": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "Colour id."
                    },
                    "name": {
                        "type": "string",
                        "description": "Colour name (e.g. \"Royal Blue\")."
                    },
                    "pms": {
                        "type": "string",
                        "description": "Pantone reference (e.g. \"286 C\").",
                        "nullable": true
                    },
                    "hex": {
                        "type": "string",
                        "description": "Approximate sRGB hex (e.g. \"#0033A0\").",
                        "nullable": true
                    }
                }
            },
            "ColorChange": {
                "type": "object",
                "properties": {
                    "quantity": {
                        "type": "integer",
                        "description": "Transfers wanted in this colourway (≥ 1).",
                        "example": 100
                    },
                    "colors": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "One ink per swappable colour of the base artwork, **in the artwork's `colors` order** (underbase / adhesive screens are excluded and carried automatically). Each entry is a Pantone code (`\"185 C\"`), a colour name (`\"White\"`), or `{id}`. Keep an entry equal to the base colour to leave that position unchanged; at least one must differ.",
                        "example": [
                            "185 C",
                            "White"
                        ]
                    },
                    "name": {
                        "type": "string",
                        "description": "Name for the colourway artwork that gets created (≤ 255). Defaults to `\"<artwork name> - <colours>\"`."
                    }
                },
                "required": [
                    "quantity",
                    "colors"
                ]
            },
            "Contact": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "Company or recipient name."
                    },
                    "attention": {
                        "type": "string",
                        "nullable": true
                    },
                    "title": {
                        "type": "string",
                        "nullable": true
                    },
                    "street1": {
                        "type": "string"
                    },
                    "street2": {
                        "type": "string",
                        "nullable": true
                    },
                    "street3": {
                        "type": "string",
                        "nullable": true
                    },
                    "city": {
                        "type": "string"
                    },
                    "state": {
                        "type": "string",
                        "description": "State / province code (e.g. `VA`).",
                        "nullable": true
                    },
                    "postal_code": {
                        "type": "string"
                    },
                    "country": {
                        "type": "string",
                        "description": "ISO 3166-1 alpha-2 (e.g. `US`)."
                    },
                    "email_address": {
                        "type": "string",
                        "nullable": true
                    },
                    "phone_number": {
                        "type": "string",
                        "description": "E.164.",
                        "nullable": true
                    },
                    "mobile_number": {
                        "type": "string",
                        "description": "E.164.",
                        "nullable": true
                    },
                    "fax_number": {
                        "type": "string",
                        "nullable": true
                    }
                }
            },
            "Customer": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "description": "Account root user uuid — the value to pass as `customer` on every act-as call."
                    },
                    "email": {
                        "type": "string",
                        "description": "Sign-in email (also accepted as the `customer` act-as value)."
                    },
                    "organization": {
                        "type": "string"
                    },
                    "status": {
                        "type": "integer",
                        "enum": [
                            1,
                            2,
                            3,
                            4,
                            5
                        ]
                    },
                    "status_text": {
                        "type": "string",
                        "description": "1 Active, 2 Delinquent, 3 Inactive, 4 Pending Confirmation, 5 Lead."
                    },
                    "website": {
                        "type": "string",
                        "nullable": true
                    },
                    "tax_exempt": {
                        "type": "boolean"
                    },
                    "payment_terms": {
                        "type": "integer",
                        "description": "Net terms in days; null / 0 means pay at checkout.",
                        "nullable": true
                    },
                    "notes": {
                        "type": "string",
                        "description": "Staff notes on the account (detail only).",
                        "nullable": true
                    },
                    "contact": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/Contact"
                            }
                        ],
                        "description": "Default contact — name, address, phone, email."
                    },
                    "users": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Detail only. `[{uuid, email, status}]` — the root sign-in plus every sub-user on the account."
                    },
                    "order_count": {
                        "type": "integer"
                    },
                    "artwork_count": {
                        "type": "integer"
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                }
            },
            "DesignSpec": {
                "type": "object",
                "properties": {
                    "type": {
                        "type": "string",
                        "enum": [
                            "CMYK",
                            "CMYK4Lights",
                            "Spot"
                        ]
                    },
                    "formula": {
                        "type": "string",
                        "enum": [
                            "Formula-1",
                            "Formula-2",
                            "Formula-4",
                            "Formula-5"
                        ]
                    },
                    "color_count": {
                        "type": "integer",
                        "description": "Number of spot colours (screens). Use 4 for CMYK / CMYK4Lights."
                    },
                    "width": {
                        "type": "number",
                        "format": "double",
                        "description": "Artwork width in inches."
                    },
                    "height": {
                        "type": "number",
                        "format": "double",
                        "description": "Artwork height in inches."
                    },
                    "color_ids": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        },
                        "description": "Optional colour ids (see the `colors` on any artwork). Non-stock colours add a one-time custom ink match fee."
                    }
                },
                "required": [
                    "type",
                    "formula",
                    "color_count",
                    "width",
                    "height"
                ]
            },
            "Font": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "Stable platform font id.",
                        "example": 368
                    },
                    "font": {
                        "type": "string",
                        "description": "Canonical `{Family}-{Style}` identity — the exact string the designer registers as a font-family and the compile request sends.",
                        "example": "Bebas Neue-Regular"
                    },
                    "family": {
                        "type": "string",
                        "description": "Font family name.",
                        "example": "Bebas Neue"
                    },
                    "style": {
                        "type": "string",
                        "description": "Style within the family.",
                        "example": "Regular"
                    },
                    "file_name": {
                        "type": "string",
                        "description": "Print file basename under the public S3 `font/` prefix (always a static TrueType `.ttf` — the visibility gate requires it).",
                        "example": "Bebas Neue-Regular.ttf"
                    },
                    "woff2_url": {
                        "type": "string",
                        "description": "Absolute URL of the browser woff2 build."
                    },
                    "updated_at": {
                        "type": "string",
                        "description": "UTC ISO 8601 last-modified stamp for this row.",
                        "example": "2026-09-09T20:08:14Z"
                    }
                }
            },
            "Invoice": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string"
                    },
                    "id": {
                        "type": "string",
                        "description": "Invoice number (`I######`)."
                    },
                    "status": {
                        "type": "integer",
                        "enum": [
                            1,
                            2,
                            3,
                            4,
                            5
                        ]
                    },
                    "status_text": {
                        "type": "string",
                        "description": "1 Unpaid, 2 Paid, 3 Void, 4 Pending Check, 5 Partially Paid."
                    },
                    "order": {
                        "type": "object",
                        "description": "`{uuid, id}`.",
                        "nullable": true
                    },
                    "customer_purchase_order": {
                        "type": "string",
                        "nullable": true
                    },
                    "subtotal_amount": {
                        "type": "integer",
                        "description": "Cents."
                    },
                    "shipping_amount": {
                        "type": "integer",
                        "description": "Cents."
                    },
                    "discount_amount": {
                        "type": "integer",
                        "description": "Cents."
                    },
                    "tax_amount": {
                        "type": "integer",
                        "description": "Cents."
                    },
                    "total_amount": {
                        "type": "integer",
                        "description": "Cents."
                    },
                    "amount_paid": {
                        "type": "integer",
                        "description": "Cents. Sum of captured / settled / initiated transactions."
                    },
                    "balance_due": {
                        "type": "integer",
                        "description": "Cents. `total_amount - amount_paid`, floored at 0; always 0 on a void invoice."
                    },
                    "currency": {
                        "type": "string",
                        "description": "All amounts on the invoice, its line items and transactions are integer minor units of this currency.",
                        "example": "USD"
                    },
                    "bill_to": {
                        "$ref": "#/components/schemas/Contact"
                    },
                    "line_items": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "`[{description, quantity, unit_price, total_price, order_line_item_id}]` (detail only)."
                    },
                    "transactions": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/InvoiceTransaction"
                        },
                        "description": "Detail only."
                    },
                    "download_url": {
                        "type": "string",
                        "description": "PDF download (`GET /v1/invoices/:uuid/download`, Bearer auth)."
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                }
            },
            "InvoiceTransaction": {
                "type": "object",
                "properties": {
                    "type": {
                        "type": "integer",
                        "description": "4 Check, 5 Card charge, 6 ACH, 7 Refund, 8 Account credit, 9 Account debit."
                    },
                    "status": {
                        "type": "integer",
                        "description": "1 Open, 2 Authorized, 3 Captured, 4 Settled, 5 Expired, 6 Refunded, 7 Void, 8 Reversed, 9 Initiated (ACH pending), 10 Failed."
                    },
                    "amount": {
                        "type": "integer",
                        "description": "Cents."
                    },
                    "reference": {
                        "type": "string",
                        "description": "Provider charge / intent id or check number.",
                        "nullable": true
                    },
                    "created_at": {
                        "type": "string"
                    }
                }
            },
            "LineItemRequest": {
                "type": "object",
                "properties": {
                    "artwork": {
                        "type": "object",
                        "description": "Transfer artwork reference — `{uuid}` (preferred), `{tin}`, or `{name}`. A bare uuid string is also accepted. Omit for stock SKUs.",
                        "example": {
                            "uuid": "3f1c2a9e-…"
                        }
                    },
                    "sku": {
                        "type": "string",
                        "description": "Stock SKU, or a specific transfer size SKU to pin (must be the size recommended for the artwork)."
                    },
                    "quantity": {
                        "type": "integer",
                        "description": "Transfers in the artwork's own colours (the base colourway).",
                        "example": 144
                    },
                    "color_changes": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ColorChange"
                        },
                        "description": "Additional colourways of the same artwork, each `{quantity, colors[], name?}` — see `color_change` under Pricing. The line quantity becomes `quantity + Σ color_changes[].quantity`, priced at one break. Each colourway under 300 pcs bills service 366 once per changed ink. A colourway artwork is created (or an existing matching relative reused) and, once the order is placed, submitted for preflight; the order waits in status 10 until every colourway is approved."
                    },
                    "rush_days": {
                        "type": "integer",
                        "description": "0–3 production days to cut from the turn time. Billed as service 3 (`unit fee × days`). Ignored unless the account has rush enabled.",
                        "default": 0
                    },
                    "customer_sku": {
                        "type": "string",
                        "description": "Your own SKU, echoed on the order and invoice."
                    },
                    "customer_sales_order": {
                        "type": "string",
                        "description": "Your own sales order reference for this line."
                    }
                },
                "required": [
                    "quantity"
                ]
            },
            "Master": {
                "type": "object",
                "properties": {
                    "design_uuid": {
                        "type": "string",
                        "description": "Uuid of the master Design row holding the schema-v1 document (null for an uploaded Illustrator-package master, which has no document — manage those in Admin → Artwork).",
                        "nullable": true
                    },
                    "scope": {
                        "type": "string",
                        "description": "Design Lab gallery scope: `global` = every customer sees it as an idea (owned by the house stock account); `customer` = only `scope_customer` sees it (owned by that customer).",
                        "enum": [
                            "global",
                            "customer"
                        ],
                        "nullable": true
                    },
                    "scope_customer": {
                        "type": "object",
                        "description": "`{uuid, name}` of the customer a `customer`-scoped master belongs to.",
                        "nullable": true
                    },
                    "categories": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Gallery category names."
                    },
                    "variables": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/MasterVariable"
                        },
                        "description": "Text layers derivatives substitute, in document order."
                    },
                    "mutator_rules": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/MutatorRule"
                        },
                        "description": "Ordered waterfall of variable mutators applied to every derivative data row before substitution."
                    },
                    "rotations": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/PrintRotation"
                        },
                        "description": "Authored press passes (one per separation, plus the HA ADHESIVE powder pass when inks touch)."
                    },
                    "fonts": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Font faces the document uses (`<Family>-<Style>`)."
                    },
                    "derivative_count": {
                        "type": "integer",
                        "description": "Current-version derivatives generated from this master."
                    },
                    "document_url": {
                        "type": "string",
                        "description": "API URL returning the design document (staff keys).",
                        "nullable": true
                    }
                }
            },
            "MasterVariable": {
                "type": "object",
                "properties": {
                    "key": {
                        "type": "string",
                        "description": "Variable name — the data column derivatives bind to this layer."
                    },
                    "layer_id": {
                        "type": "string",
                        "description": "Id of the text layer in the design document."
                    },
                    "default": {
                        "type": "string",
                        "description": "Placeholder text the layer carries in the master (what the compiled PDF shows).",
                        "nullable": true
                    }
                }
            },
            "Mutator": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "Value to send as `mutator_rules[].mutator`."
                    },
                    "label": {
                        "type": "string",
                        "description": "Human label."
                    },
                    "params": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/MutatorParam"
                        },
                        "description": "Parameters the mutator accepts (`param` keys). Empty when it takes none."
                    }
                }
            },
            "MutatorParam": {
                "type": "object",
                "properties": {
                    "key": {
                        "type": "string",
                        "description": "Key inside `param`."
                    },
                    "label": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string",
                        "description": "`number` → integer; `text` → string; `select` → one of `options`.",
                        "enum": [
                            "number",
                            "text",
                            "select"
                        ]
                    },
                    "default": {
                        "type": "string",
                        "description": "Value used when the key is omitted.",
                        "nullable": true
                    },
                    "options": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Allowed values for `select`."
                    }
                }
            },
            "MutatorRule": {
                "type": "object",
                "properties": {
                    "mutator": {
                        "type": "string",
                        "description": "Registered mutator name — see `GET /v1/artwork/mutators`."
                    },
                    "variable_in": {
                        "type": "string",
                        "description": "Variable the mutator reads (and, for most, the prefix of the fields it writes, e.g. `Name` → `Name_Line1`, `Name_Line2`). `CreateField` writes this key."
                    },
                    "param": {
                        "type": "object",
                        "description": "Mutator parameters per its `params` schema (e.g. `{\"n\": 1}`); null when it takes none.",
                        "nullable": true
                    },
                    "sort_order": {
                        "type": "integer",
                        "description": "Position in the waterfall (0-based). Rules run in this order."
                    }
                }
            },
            "Order": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string"
                    },
                    "id": {
                        "type": "string",
                        "description": "Human order number (`S#####`)."
                    },
                    "status": {
                        "type": "integer",
                        "enum": [
                            1,
                            2,
                            3,
                            4,
                            5,
                            6,
                            7,
                            8,
                            9,
                            10,
                            11
                        ]
                    },
                    "status_text": {
                        "type": "string",
                        "description": "1 Needs Mockups, 2 Needs Invoiced, 3 Pending Payment, 4 Unclaimed, 5 In Progress, 6 In Production, 7 Shipped, 8 Canceled, 9 Completed, 10 Pending Artwork, 11 Needs Reviewed."
                    },
                    "customer_purchase_order": {
                        "type": "string",
                        "nullable": true
                    },
                    "notes": {
                        "type": "string",
                        "nullable": true
                    },
                    "total_units": {
                        "type": "integer"
                    },
                    "subtotal_amount": {
                        "type": "integer",
                        "description": "Cents."
                    },
                    "shipping_amount": {
                        "type": "integer",
                        "description": "Cents."
                    },
                    "discount_amount": {
                        "type": "integer",
                        "description": "Cents."
                    },
                    "tax_amount": {
                        "type": "integer",
                        "description": "Cents."
                    },
                    "total_amount": {
                        "type": "integer",
                        "description": "Cents. `subtotal - discount + shipping + tax`."
                    },
                    "currency": {
                        "type": "string",
                        "description": "All amounts on the order and its line items are integer minor units of this currency.",
                        "example": "USD"
                    },
                    "turn_days": {
                        "type": "integer"
                    },
                    "ship_date": {
                        "type": "string",
                        "description": "Scheduled ship date (Y-m-d).",
                        "nullable": true
                    },
                    "delivery_date": {
                        "type": "string",
                        "nullable": true
                    },
                    "shipping": {
                        "type": "object",
                        "description": "`{carrier, service, account_number}` — `account_number` present only when shipping on your own account."
                    },
                    "ship_to": {
                        "$ref": "#/components/schemas/Contact"
                    },
                    "bill_to": {
                        "$ref": "#/components/schemas/Contact"
                    },
                    "line_items": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/OrderLineItem"
                        }
                    },
                    "shipments": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Shipment summaries (see `GET /v1/shipments`)."
                    },
                    "invoices": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Invoice summaries (see `GET /v1/invoices`)."
                    },
                    "print_spec_url": {
                        "type": "string",
                        "description": "Mockup / print spec PDF.",
                        "nullable": true
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                }
            },
            "OrderLineItem": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "description": {
                        "type": "string"
                    },
                    "sku": {
                        "type": "string",
                        "nullable": true
                    },
                    "quantity": {
                        "type": "integer",
                        "description": "Total transfers on the line across all colourways."
                    },
                    "turn_days": {
                        "type": "integer"
                    },
                    "unit_price": {
                        "type": "integer",
                        "description": "Cents. Per-piece price excluding services."
                    },
                    "total_service_price": {
                        "type": "integer",
                        "description": "Cents. Setup + colour upcharges + colour changes + rush for the line."
                    },
                    "total_price": {
                        "type": "integer",
                        "description": "Cents."
                    },
                    "customer_sku": {
                        "type": "string",
                        "nullable": true
                    },
                    "customer_sales_order": {
                        "type": "string",
                        "nullable": true
                    },
                    "artwork": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "`[{uuid, name, tin, status, status_text}]` — the base artwork first, then one artwork per colour change."
                    },
                    "colorways": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "`[{quantity, is_color_change, artwork:{uuid, name, status, status_text}, colors:[{id, name, pms, hex}]}]` — one entry per colourway printed on this line (base first). Empty for stock SKUs."
                    },
                    "services": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "`[{id, name, quantity, unit_price, total_price}]` — 1 custom colour, 2 setup, 3 rush, 366 colour change (quantity = changed inks billed)."
                    }
                }
            },
            "OrderRequest": {
                "type": "object",
                "properties": {
                    "customer_purchase_order": {
                        "type": "string",
                        "description": "Your PO number (255 chars max). Echoed on the invoice.",
                        "example": "PO-10422"
                    },
                    "notes": {
                        "type": "string",
                        "description": "Free-form production notes."
                    },
                    "ship_to": {
                        "$ref": "#/components/schemas/ShipTo"
                    },
                    "line_items": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/LineItemRequest"
                        }
                    },
                    "shipping": {
                        "$ref": "#/components/schemas/ShippingRequest"
                    },
                    "payment": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/PaymentRequest"
                            }
                        ],
                        "description": "Optional for accounts with payment terms (defaults to `terms`)."
                    }
                },
                "required": [
                    "ship_to",
                    "line_items",
                    "shipping"
                ]
            },
            "PantoneColor": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "Stable platform color id — the same id `color_ids` accepts on pricing/order specs.",
                        "example": 8612
                    },
                    "name": {
                        "type": "string",
                        "description": "Human-readable ink name.",
                        "example": "Red"
                    },
                    "pms": {
                        "type": "string",
                        "description": "Pantone Matching System code, or the ink name when the row has no PMS code — always populated, so this is the key to match on.",
                        "example": "185 C"
                    },
                    "hex": {
                        "type": "string",
                        "description": "Web hex value, `#RRGGBB`.",
                        "example": "#E4002B",
                        "nullable": true
                    },
                    "rgb": {
                        "type": "object",
                        "description": "`{r, g, b}`, each 0–255. `null` when the ink has no RGB values on file.",
                        "nullable": true
                    },
                    "cmyk": {
                        "type": "object",
                        "description": "`{c, m, y, k}`, each 0–100. `null` when the ink has no CMYK values on file.",
                        "nullable": true
                    },
                    "is_special": {
                        "type": "boolean",
                        "description": "Specialty ink (metallic, glitter, etc.)."
                    },
                    "is_semiopaque": {
                        "type": "boolean",
                        "description": "Semi-opaque ink — needs a base or special layering over dark substrates."
                    },
                    "updated_at": {
                        "type": "string",
                        "description": "UTC ISO 8601 last-modified stamp for this row.",
                        "example": "2026-09-01T14:03:22Z"
                    }
                }
            },
            "PaymentMethod": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string",
                        "description": "Pass as `payment.payment_method` on `POST /v1/orders`."
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "card",
                            "bank_account"
                        ]
                    },
                    "label": {
                        "type": "string",
                        "nullable": true
                    },
                    "is_default": {
                        "type": "boolean"
                    },
                    "brand": {
                        "type": "string",
                        "description": "Cards: Visa, Mastercard, …",
                        "nullable": true
                    },
                    "last4": {
                        "type": "string",
                        "nullable": true
                    },
                    "exp_month": {
                        "type": "integer",
                        "description": "Cards only.",
                        "nullable": true
                    },
                    "exp_year": {
                        "type": "integer",
                        "description": "Cards only.",
                        "nullable": true
                    },
                    "bank_name": {
                        "type": "string",
                        "description": "Bank accounts only.",
                        "nullable": true
                    },
                    "account_holder_name": {
                        "type": "string",
                        "description": "Bank accounts only.",
                        "nullable": true
                    },
                    "routing_number": {
                        "type": "string",
                        "description": "Bank accounts only.",
                        "nullable": true
                    },
                    "status": {
                        "type": "string",
                        "description": "Bank accounts: `new`, `pending` (micro-deposits sent), `verified`. Unverified accounts cannot be charged.",
                        "nullable": true
                    },
                    "usable": {
                        "type": "boolean",
                        "description": "True when the method can be charged by `POST /v1/orders` right now."
                    },
                    "billing_contact": {
                        "$ref": "#/components/schemas/Contact"
                    },
                    "created_at": {
                        "type": "string"
                    }
                }
            },
            "PaymentMethodList": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/PaymentMethod"
                        }
                    },
                    "terms_enabled": {
                        "type": "boolean",
                        "description": "Account may pay by terms (`payment.method: terms`)."
                    },
                    "check_enabled": {
                        "type": "boolean",
                        "description": "Account may pay by check (`payment.method: check`)."
                    },
                    "payment_terms_days": {
                        "type": "integer",
                        "description": "Net terms in days when terms are enabled."
                    }
                }
            },
            "PaymentRequest": {
                "type": "object",
                "properties": {
                    "method": {
                        "type": "string",
                        "description": "Defaults to `terms` when the account has payment terms, otherwise `payment_method` when a `payment_method` uuid is given.",
                        "enum": [
                            "payment_method",
                            "terms",
                            "check"
                        ]
                    },
                    "payment_method": {
                        "type": "string",
                        "description": "UUID of a saved card or bank account from `GET /v1/payment-methods`. Cards are authorised and captured immediately; bank accounts (ACH) are initiated and settle asynchronously (`invoice.paid` webhook)."
                    },
                    "confirmation_code": {
                        "type": "string",
                        "description": "Check number / reference (method `check` only)."
                    }
                }
            },
            "PrintFile": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "Production file id."
                    },
                    "artwork_uuid": {
                        "type": "string",
                        "description": "Current uuid of the artwork the file belongs to."
                    },
                    "print_method_id": {
                        "type": "integer",
                        "description": "Print method the file was prepared for (1 = Screen Printing Sheet-Fed)."
                    },
                    "print_method": {
                        "type": "string",
                        "description": "Print method name.",
                        "nullable": true
                    },
                    "version": {
                        "type": "integer",
                        "description": "Per print-method version; each attach increments it and production always uses the highest."
                    },
                    "name": {
                        "type": "string",
                        "description": "Display name (defaults to the artwork name)."
                    },
                    "image_width": {
                        "type": "number",
                        "format": "double",
                        "description": "Trimmed printed-image width in inches, measured from the file.",
                        "nullable": true
                    },
                    "image_height": {
                        "type": "number",
                        "format": "double",
                        "description": "Trimmed printed-image height in inches.",
                        "nullable": true
                    },
                    "document_width": {
                        "type": "number",
                        "format": "double",
                        "description": "Page (document) width in inches.",
                        "nullable": true
                    },
                    "document_height": {
                        "type": "number",
                        "format": "double",
                        "description": "Page (document) height in inches.",
                        "nullable": true
                    },
                    "format": {
                        "type": "string",
                        "description": "Always `pdf`."
                    },
                    "preview_png_url": {
                        "type": "string",
                        "description": "Public low-res PNG preview of the production file.",
                        "nullable": true
                    },
                    "uploaded_by": {
                        "type": "object",
                        "description": "`{uuid, name}` of the staff user whose key attached the file.",
                        "nullable": true
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                }
            },
            "PrintRotation": {
                "type": "object",
                "properties": {
                    "index": {
                        "type": "integer",
                        "description": "Press pass number (1-based)."
                    },
                    "color": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/Color"
                            }
                        ],
                        "description": "Ink of the pass; null for the HA ADHESIVE powder pass."
                    },
                    "alternate_color_name": {
                        "type": "string",
                        "description": "Named pass with no colour row (`HA ADHESIVE`).",
                        "nullable": true
                    },
                    "ink_type": {
                        "type": "string",
                        "description": "`Plastisol` colour pass or `Clear` powder pass."
                    },
                    "adhesive_type": {
                        "type": "string",
                        "description": "Powder adhesive applied on this pass (Dakota / 16P / 1P by formula); null when a dedicated powder pass carries it.",
                        "nullable": true
                    },
                    "screen_mesh_count": {
                        "type": "integer",
                        "description": "Screen mesh."
                    }
                }
            },
            "Quote": {
                "type": "object",
                "properties": {
                    "artwork": {
                        "type": "object",
                        "description": "`{uuid, name, tin}` when quoted from an artwork.",
                        "nullable": true
                    },
                    "spec": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/DesignSpec"
                            }
                        ],
                        "description": "The specification that was priced."
                    },
                    "matched": {
                        "type": "object",
                        "description": "Transfer size the design was placed on: `{sku, size_code, max_width, max_height, rotated, utilization_percent}`. `null` when nothing fits — the design is too large for any size.",
                        "nullable": true
                    },
                    "quantity": {
                        "type": "integer",
                        "description": "Base colourway quantity as requested."
                    },
                    "total_quantity": {
                        "type": "integer",
                        "description": "`quantity + Σ color_changes[].quantity` — the quantity the design was priced at (all colourways share one price break)."
                    },
                    "currency": {
                        "type": "string",
                        "description": "Always `USD`. Every money field below is an integer in minor units (cents)."
                    },
                    "unit_price": {
                        "type": "integer",
                        "description": "Cents. All-in price per transfer at `total_quantity`: piece price + setup and one-time fees amortised. Excludes rush and colour-change fees."
                    },
                    "subtotal": {
                        "type": "integer",
                        "description": "Cents. Transfers + setup + one-time fees (`unit_price × total_quantity`)."
                    },
                    "breakdown": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Itemised rows `{label, quantity, unit_price, total_price}` (cents) that sum to `subtotal`."
                    },
                    "color_changes": {
                        "type": "object",
                        "description": "`{unit_fee, minimum, colorways:[{quantity, colors:[color], changed, billable, fee}], total_fee}` — fees in cents; `changed` is the number of ink positions that differ from the base; a colourway under `minimum` pieces bills `unit_fee × changed`."
                    },
                    "rush": {
                        "type": "object",
                        "description": "`{enabled, days, unit_fee, fee}` — fees in cents; `enabled` tells you whether the account may request rush at all."
                    },
                    "total": {
                        "type": "integer",
                        "description": "Cents. `subtotal + color_changes.total_fee + rush.fee`. Excludes shipping and tax."
                    },
                    "tiers": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Standard quantity breaks `{quantity, price_each, price_total}` (cents) at 72, 144, 288, 512, 1024 for the same design."
                    },
                    "turn_days": {
                        "type": "integer",
                        "description": "Business days to ship after rush is applied."
                    },
                    "estimated_ship_date": {
                        "type": "string",
                        "format": "date",
                        "description": "Ship date if ordered now (`Y-m-d`, business-day calendar).",
                        "nullable": true
                    },
                    "has_custom_pricing": {
                        "type": "boolean",
                        "description": "True when negotiated account pricing was applied."
                    }
                }
            },
            "QuoteRequest": {
                "type": "object",
                "properties": {
                    "artwork": {
                        "type": "string",
                        "description": "UUID of an artwork on your account. When given, `spec` is derived from it (and artwork-scoped pricing rules apply).",
                        "example": "3f1c2a9e-8b2d-4c3e-9a1f-1b2c3d4e5f60"
                    },
                    "spec": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/DesignSpec"
                            }
                        ],
                        "description": "Design specification to quote when you do not have an artwork yet. Ignored when `artwork` is given."
                    },
                    "quantity": {
                        "type": "integer",
                        "description": "Number of transfers (≥ 1).",
                        "example": 144
                    },
                    "rush_days": {
                        "type": "integer",
                        "description": "Days to cut from standard turn time, 0–3. Only honoured when the account has rush enabled (see `rush.enabled` in the response).",
                        "default": 0
                    },
                    "color_changes": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ColorChange"
                        },
                        "description": "Additional colourways of the same design (see `color_change`). `quantity` is the base colourway; the design is priced at `quantity + Σ color_changes[].quantity`."
                    }
                },
                "required": [
                    "quantity"
                ]
            },
            "ShipTo": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "example": "Acme Screen Printing"
                    },
                    "attention": {
                        "type": "string",
                        "example": "Receiving"
                    },
                    "street1": {
                        "type": "string",
                        "example": "123 Main St"
                    },
                    "street2": {
                        "type": "string"
                    },
                    "street3": {
                        "type": "string"
                    },
                    "city": {
                        "type": "string",
                        "example": "Richmond"
                    },
                    "state": {
                        "type": "string",
                        "description": "Required for US/CA destinations.",
                        "example": "VA"
                    },
                    "postal_code": {
                        "type": "string",
                        "example": "23220"
                    },
                    "country": {
                        "type": "string",
                        "description": "ISO 3166-1 alpha-2.",
                        "example": "US"
                    },
                    "email_address": {
                        "type": "string",
                        "example": "receiving@acme.example"
                    },
                    "phone_number": {
                        "type": "string",
                        "description": "Required unless `mobile_number` is given.",
                        "example": "+18045551234"
                    },
                    "mobile_number": {
                        "type": "string"
                    },
                    "fax_number": {
                        "type": "string"
                    }
                },
                "required": [
                    "name",
                    "street1",
                    "city",
                    "postal_code",
                    "country",
                    "email_address"
                ]
            },
            "Shipment": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Shipment number (`P######`). Use in `GET /v1/shipments/:id`."
                    },
                    "status": {
                        "type": "integer",
                        "enum": [
                            1,
                            2,
                            3,
                            4,
                            5,
                            6,
                            7
                        ]
                    },
                    "status_text": {
                        "type": "string",
                        "description": "1 Packaged, 2 Shipped, 3 Delivered, 4 Canceled, 5 Void, 6 Ready for Pickup, 7 Picked Up."
                    },
                    "carrier": {
                        "type": "string",
                        "example": "UPS",
                        "nullable": true
                    },
                    "service": {
                        "type": "string",
                        "example": "UPS GROUND",
                        "nullable": true
                    },
                    "account_number": {
                        "type": "string",
                        "description": "Your carrier account when shipped third-party billed.",
                        "nullable": true
                    },
                    "tracking_numbers": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Distinct tracking numbers across boxes."
                    },
                    "ship_to": {
                        "$ref": "#/components/schemas/Contact"
                    },
                    "orders": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "`[{uuid, id}]` orders carried by this shipment."
                    },
                    "boxes": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ShipmentBox"
                        }
                    },
                    "scheduled_pickup_date": {
                        "type": "string",
                        "nullable": true
                    },
                    "pickup_date": {
                        "type": "string",
                        "nullable": true
                    },
                    "scheduled_delivery_date": {
                        "type": "string",
                        "nullable": true
                    },
                    "delivered_at": {
                        "type": "string",
                        "nullable": true
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                }
            },
            "ShipmentBox": {
                "type": "object",
                "properties": {
                    "tracking_number": {
                        "type": "string",
                        "nullable": true
                    },
                    "tracking_url": {
                        "type": "string",
                        "description": "Carrier tracking page for the box.",
                        "nullable": true
                    },
                    "length": {
                        "type": "number",
                        "format": "double",
                        "nullable": true
                    },
                    "width": {
                        "type": "number",
                        "format": "double",
                        "nullable": true
                    },
                    "height": {
                        "type": "number",
                        "format": "double",
                        "nullable": true
                    },
                    "dimension_unit": {
                        "type": "string",
                        "example": "IN",
                        "nullable": true
                    },
                    "weight": {
                        "type": "number",
                        "format": "double",
                        "nullable": true
                    },
                    "weight_unit": {
                        "type": "string",
                        "example": "LBS",
                        "nullable": true
                    },
                    "line_items": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "`[{order_line_item_id, quantity}]` — what is packed in the box."
                    }
                }
            },
            "ShippingOptions": {
                "type": "object",
                "properties": {
                    "carriers": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Carriers accepted in `shipping.carrier`."
                    },
                    "services": {
                        "type": "object",
                        "description": "Carrier → list of accepted `shipping.service` names."
                    },
                    "methods": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "`shipping.method` values this account may use (`rate`, plus `account` / `pickup` when enabled)."
                    },
                    "live_rate_carriers": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Carriers that support `method: rate` (currently UPS)."
                    }
                }
            },
            "ShippingRate": {
                "type": "object",
                "properties": {
                    "carrier": {
                        "type": "string",
                        "example": "UPS"
                    },
                    "service": {
                        "type": "string",
                        "description": "Pass as `shipping.service` on the order.",
                        "example": "UPS GROUND"
                    },
                    "service_code": {
                        "type": "string",
                        "example": "03"
                    },
                    "amount": {
                        "type": "integer",
                        "description": "Cents (`currency` USD); what the order will bill for shipping. `0` for delayed-billing accounts."
                    },
                    "estimated_days": {
                        "type": "integer",
                        "description": "Business days in transit after pickup."
                    },
                    "estimated_delivery_date": {
                        "type": "string",
                        "description": "Y-m-d.",
                        "nullable": true
                    }
                }
            },
            "ShippingRates": {
                "type": "object",
                "properties": {
                    "carrier": {
                        "type": "string",
                        "example": "UPS"
                    },
                    "pickup_date": {
                        "type": "string",
                        "format": "date",
                        "description": "Production ship date used for rating."
                    },
                    "turn_days": {
                        "type": "integer"
                    },
                    "subtotal_amount": {
                        "type": "integer",
                        "description": "Cents. Merchandise subtotal used as declared value."
                    },
                    "currency": {
                        "type": "string",
                        "description": "Always `USD`; all amounts are integer cents."
                    },
                    "rates": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/ShippingRate"
                        },
                        "description": "Sorted cheapest first."
                    }
                }
            },
            "ShippingRatesRequest": {
                "type": "object",
                "properties": {
                    "ship_to": {
                        "$ref": "#/components/schemas/ShipTo"
                    },
                    "line_items": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/LineItemRequest"
                        }
                    }
                },
                "required": [
                    "ship_to",
                    "line_items"
                ]
            },
            "ShippingRequest": {
                "type": "object",
                "properties": {
                    "method": {
                        "type": "string",
                        "description": "`rate` — bill a live UPS rate on the order (quote first with `POST /v1/shipping/rates`); `account` — ship on your own carrier account (account must have shipper numbers enabled); `pickup` — local pickup (account must have local pickup enabled).",
                        "enum": [
                            "rate",
                            "account",
                            "pickup"
                        ],
                        "default": "rate"
                    },
                    "carrier": {
                        "type": "string",
                        "description": "Carrier name. Only `UPS` supports `rate`.",
                        "default": "UPS"
                    },
                    "service": {
                        "type": "string",
                        "description": "Service name exactly as returned by `GET /v1/shipping/options` or `POST /v1/shipping/rates` (e.g. `UPS GROUND`). Required unless `method` is `pickup`.",
                        "example": "UPS GROUND"
                    },
                    "account_number": {
                        "type": "string",
                        "description": "Your carrier account number (required for `account`)."
                    }
                }
            },
            "Ticket": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string"
                    },
                    "id": {
                        "type": "string",
                        "description": "Zero-padded ticket number shown in the admin console, e.g. `0057452`."
                    },
                    "title": {
                        "type": "string"
                    },
                    "summary": {
                        "type": "string",
                        "description": "Ticket body HTML. Listing returns it truncated to 500 characters.",
                        "nullable": true
                    },
                    "type": {
                        "type": "integer",
                        "enum": [
                            1,
                            2,
                            3,
                            4,
                            5,
                            6,
                            7,
                            8,
                            9,
                            10,
                            11,
                            12
                        ]
                    },
                    "type_text": {
                        "type": "string",
                        "description": "1 Article, 2 Bug, 3 Complaint, 4 Corrective Action, 5 Discussion, 6 Feature Request, 7 Investigation, 8 Machine Error, 9 Opportunity, 10 Project, 11 Resource, 12 Task."
                    },
                    "status": {
                        "type": "integer",
                        "enum": [
                            1,
                            2,
                            3,
                            4,
                            5,
                            6,
                            7,
                            8,
                            9,
                            10,
                            11,
                            12,
                            13,
                            14,
                            15
                        ]
                    },
                    "status_text": {
                        "type": "string",
                        "description": "1 Active, 2 Closed, 3 Completed, 4 Draft, 5 Dropped, 6 Implemented, 7 Investigating, 8 On-Hold, 9 Open, 10 Planned, 11 Published, 12 Rejected, 13 Resolved, 14 Submitted, 15 Testing."
                    },
                    "priority": {
                        "type": "integer",
                        "enum": [
                            1,
                            2,
                            3,
                            4,
                            127
                        ]
                    },
                    "priority_text": {
                        "type": "string",
                        "description": "1 High, 2 Medium, 3 Low, 4 Shelved, 127 None."
                    },
                    "classification": {
                        "type": "integer",
                        "description": "Staff keys only. 1 Top Secret, 2 Secret, 3 Confidential, 126 Declassified, 127 Unclassified.",
                        "nullable": true
                    },
                    "classification_text": {
                        "type": "string",
                        "description": "Staff keys only.",
                        "nullable": true
                    },
                    "is_private": {
                        "type": "boolean",
                        "description": "Staff keys only; customer keys never see private tickets."
                    },
                    "due_at": {
                        "type": "string",
                        "description": "Server-time `Y-m-d H:i:s`.",
                        "nullable": true
                    },
                    "is_all_day": {
                        "type": "boolean",
                        "description": "Whether `due_at` is a whole-day deadline."
                    },
                    "knowledgebase_url": {
                        "type": "string",
                        "description": "Public article URL when the ticket is a Published Article tagged `knowledgebase` or `faq`.",
                        "nullable": true
                    },
                    "knowledgebase_preview_url": {
                        "type": "string",
                        "description": "For every Article (`type: 1`, any status / tags): `knowledgebase/<slug>/?preview=<ticket uuid>` renders the page exactly as it will look once published, with a \"Preview\" badge. Share only with people who may see the draft — the uuid is the credential.",
                        "nullable": true
                    },
                    "parent_ticket": {
                        "type": "object",
                        "description": "`{uuid, title}` of the parent ticket.",
                        "nullable": true
                    },
                    "order": {
                        "type": "object",
                        "description": "`{uuid, id}` of the linked order.",
                        "nullable": true
                    },
                    "artwork": {
                        "type": "object",
                        "description": "`{uuid, name, tin}` of the linked artwork.",
                        "nullable": true
                    },
                    "item": {
                        "type": "object",
                        "description": "Staff keys only. `{uuid, name}` of the linked warehouse item.",
                        "nullable": true
                    },
                    "tags": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Tag names."
                    },
                    "customer": {
                        "type": "object",
                        "description": "Staff keys only. `{uuid, organization, name}` of the affected customer account.",
                        "nullable": true
                    },
                    "assignee": {
                        "type": "object",
                        "description": "`{uuid, name}` of the staff member working the ticket.",
                        "nullable": true
                    },
                    "project_manager": {
                        "type": "object",
                        "description": "Staff keys only. `{uuid, name}`.",
                        "nullable": true
                    },
                    "delegator": {
                        "type": "object",
                        "description": "Staff keys only. `{uuid, name}` of whoever assigned the ticket.",
                        "nullable": true
                    },
                    "creator": {
                        "type": "object",
                        "description": "Staff keys only. `{uuid, name}`.",
                        "nullable": true
                    },
                    "followers": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TicketUser"
                        },
                        "description": "Staff keys, detail only."
                    },
                    "messages": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TicketMessage"
                        },
                        "description": "Detail only. Chronological thread — customer keys see their own messages and staff replies sent to them."
                    },
                    "files": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TicketFile"
                        },
                        "description": "Detail only. Attachments on the ticket itself (customer keys: the account's own uploads)."
                    },
                    "children": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Detail only. `[{uuid, title, status, status_text}]` of child tickets visible to the account."
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                }
            },
            "TicketFile": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "mimetype": {
                        "type": "string",
                        "nullable": true
                    },
                    "size": {
                        "type": "integer",
                        "description": "Bytes.",
                        "nullable": true
                    },
                    "download": {
                        "type": "string",
                        "description": "Authenticated download URL (`GET /v1/tickets/:uuid/files/:fuuid/download`)."
                    },
                    "url": {
                        "type": "string",
                        "description": "Public URL on the store domain for knowledgebase Article assets (`/assets/knowledgebase/<ticket uuid>/<name>`); null for private support-ticket attachments.",
                        "nullable": true
                    },
                    "created_at": {
                        "type": "string"
                    }
                }
            },
            "TicketMessage": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string"
                    },
                    "sender": {
                        "type": "object",
                        "description": "`{uuid, name}` of the author (null for inbound email / system events).",
                        "nullable": true
                    },
                    "from": {
                        "type": "string",
                        "description": "Email display name for inbound mail.",
                        "nullable": true
                    },
                    "subject": {
                        "type": "string",
                        "nullable": true
                    },
                    "body": {
                        "type": "string",
                        "description": "Message body HTML.",
                        "nullable": true
                    },
                    "is_system": {
                        "type": "boolean",
                        "description": "True for automated thread events."
                    },
                    "files": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TicketFile"
                        },
                        "description": "Attachments on this reply."
                    },
                    "created_at": {
                        "type": "string"
                    }
                }
            },
            "TicketTag": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    }
                }
            },
            "TicketUser": {
                "type": "object",
                "properties": {
                    "uuid": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    }
                }
            },
            "VerifyRequest": {
                "type": "object",
                "properties": {
                    "amount1": {
                        "type": "integer",
                        "description": "First micro-deposit in cents (1–100), e.g. `32` for $0.32.",
                        "example": 32
                    },
                    "amount2": {
                        "type": "integer",
                        "description": "Second micro-deposit in cents (1–100).",
                        "example": 45
                    }
                },
                "required": [
                    "amount1",
                    "amount2"
                ]
            },
            "WebhookEnvelope": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Delivery UUID (unique per event delivery)."
                    },
                    "type": {
                        "type": "string",
                        "description": "Event type, e.g. order.created."
                    },
                    "created": {
                        "type": "integer",
                        "description": "Unix timestamp the event was emitted."
                    },
                    "data": {
                        "type": "object",
                        "description": "`{ \"object\": {...} }` — the object payload for the event."
                    }
                }
            }
        },
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "bearerFormat": "sk_<env>_<64 chars>"
            }
        }
    },
    "webhooks": {
        "order.created": {
            "post": {
                "summary": "An order was placed (checkout or API).",
                "tags": [
                    "Webhooks: Orders"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookEnvelope"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Return any 2xx to acknowledge."
                    }
                }
            }
        },
        "order.status_changed": {
            "post": {
                "summary": "An order moved to a new status.",
                "tags": [
                    "Webhooks: Orders"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookEnvelope"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Return any 2xx to acknowledge."
                    }
                }
            }
        },
        "order.shipped": {
            "post": {
                "summary": "All shipments for an order have been created.",
                "tags": [
                    "Webhooks: Orders"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookEnvelope"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Return any 2xx to acknowledge."
                    }
                }
            }
        },
        "order.canceled": {
            "post": {
                "summary": "An order was canceled.",
                "tags": [
                    "Webhooks: Orders"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookEnvelope"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Return any 2xx to acknowledge."
                    }
                }
            }
        },
        "shipment.created": {
            "post": {
                "summary": "A shipment (with carrier + tracking number) was created.",
                "tags": [
                    "Webhooks: Shipments"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookEnvelope"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Return any 2xx to acknowledge."
                    }
                }
            }
        },
        "shipment.tracking_updated": {
            "post": {
                "summary": "Carrier tracking status changed for a shipment.",
                "tags": [
                    "Webhooks: Shipments"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookEnvelope"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Return any 2xx to acknowledge."
                    }
                }
            }
        },
        "artwork.created": {
            "post": {
                "summary": "New artwork was uploaded to the library.",
                "tags": [
                    "Webhooks: Artwork"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookEnvelope"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Return any 2xx to acknowledge."
                    }
                }
            }
        },
        "artwork.preflight_passed": {
            "post": {
                "summary": "Preflight approved the artwork for production.",
                "tags": [
                    "Webhooks: Artwork"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookEnvelope"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Return any 2xx to acknowledge."
                    }
                }
            }
        },
        "artwork.preflight_failed": {
            "post": {
                "summary": "Preflight rejected the artwork; see reasons in data.",
                "tags": [
                    "Webhooks: Artwork"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookEnvelope"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Return any 2xx to acknowledge."
                    }
                }
            }
        },
        "artwork.approval_requested": {
            "post": {
                "summary": "Artwork is waiting on your approval (Pending Customer Approval).",
                "tags": [
                    "Webhooks: Artwork"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookEnvelope"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Return any 2xx to acknowledge."
                    }
                }
            }
        },
        "artwork.archived": {
            "post": {
                "summary": "Artwork was archived.",
                "tags": [
                    "Webhooks: Artwork"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookEnvelope"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Return any 2xx to acknowledge."
                    }
                }
            }
        },
        "proof.ready": {
            "post": {
                "summary": "A proof is ready for review/approval.",
                "tags": [
                    "Webhooks: Artwork"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookEnvelope"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Return any 2xx to acknowledge."
                    }
                }
            }
        },
        "invoice.created": {
            "post": {
                "summary": "An invoice was generated.",
                "tags": [
                    "Webhooks: Invoices"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookEnvelope"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Return any 2xx to acknowledge."
                    }
                }
            }
        },
        "invoice.paid": {
            "post": {
                "summary": "An invoice was paid in full.",
                "tags": [
                    "Webhooks: Invoices"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookEnvelope"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Return any 2xx to acknowledge."
                    }
                }
            }
        },
        "test": {
            "post": {
                "summary": "Sent by the \"Test\" button in Settings → Webhooks.",
                "tags": [
                    "Webhooks: Testing"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/WebhookEnvelope"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Return any 2xx to acknowledge."
                    }
                }
            }
        }
    }
}