{
  "openapi": "3.1.0",
  "info": {
    "title": "Vintage Vegas Shirts — Store API",
    "version": "1.0.0",
    "description": "Read-only public catalog API for Vintage Vegas Shirts, exposed via the standard WooCommerce Store API. No authentication required for the documented read endpoints.",
    "contact": {
      "name": "Vintage Vegas Shirts",
      "email": "hello@vintagevegasshirts.com",
      "url": "https://vintagevegasshirts.com/"
    }
  },
  "servers": [
    {
      "url": "https://vintagevegasshirts.com/wp-json/wc/store/v1",
      "description": "WooCommerce Store API"
    }
  ],
  "paths": {
    "/products": {
      "get": {
        "operationId": "listProducts",
        "summary": "List products",
        "description": "Returns a paginated list of products in the catalog.",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "description": "Limit results to those matching a search term.",
            "required": false,
            "schema": { "type": "string" }
          },
          {
            "name": "category",
            "in": "query",
            "description": "Limit results to a specific category id.",
            "required": false,
            "schema": { "type": "integer" }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-based).",
            "required": false,
            "schema": { "type": "integer", "default": 1 }
          },
          {
            "name": "per_page",
            "in": "query",
            "description": "Items per page (max 100).",
            "required": false,
            "schema": { "type": "integer", "default": 10, "maximum": 100 }
          },
          {
            "name": "orderby",
            "in": "query",
            "description": "Sort field.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "date",
                "price",
                "popularity",
                "rating",
                "title",
                "menu_order"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of products.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": { "$ref": "#/components/schemas/Product" }
                }
              }
            }
          }
        }
      }
    },
    "/products/{id}": {
      "get": {
        "operationId": "getProduct",
        "summary": "Get a single product",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": { "type": "integer" }
          }
        ],
        "responses": {
          "200": {
            "description": "A single product.",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Product" }
              }
            }
          },
          "404": {
            "description": "Product not found."
          }
        }
      }
    },
    "/products/categories": {
      "get": {
        "operationId": "listProductCategories",
        "summary": "List product categories",
        "responses": {
          "200": {
            "description": "A list of product categories.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": { "$ref": "#/components/schemas/Category" }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Product": {
        "type": "object",
        "properties": {
          "id": { "type": "integer" },
          "name": { "type": "string" },
          "slug": { "type": "string" },
          "permalink": { "type": "string", "format": "uri" },
          "type": { "type": "string" },
          "description": { "type": "string" },
          "short_description": { "type": "string" },
          "prices": {
            "type": "object",
            "properties": {
              "price": { "type": "string" },
              "regular_price": { "type": "string" },
              "sale_price": { "type": "string" },
              "currency_code": { "type": "string" },
              "currency_minor_unit": { "type": "integer" }
            }
          },
          "images": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": { "type": "integer" },
                "src": { "type": "string", "format": "uri" },
                "alt": { "type": "string" }
              }
            }
          },
          "categories": {
            "type": "array",
            "items": { "$ref": "#/components/schemas/Category" }
          }
        }
      },
      "Category": {
        "type": "object",
        "properties": {
          "id": { "type": "integer" },
          "name": { "type": "string" },
          "slug": { "type": "string" },
          "link": { "type": "string", "format": "uri" }
        }
      }
    }
  }
}
