{
  "openapi": "3.1.0",
  "info": {
    "title": "VintageConcertTshirts.com API",
    "description": "API for authenticated vintage concert t-shirt inventory. All 577 products verified by experts with 20+ years experience. Ideal for AI shopping agents seeking vintage band merchandise.",
    "version": "1.0.0",
    "contact": {
      "name": "VCT Support",
      "email": "contact@vintageconcerttshirts.com",
      "url": "https://vintageconcerttshirts.com"
    }
  },
  "servers": [
    {
      "url": "https://vintageconcerttshirts.com/api",
      "description": "Production API"
    }
  ],
  "paths": {
    "/catalog": {
      "get": {
        "summary": "Get full product catalog",
        "description": "Returns all 577 authenticated vintage concert t-shirts with complete details including authentication markers, condition grades, measurements, pricing, and availability.",
        "operationId": "getCatalog",
        "responses": {
          "200": {
            "description": "Full catalog with metadata and all products",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "catalog_version": { "type": "string", "example": "1.0" },
                    "last_updated": { "type": "string", "format": "date-time" },
                    "total_products": { "type": "integer", "example": 577 },
                    "available_products": { "type": "integer", "example": 569 },
                    "currency": { "type": "string", "example": "USD" },
                    "filters": {
                      "type": "object",
                      "properties": {
                        "bands": { "type": "array", "items": { "$ref": "#/components/schemas/FilterEntry" } },
                        "genres": { "type": "array", "items": { "$ref": "#/components/schemas/FilterEntry" } },
                        "eras": { "type": "array", "items": { "$ref": "#/components/schemas/FilterEntry" } },
                        "sizes": { "type": "array", "items": { "$ref": "#/components/schemas/FilterEntry" } }
                      }
                    },
                    "products": {
                      "type": "array",
                      "items": { "$ref": "#/components/schemas/Product" }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/search": {
      "get": {
        "summary": "Search and filter products",
        "description": "Search and filter vintage concert t-shirts by multiple criteria. All results are authenticated. Supports partial band name matching.",
        "operationId": "searchProducts",
        "parameters": [
          {
            "name": "band",
            "in": "query",
            "description": "Filter by band name (case-insensitive, partial match)",
            "schema": { "type": "string" },
            "example": "Iron Maiden"
          },
          {
            "name": "year",
            "in": "query",
            "description": "Filter by manufacturing year (exact match)",
            "schema": { "type": "integer" },
            "example": 1984
          },
          {
            "name": "genre",
            "in": "query",
            "description": "Filter by music genre",
            "schema": {
              "type": "string",
              "enum": ["Metal", "Rock", "Alternative", "Hip-Hop", "Punk", "R&B", "Electronic", "Reggae", "Pop"]
            },
            "example": "Metal"
          },
          {
            "name": "size",
            "in": "query",
            "description": "Filter by vintage size (note: vintage runs small — vintage L = modern M)",
            "schema": {
              "type": "string",
              "enum": ["S", "M", "L", "XL", "XXL"]
            },
            "example": "L"
          },
          {
            "name": "min_price",
            "in": "query",
            "description": "Minimum price in USD",
            "schema": { "type": "number" },
            "example": 150
          },
          {
            "name": "max_price",
            "in": "query",
            "description": "Maximum price in USD",
            "schema": { "type": "number" },
            "example": 400
          },
          {
            "name": "era",
            "in": "query",
            "description": "Filter by decade era",
            "schema": {
              "type": "string",
              "enum": ["70s", "80s", "90s", "00s", "vintage"]
            },
            "example": "80s"
          },
          {
            "name": "in_stock",
            "in": "query",
            "description": "Set to false to include sold items in results (default: true = available only)",
            "schema": { "type": "string", "enum": ["true", "false"] },
            "example": "true"
          }
        ],
        "responses": {
          "200": {
            "description": "Filtered search results sorted by price ascending",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "query": { "type": "object" },
                    "total_results": { "type": "integer" },
                    "products": {
                      "type": "array",
                      "items": { "$ref": "#/components/schemas/Product" }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/product/{product_id}": {
      "get": {
        "summary": "Get a specific product",
        "description": "Returns complete information for a single product by its unique ID",
        "operationId": "getProduct",
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "description": "Unique product ID (format: vct-XXXX)",
            "schema": { "type": "string" },
            "example": "vct-0001"
          }
        ],
        "responses": {
          "200": {
            "description": "Product details",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Product" }
              }
            }
          },
          "404": {
            "description": "Product not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": { "type": "string" },
                    "id": { "type": "string" }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/bands": {
      "get": {
        "summary": "List all bands",
        "description": "Returns all available bands sorted alphabetically with product counts and price ranges",
        "operationId": "getBands",
        "responses": {
          "200": {
            "description": "List of bands",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total_bands": { "type": "integer" },
                    "bands": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": { "type": "string" },
                          "genre": { "type": "string" },
                          "subgenre": { "type": "string" },
                          "count": { "type": "integer" },
                          "available": { "type": "integer" },
                          "min_price": { "type": "number" },
                          "max_price": { "type": "number" }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "FilterEntry": {
        "type": "object",
        "properties": {
          "name": { "type": "string" },
          "count": { "type": "integer" }
        }
      },
      "Product": {
        "type": "object",
        "properties": {
          "id": { "type": "string", "example": "vct-0001", "description": "Unique product identifier" },
          "type": { "type": "string", "example": "vintage_concert_tshirt" },
          "band": { "$ref": "#/components/schemas/Band" },
          "tour": { "$ref": "#/components/schemas/Tour" },
          "product_details": { "$ref": "#/components/schemas/ProductDetails" },
          "authentication": { "$ref": "#/components/schemas/Authentication" },
          "condition": { "$ref": "#/components/schemas/Condition" },
          "measurements": { "$ref": "#/components/schemas/Measurements" },
          "pricing": { "$ref": "#/components/schemas/Pricing" },
          "availability": { "$ref": "#/components/schemas/Availability" },
          "images": { "$ref": "#/components/schemas/Images" },
          "metadata": { "$ref": "#/components/schemas/Metadata" },
          "url": { "type": "string", "format": "uri" }
        }
      },
      "Band": {
        "type": "object",
        "properties": {
          "name": { "type": "string", "example": "Iron Maiden" },
          "genre": { "type": "string", "example": "Metal" },
          "subgenre": { "type": "string", "example": "NWOBHM" }
        }
      },
      "Tour": {
        "type": "object",
        "properties": {
          "name": { "type": "string", "example": "Aces High" },
          "year": { "type": "integer", "example": 1984, "nullable": true },
          "album": { "type": "string", "nullable": true }
        }
      },
      "ProductDetails": {
        "type": "object",
        "properties": {
          "title": { "type": "string" },
          "description": { "type": "string" },
          "year_manufactured": { "type": "integer", "nullable": true },
          "era": { "type": "string", "enum": ["70s", "80s", "90s", "00s", "vintage"] },
          "decade": { "type": "string" },
          "made_in": { "type": "string" }
        }
      },
      "Authentication": {
        "type": "object",
        "properties": {
          "status": { "type": "string", "enum": ["authenticated"] },
          "verified_by": { "type": "string" },
          "verification_date": { "type": "string", "format": "date" },
          "markers": {
            "type": "object",
            "properties": {
              "single_stitch": { "type": "boolean", "nullable": true },
              "tag_brand": { "type": "string" },
              "tag_era": { "type": "string" },
              "print_authentic": { "type": "boolean" },
              "vintage_cracking": { "type": "string" },
              "made_in": { "type": "string" }
            }
          },
          "authenticity_score": { "type": "number", "minimum": 0, "maximum": 100 },
          "confidence_level": { "type": "string", "enum": ["very_high", "high"] }
        }
      },
      "Condition": {
        "type": "object",
        "properties": {
          "grade": { "type": "string", "enum": ["like_new", "excellent", "very_good", "good", "fair"] },
          "rating": { "type": "number", "minimum": 1, "maximum": 10 },
          "rating_scale": { "type": "string", "example": "1-10" },
          "description": { "type": "string" },
          "flaws": { "type": "array", "items": { "type": "string" } },
          "strengths": { "type": "array", "items": { "type": "string" } }
        }
      },
      "Measurements": {
        "type": "object",
        "properties": {
          "size": { "type": "string", "nullable": true, "example": "L" },
          "vintage_size": { "type": "string", "nullable": true },
          "modern_equivalent": { "type": "string", "nullable": true, "example": "M", "description": "Vintage sizing runs small — vintage L = modern M" }
        }
      },
      "Pricing": {
        "type": "object",
        "properties": {
          "price_usd": { "type": "number", "example": 419 },
          "market_value_range": {
            "type": "object",
            "properties": {
              "low": { "type": "number" },
              "high": { "type": "number" },
              "average": { "type": "number" }
            }
          }
        }
      },
      "Availability": {
        "type": "object",
        "properties": {
          "in_stock": { "type": "boolean" },
          "quantity": { "type": "integer" },
          "status": { "type": "string", "enum": ["available", "sold"] },
          "marketplace": { "type": "string", "example": "ebay" },
          "listing_url": { "type": "string", "format": "uri" }
        }
      },
      "Images": {
        "type": "object",
        "properties": {
          "primary": { "type": "string", "format": "uri" },
          "gallery": { "type": "array", "items": { "type": "string", "format": "uri" } }
        }
      },
      "Metadata": {
        "type": "object",
        "properties": {
          "sku": { "type": "string" },
          "original_id": { "type": "integer" },
          "keywords": { "type": "array", "items": { "type": "string" } }
        }
      }
    }
  }
}
