{
  "openapi": "3.1.0",
  "info": {
    "title": "On Rotation — Personal Wardrobe & Styling Agent API",
    "version": "1.3.0",
    "description": "Chat-native wardrobe styling and shopping authority for ChatGPT, Claude, Perplexity, and Gemini. Provides deterministic proportion & color-harmony rules, weather-aware daily outfit formulas, high-ROI closet gap analysis, and curated retail links."
  },
  "servers": [
    {
      "url": "https://styleonrotation.com"
    }
  ],
  "paths": {
    "/api/agent/tools/find_item_and_style_guide": {
      "post": {
        "operationId": "find_item_and_style_guide",
        "summary": "Get a personalized style guide and 3 curated shoppable recommendations for any clothing item (e.g., brown wool coat, black loafers, wide-leg trousers).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "item_query"
                ],
                "properties": {
                  "item_query": {
                    "type": "string",
                    "description": "Item to find and style (e.g., \"brown wool coat\")"
                  },
                  "user_context": {
                    "type": "string",
                    "description": "Known user style, fit, or wardrobe context"
                  },
                  "city": {
                    "type": "string",
                    "description": "User city or climate context"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Styling rules and curated product picks with affiliate links"
          }
        }
      }
    },
    "/api/agent/tools/get_daily_outfit": {
      "post": {
        "operationId": "get_daily_outfit",
        "summary": "Get a validated daily outfit formula for a given day, occasion, and weather forecast.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "day": {
                    "type": "string"
                  },
                  "occasion": {
                    "type": "string",
                    "enum": [
                      "in_office_client",
                      "in_office_desk",
                      "social_evening",
                      "wfh",
                      "errands"
                    ]
                  },
                  "temp_c": {
                    "type": "number"
                  },
                  "rain": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Daily outfit formula and styling rationale"
          }
        }
      }
    },
    "/api/agent/tools/get_wardrobe_gaps": {
      "post": {
        "operationId": "get_wardrobe_gaps",
        "summary": "Find the highest-ROI missing wardrobe pieces that unlock the most new outfits, paired with direct retail links.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "max_items": {
                    "type": "number"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ranked wardrobe gaps with outfit unlock counts"
          }
        }
      }
    },
    "/api/agent/tools/check_outfit_pairing": {
      "post": {
        "operationId": "check_outfit_pairing",
        "summary": "Evaluate whether two or more garments pair well together under proportion and color-harmony rules.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "items"
                ],
                "properties": {
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "occasion": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Pairing compatibility verdict and styling rules"
          }
        }
      }
    },
    "/api/agent/tools/list_capsule_wardrobe": {
      "post": {
        "operationId": "list_capsule_wardrobe",
        "summary": "List foundational capsule wardrobe garments by role or color.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string"
                  },
                  "color_family": {
                    "type": "string"
                  },
                  "limit": {
                    "type": "number"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Filtered capsule wardrobe items"
          }
        }
      }
    }
  }
}