{
  "openapi": "3.1.0",
  "info": {
    "title": "Illumina Backdrops Product API",
    "description": "Public API for browsing Illumina Backdrops digital photo background products. Returns product catalog with prices, categories, images, and availability.",
    "version": "1.0.0",
    "contact": {
      "name": "Illumina Backdrops",
      "url": "https://illuminabackdrops.com/contact"
    }
  },
  "servers": [
    {
      "url": "https://illuminabackdrops.com",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/products": {
      "get": {
        "operationId": "listProducts",
        "summary": "List all products",
        "description": "Returns all active digital background products with prices, descriptions, categories, ratings, and images.",
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "description": "Filter by category slug (e.g., sports, maternity, graduation)",
            "schema": { "type": "string" }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Filter by product type",
            "schema": { "type": "string", "enum": ["standard", "zoom"] }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sort order",
            "schema": { "type": "string", "enum": ["newest", "best-selling", "price"] }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of products to return",
            "schema": { "type": "integer", "default": 100 }
          }
        ],
        "responses": {
          "200": {
            "description": "List of products",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Product"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Product": {
        "type": "object",
        "properties": {
          "slug": { "type": "string", "description": "URL-friendly product identifier" },
          "name": { "type": "string", "description": "Product display name" },
          "tagline": { "type": "string", "description": "Short product description" },
          "price": { "type": "integer", "description": "Price in cents (e.g., 2499 = $24.99)" },
          "compareAtPrice": { "type": "integer", "description": "Original price in cents for strikethrough display" },
          "categories": { "type": "array", "items": { "type": "string" }, "description": "Category slugs" },
          "type": { "type": "string", "enum": ["standard", "zoom"], "description": "Product type" },
          "url": { "type": "string", "format": "uri", "description": "Full product page URL" },
          "images": {
            "type": "object",
            "properties": {
              "hero": { "type": "string", "format": "uri", "description": "Hero image URL" }
            }
          },
          "includes": { "type": "array", "items": { "type": "string" }, "description": "What's included in the pack" },
          "rating": { "type": "number", "description": "Average star rating" },
          "reviewCount": { "type": "integer", "description": "Number of reviews" },
          "soldCount": { "type": "integer", "description": "Total units sold" },
          "ai": {
            "type": "object",
            "properties": {
              "shortDescription": { "type": "string" },
              "keywords": { "type": "array", "items": { "type": "string" } },
              "idealFor": { "type": "array", "items": { "type": "string" } },
              "compatibleWith": { "type": "array", "items": { "type": "string" } }
            }
          }
        }
      }
    }
  }
}
