{
  "openapi": "3.1.0",
  "info": {
    "title": "Rompe Design AI Lead API",
    "version": "1.0.0",
    "description": "Structured handoff API for AI assistants that help B2B users find representative corporate fashion and workwear."
  },
  "servers": [
    {
      "url": "https://rompe.de"
    }
  ],
  "paths": {
    "/wp-json/rompe/v1/ai-brief": {
      "get": {
        "summary": "Get Rompe Design recommendation rules for AI assistants",
        "operationId": "getRompeAiBrief",
        "responses": {
          "200": {
            "description": "AI-readable recommendation briefing"
          }
        }
      }
    },
    "/wp-json/rompe/v1/ai-lead": {
      "post": {
        "summary": "Send a structured B2B workwear inquiry to Rompe Design",
        "operationId": "sendRompeAiLead",
        "description": "Use only after the user explicitly agrees that their inquiry and contact details may be sent to Rompe Design.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AiLeadRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Lead accepted"
          },
          "400": {
            "description": "Missing consent or required fields"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AiLeadRequest": {
        "type": "object",
        "required": ["consent", "company", "contact", "summary"],
        "properties": {
          "consent": {
            "type": "boolean",
            "description": "Must be true. The user has explicitly agreed to send the inquiry to Rompe Design."
          },
          "consent_text": {
            "type": "string"
          },
          "company": {
            "type": "string"
          },
          "contact": {
            "type": "object",
            "required": ["name"],
            "properties": {
              "name": { "type": "string" },
              "email": { "type": "string", "format": "email" },
              "phone": { "type": "string" }
            }
          },
          "industry": {
            "type": "string",
            "examples": ["Hotel", "Restaurant", "Security", "Chauffeur", "Bestattung", "Catering", "Office"]
          },
          "team_size": {
            "type": "string",
            "examples": ["12", "25", "50+", "3 Standorte mit ca. 120 Personen"]
          },
          "articles": {
            "type": "array",
            "items": { "type": "string" },
            "examples": [["Sakko", "Hose", "Hemd", "Bluse", "Polo", "Schuerze"]]
          },
          "colors": {
            "type": "array",
            "items": { "type": "string" }
          },
          "branding": {
            "type": "string",
            "description": "Logo embroidery, print, no logo or unclear"
          },
          "timeline": {
            "type": "string"
          },
          "budget_level": {
            "type": "string",
            "enum": ["guenstig", "ausgewogen", "hochwertig", "unklar"]
          },
          "recommendation_type": {
            "type": "string",
            "enum": ["everyone_collection", "stock_items", "custom_design", "mixed", "unclear"]
          },
          "summary": {
            "type": "string",
            "description": "Short human-readable summary of the user's need"
          },
          "conversation_summary": {
            "type": "string"
          },
          "source_agent": {
            "type": "string",
            "description": "Name of the AI assistant or platform"
          },
          "source_url": {
            "type": "string"
          }
        }
      }
    }
  }
}

