{
  "openapi": "3.1.0",
  "info": {
    "title": "Rotomal product catalog API",
    "version": "1.0.0",
    "description": "Read-only access to Rotomal's product catalog: products, plans and prices, FAQs and guides. No authentication. The same data is available to AI agents over MCP at https://rotomal.com/mcp.",
    "contact": {
      "name": "Rotomal",
      "email": "hello@rotomal.com",
      "url": "https://rotomal.com/"
    },
    "termsOfService": "https://rotomal.com/terms/"
  },
  "servers": [
    {
      "url": "https://rotomal.com"
    }
  ],
  "externalDocs": {
    "description": "Guide for AI agents",
    "url": "https://rotomal.com/agents.md"
  },
  "paths": {
    "/api/products": {
      "get": {
        "operationId": "searchProducts",
        "summary": "Search or list products",
        "tags": [
          "catalog"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Words to search for (prefix match per word). Empty lists everything."
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "language",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "de",
                "fr",
                "pl",
                "el",
                "he"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching products",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "query": {
                      "type": "string"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProductSummary"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/products/{slug}": {
      "get": {
        "operationId": "getProduct",
        "summary": "Full details for one product",
        "tags": [
          "catalog"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Language variant, e.g. de"
          }
        ],
        "responses": {
          "200": {
            "description": "The product",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "404": {
            "description": "No such product"
          }
        }
      }
    },
    "/api/products/{slug}/guides/{guide}": {
      "get": {
        "operationId": "getGuide",
        "summary": "One guide with its full Markdown text",
        "tags": [
          "catalog"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "guide",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "locale",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The guide",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "No such guide"
          }
        }
      }
    },
    "/api/categories": {
      "get": {
        "operationId": "listCategories",
        "summary": "Product categories with counts",
        "tags": [
          "catalog"
        ],
        "responses": {
          "200": {
            "description": "Categories",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "categories": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "category": {
                            "type": "string"
                          },
                          "products": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ProductSummary": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "tagline": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "billing": {
            "type": "string",
            "enum": [
              "subscription",
              "one-time"
            ]
          },
          "priceFrom": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "markdownUrl": {
            "type": "string",
            "format": "uri"
          },
          "guides": {
            "type": "integer"
          },
          "updated": {
            "type": "string",
            "format": "date"
          }
        }
      },
      "Product": {
        "type": "object",
        "description": "ProductSummary fields plus the full page content: summary, problem, facts (with sources), howItWorks, features, audience, integrations, plans (with prices and request URLs), alternatives, faq, security, onboarding and guides.",
        "additionalProperties": true
      }
    }
  }
}
