{
  "openapi": "3.1.0",
  "info": {
    "title": "Boss Queens Collection AI Shopping API",
    "description": "Search and browse premium 100% virgin human hair products from Boss Queens Collection. Wigs (lace front, bob, headband, colored), hair bundles (Brazilian, Peruvian, Indian, Malaysian, Vietnamese), lace frontals, closures, and accessories. All products shipped worldwide from St. Maarten, Caribbean. Free shipping on orders over $100 USD. Supports natural language semantic search powered by vector embeddings.",
    "version": "1.1.0",
    "contact": {
      "name": "Boss Queens Collection",
      "email": "support@bossqueenscollection.com",
      "url": "https://bossqueenscollection.com"
    },
    "x-logo": {
      "url": "https://bossqueenscollection.com/icon-512.png"
    }
  },
  "servers": [
    {
      "url": "https://iwrfexevbiiaikabbbus.supabase.co/functions/v1/ai-shopping-api"
    }
  ],
  "paths": {
    "/products": {
      "get": {
        "operationId": "listProducts",
        "summary": "List all available hair products",
        "description": "Returns available products from the catalog. Filter by type: Wig, Bundles, Frontal, Closure, Accessories.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20,
              "minimum": 1,
              "maximum": 50
            },
            "description": "Max products to return"
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by product type (e.g. Wig, Bundles, Frontal)"
          }
        ],
        "responses": {
          "200": {
            "description": "List of products with pricing, images, variants and direct purchase links"
          }
        }
      }
    },
    "/product/{handle}": {
      "get": {
        "operationId": "getProduct",
        "summary": "Get a single product by its handle",
        "description": "Returns detailed product information including all variants, options, pricing, and images.",
        "parameters": [
          {
            "name": "handle",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Product URL handle (slug)"
          }
        ],
        "responses": {
          "200": {
            "description": "Product details"
          },
          "404": {
            "description": "Product not found"
          }
        }
      }
    },
    "/search": {
      "post": {
        "operationId": "searchProducts",
        "summary": "Semantic search for products using natural language",
        "description": "Search using natural language. Examples: 'blonde bob wig for beginners', 'Brazilian body wave bundles 20 inch', 'glueless lace front under $100', 'protective style for vacation'.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "query"
                ],
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "Natural language search query"
                  },
                  "limit": {
                    "type": "integer",
                    "default": 5,
                    "minimum": 1,
                    "maximum": 20
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Semantically matched products ranked by relevance with similarity scores"
          }
        }
      }
    },
    "/categories": {
      "get": {
        "operationId": "listCategories",
        "summary": "List all product categories with counts",
        "responses": {
          "200": {
            "description": "Product categories and their counts"
          }
        }
      }
    }
  }
}