{
  "openapi": "3.1.0",
  "info": {
    "title": "Lamination Services, Inc. — Wholesale Paper Lamination & Print API",
    "version": "1.0.0",
    "description": "Public zero-authentication REST API (v1) for instant commercial heavy-paper lamination and full-bleed color printing + lamination quotes from Lamination Services, Inc. (2612 Howard Loop, Salado, TX 76571 · (254) 290-6337 · Est. 1998). Versioning policy: URL-prefixed (/api/v1/* with backwards-compatible /api/* aliases) and X-API-Version response headers; breaking changes are announced 90 days in advance via Sunset and Deprecation HTTP headers.",
    "contact": {
      "name": "Sam Belcher — Salado Press Desk",
      "email": "hello@laminationservices.com",
      "url": "https://laminationservices.com/docs/"
    }
  },
  "servers": [
    {
      "url": "https://laminationservices.com/api/v1",
      "description": "Production v1 Wholesale Quote & Intake API (Salado, TX)"
    },
    {
      "url": "https://laminationservices.com/api",
      "description": "Backwards-compatible unversioned alias"
    }
  ],
  "paths": {
    "/catalog": {
      "get": {
        "operationId": "getPaperLaminationCatalog",
        "summary": "List stocked paper sizes, 1.5–10 mil film gauges, wholesale tiers, and presets",
        "description": "Returns all published 5-mil wholesale sheet rates, multi-mil multipliers, equipment dimensions (up to 27 inches wide by continuous roll length), and 1-click calculator presets.",
        "responses": {
          "200": {
            "description": "Complete wholesale rate matrix and Salado plant capabilities",
            "headers": {
              "X-API-Version": { "schema": { "type": "string" }, "description": "Active API version date" },
              "RateLimit-Limit": { "schema": { "type": "integer" }, "description": "Requests allowed per 60s window" },
              "RateLimit-Remaining": { "schema": { "type": "integer" }, "description": "Remaining requests in current window" },
              "RateLimit-Reset": { "schema": { "type": "integer" }, "description": "Seconds until rate-limit window resets" }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/CatalogResponse" }
              }
            }
          },
          "429": { "$ref": "#/components/responses/RateLimited" },
          "500": { "$ref": "#/components/responses/ServerError" }
        }
      }
    },
    "/quote": {
      "get": {
        "operationId": "calculatePaperLaminationQuote",
        "summary": "Calculate exact per-piece and total wholesale cost for Laminate Only or Print + Laminate",
        "description": "Deterministic wholesale quote engine matching the live Salado calculator to the cent. Supports presets or explicit mode, paper size, mil gauge, finish, quantity, and finishing options.",
        "parameters": [
          {
            "name": "preset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": ["menus", "posters", "cards", "placemats", "nametags", "bookmarks", "uber", "trifold", "charts", "prayer", "trade"]
            },
            "description": "Optional 1-click commercial paper product preset"
          },
          {
            "name": "mode",
            "in": "query",
            "required": false,
            "schema": { "type": "string", "enum": ["laminate", "print-laminate"] },
            "description": "laminate (ship flat printed paper sheets to Salado) or print-laminate (full-bleed heavy paper printing + lamination in Salado)"
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": ["2.125x3.375", "4.25x5.5", "5.5x8.5", "8.5x11", "8.5x14", "11x17", "12x18", "18x24", "custom"]
            },
            "description": "Trimmed paper dimensions in inches (or custom up to 27 inches wide)"
          },
          {
            "name": "mil",
            "in": "query",
            "required": false,
            "schema": { "type": "string", "enum": ["1.5", "3", "5", "7", "10"] },
            "description": "Film thickness per side in mils (1 mil = 0.001 inch)"
          },
          {
            "name": "finish",
            "in": "query",
            "required": false,
            "schema": { "type": "string", "enum": ["gloss", "matte"] },
            "description": "Crystal gloss or zero-glare satin matte thermal film"
          },
          {
            "name": "qty",
            "in": "query",
            "required": false,
            "schema": { "type": "integer", "minimum": 25, "maximum": 25000 },
            "description": "Total paper pieces in run (standard minimum 100; custom wide posters 25)"
          },
          {
            "name": "round_corners",
            "in": "query",
            "required": false,
            "schema": { "type": "boolean" },
            "description": "Add 1/4-inch die-rounded safety corners"
          },
          {
            "name": "flush_cut",
            "in": "query",
            "required": false,
            "schema": { "type": "boolean" },
            "description": "Trim flush to paper bleed (false keeps 1/8-inch waterproof sealed lip)"
          },
          {
            "name": "hole_punch",
            "in": "query",
            "required": false,
            "schema": { "type": "boolean" },
            "description": "Add lanyard badge slot or dual headrest hang-tag holes"
          }
        ],
        "responses": {
          "200": {
            "description": "Calculated wholesale unit price, run total, retail savings, and $0-due-today lock template",
            "headers": {
              "X-API-Version": { "schema": { "type": "string" } },
              "RateLimit-Limit": { "schema": { "type": "integer" } },
              "RateLimit-Remaining": { "schema": { "type": "integer" } },
              "RateLimit-Reset": { "schema": { "type": "integer" } }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/QuoteResponse" }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" },
          "500": { "$ref": "#/components/responses/ServerError" }
        }
      }
    },
    "/lead": {
      "post": {
        "operationId": "submitSaladoRateLockOrSampleRequest",
        "summary": "Submit a $0.00-due-today written rate lock, PDF proof request, or free mailed sample pack",
        "description": "Logs a commercial job ticket at 2612 Howard Loop, Salado, TX 76571 with $0.00 due upfront and emails an instant written confirmation receipt to the buyer.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/LeadRequest" }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Job ticket stored and confirmation receipt dispatched",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/LeadResponse" }
              }
            }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" },
          "500": { "$ref": "#/components/responses/ServerError" }
        }
      }
    }
  },
  "components": {
    "responses": {
      "BadRequest": {
        "description": "Invalid request payload or parameters",
        "content": {
          "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } },
          "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } }
        }
      },
      "RateLimited": {
        "description": "Rate limit exceeded; honor Retry-After header",
        "headers": {
          "Retry-After": { "schema": { "type": "integer" }, "description": "Seconds before retrying" }
        },
        "content": {
          "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } },
          "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } }
        }
      },
      "ServerError": {
        "description": "Unexpected server error",
        "content": {
          "application/problem+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } },
          "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } }
        }
      }
    },
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "required": ["ok", "code", "message", "status"],
        "properties": {
          "ok": { "type": "boolean", "const": false },
          "type": { "type": "string", "example": "https://laminationservices.com/docs/#errors" },
          "title": { "type": "string", "example": "Invalid Request" },
          "status": { "type": "integer", "example": 400 },
          "code": { "type": "string", "example": "invalid_json" },
          "message": { "type": "string", "example": "Request body must be valid UTF-8 JSON or multipart/form-data." }
        }
      },
      "CatalogResponse": {
        "type": "object",
        "required": ["ok", "version", "entity", "quantity_tiers", "paper_sizes", "film_gauges", "presets"],
        "properties": {
          "ok": { "type": "boolean" },
          "service": { "type": "string" },
          "version": { "type": "string" },
          "entity": {
            "type": "object",
            "required": ["name", "address", "phone", "email", "max_roll_width_inches", "minimum_order_pieces"],
            "properties": {
              "name": { "type": "string" },
              "parent": { "type": "string" },
              "address": { "type": "string" },
              "phone": { "type": "string" },
              "email": { "type": "string" },
              "max_roll_width_inches": { "type": "number" },
              "max_length": { "type": "string" },
              "minimum_order_pieces": { "type": "integer" },
              "standard_turnaround_hours": { "type": "string" },
              "substrate_policy": { "type": "string" }
            }
          },
          "quantity_tiers": { "type": "array", "items": { "type": "integer" } },
          "volume_contract_rebate_2500_plus_pct": { "type": "integer" },
          "paper_sizes": { "type": "object", "additionalProperties": true },
          "film_gauges": { "type": "object", "additionalProperties": true },
          "presets": { "type": "object", "additionalProperties": true },
          "quote_endpoint": { "type": "string" },
          "openapi_spec": { "type": "string" }
        }
      },
      "QuoteResponse": {
        "type": "object",
        "required": ["ok", "provider", "configuration", "pricing_usd", "turnaround_business_hours", "spec_summary"],
        "properties": {
          "ok": { "type": "boolean" },
          "provider": {
            "type": "object",
            "required": ["name", "address", "phone", "email"],
            "properties": {
              "name": { "type": "string" },
              "address": { "type": "string" },
              "phone": { "type": "string" },
              "email": { "type": "string" },
              "substrate_policy": { "type": "string" }
            }
          },
          "configuration": {
            "type": "object",
            "required": ["mode", "size", "mil_per_side", "finish", "qty", "edge_seal"],
            "properties": {
              "mode": { "type": "string" },
              "size": { "type": "string" },
              "size_label": { "type": "string" },
              "mil_per_side": { "type": "string" },
              "total_polymer_mil": { "type": "number" },
              "finish": { "type": "string" },
              "qty": { "type": "integer" },
              "edge_seal": { "type": "string" },
              "round_corners": { "type": "boolean" },
              "hole_punch": { "type": "boolean" },
              "priority_rush": { "type": "boolean" },
              "blind_ship_kraft_box": { "type": "boolean" }
            }
          },
          "pricing_usd": {
            "type": "object",
            "required": ["currency", "effective_unit_price", "lamination_unit_price", "printing_unit_price", "estimated_total", "due_today_usd"],
            "properties": {
              "currency": { "type": "string" },
              "effective_unit_price": { "type": "number" },
              "lamination_unit_price": { "type": "number" },
              "printing_unit_price": { "type": "number" },
              "lamination_subtotal": { "type": "number" },
              "printing_subtotal": { "type": "number" },
              "finishing_subtotal": { "type": "number" },
              "estimated_total": { "type": "number" },
              "due_today_usd": { "type": "number" },
              "retail_copy_counter_comparison_total": { "type": "number" },
              "estimated_savings_usd": { "type": "number" },
              "estimated_savings_pct": { "type": "integer" }
            }
          },
          "turnaround_business_hours": { "type": "string" },
          "spec_summary": { "type": "string" },
          "lock_quote_action": { "type": "object", "additionalProperties": true }
        }
      },
      "LeadRequest": {
        "type": "object",
        "required": ["name", "email", "orderType", "spec"],
        "properties": {
          "ticketId": { "type": "string", "description": "Optional client-generated ticket reference (e.g. SLD-123456)" },
          "orderType": { "type": "string", "description": "Laminate Only, Print + Laminate Together, or Free Sample Pack" },
          "name": { "type": "string", "description": "Buyer full name and company" },
          "email": { "type": "string", "format": "email", "description": "Work email for instant written receipt and PDF proof" },
          "phone": { "type": "string" },
          "street": { "type": "string" },
          "city": { "type": "string" },
          "state": { "type": "string" },
          "zip": { "type": "string" },
          "spec": { "type": "string", "description": "Configured paper run specification summary" },
          "tradeCode": { "type": "string", "description": "Optional Texas Form 01-339 resale ID or blind-ship account note" }
        }
      },
      "LeadResponse": {
        "type": "object",
        "required": ["ok", "ticketId", "stored", "filesSaved", "receiptSent"],
        "properties": {
          "ok": { "type": "boolean" },
          "ticketId": { "type": "string" },
          "stored": { "type": "boolean" },
          "filesSaved": { "type": "integer" },
          "receiptSent": { "type": "boolean" }
        }
      }
    }
  }
}
