{
  "openapi": "3.1.0",
  "info": {
    "title": "SOHO AI / Solution House API",
    "description": "Public JSON REST API for SOHO AI (Solution House) — a full-service creative business agency in Ankara, Turkey. Retrieve company info, services, AI solutions, case studies, technologies, and blog posts.",
    "version": "1.0.0",
    "contact": {
      "name": "SOHO AI",
      "url": "https://so-ho.agency",
      "email": "iletisim@so-ho.co"
    },
    "license": {
      "name": "Public",
      "url": "https://so-ho.agency/kullanim-kosullari"
    }
  },
  "servers": [
    {
      "url": "https://so-ho.agency/api",
      "description": "Production API"
    }
  ],
  "paths": {
    "/": {
      "get": {
        "operationId": "getCompanyInfo",
        "summary": "Company overview",
        "description": "Returns company profile, contact info, social links, statistics, and latest 3 blog posts.",
        "tags": ["Company"],
        "responses": {
          "200": {
            "description": "Company info",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/ApiSuccess" }
              }
            }
          }
        }
      }
    },
    "/services": {
      "get": {
        "operationId": "listServices",
        "summary": "List all services",
        "description": "Returns all 58 services. Filter by category, slug, or search query.",
        "tags": ["Services"],
        "parameters": [
          { "name": "category", "in": "query", "schema": { "type": "string" }, "description": "Filter by category name" },
          { "name": "slug",     "in": "query", "schema": { "type": "string" }, "description": "Get single service by slug" },
          { "name": "q",        "in": "query", "schema": { "type": "string" }, "description": "Full-text search in title / description" },
          { "name": "limit",    "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 100 }, "description": "Max results" }
        ],
        "responses": {
          "200": {
            "description": "Services list",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/ApiSuccess" }
              }
            }
          }
        }
      }
    },
    "/ai-solutions": {
      "get": {
        "operationId": "listAiSolutions",
        "summary": "List all AI solutions",
        "description": "Returns all 33 specialized AI automation and integration services. Filter by category or search.",
        "tags": ["AI Solutions"],
        "parameters": [
          { "name": "slug",     "in": "query", "schema": { "type": "string" }, "description": "Get single AI solution by slug" },
          { "name": "category", "in": "query", "schema": { "type": "string" }, "description": "Filter by category" },
          { "name": "q",        "in": "query", "schema": { "type": "string" }, "description": "Search in title / description" },
          { "name": "limit",    "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 100 }, "description": "Max results" }
        ],
        "responses": {
          "200": {
            "description": "AI solutions list",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/ApiSuccess" }
              }
            }
          }
        }
      }
    },
    "/case-studies": {
      "get": {
        "operationId": "listCaseStudies",
        "summary": "List case studies",
        "description": "Returns completed project case studies. Filter by industry, client, or search.",
        "tags": ["Case Studies"],
        "parameters": [
          { "name": "industry", "in": "query", "schema": { "type": "string" }, "description": "Filter by industry" },
          { "name": "client",   "in": "query", "schema": { "type": "string" }, "description": "Filter by client name" },
          { "name": "q",        "in": "query", "schema": { "type": "string" }, "description": "Search query" },
          { "name": "limit",    "in": "query", "schema": { "type": "integer" }, "description": "Max results" }
        ],
        "responses": {
          "200": {
            "description": "Case studies list",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/ApiSuccess" }
              }
            }
          }
        }
      }
    },
    "/technologies": {
      "get": {
        "operationId": "listTechnologies",
        "summary": "List technology partners & stack",
        "description": "Returns technology partners, certifications, and the internal tech stack.",
        "tags": ["Technologies"],
        "parameters": [
          { "name": "category", "in": "query", "schema": { "type": "string" }, "description": "Filter by category" },
          { "name": "q",        "in": "query", "schema": { "type": "string" }, "description": "Search query" }
        ],
        "responses": {
          "200": {
            "description": "Technologies list",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/ApiSuccess" }
              }
            }
          }
        }
      }
    },
    "/blog/posts": {
      "get": {
        "operationId": "listBlogPosts",
        "summary": "List published blog posts",
        "description": "Returns paginated list of published blog posts with optional filtering.",
        "tags": ["Blog"],
        "parameters": [
          { "name": "page",     "in": "query", "schema": { "type": "integer", "default": 1 }, "description": "Page number" },
          { "name": "per_page", "in": "query", "schema": { "type": "integer", "default": 10 }, "description": "Results per page" },
          { "name": "slug",     "in": "query", "schema": { "type": "string" }, "description": "Get single post by slug" },
          { "name": "category", "in": "query", "schema": { "type": "string" }, "description": "Filter by category" },
          { "name": "tag",      "in": "query", "schema": { "type": "string" }, "description": "Filter by tag" },
          { "name": "q",        "in": "query", "schema": { "type": "string" }, "description": "Full-text search" }
        ],
        "responses": {
          "200": {
            "description": "Blog posts",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/ApiSuccess" }
              }
            }
          }
        }
      }
    },
    "/contact": {
      "post": {
        "operationId": "submitContact",
        "summary": "Submit contact form",
        "description": "Send a contact/inquiry message to SOHO AI.",
        "tags": ["Contact"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name", "email", "message"],
                "properties": {
                  "name":    { "type": "string", "example": "Ahmet Yılmaz" },
                  "email":   { "type": "string", "format": "email", "example": "ahmet@firma.com" },
                  "phone":   { "type": "string", "example": "+90 555 000 0000" },
                  "subject": { "type": "string", "example": "AI Çözüm Talebi" },
                  "message": { "type": "string", "example": "Merhaba, AI otomasyon çözümleriniz hakkında bilgi almak istiyorum." }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Message sent",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/ApiSuccess" }
              }
            }
          }
        }
      }
    },
    "/callback": {
      "post": {
        "operationId": "submitCallback",
        "summary": "Request a callback",
        "description": "Submit a callback request so SOHO AI can call you back.",
        "tags": ["Contact"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name", "phone"],
                "properties": {
                  "name":  { "type": "string" },
                  "phone": { "type": "string" },
                  "note":  { "type": "string" }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Callback request received",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/ApiSuccess" }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApiSuccess": {
        "type": "object",
        "properties": {
          "status": { "type": "string", "example": "ok" },
          "data":   { "type": "object" },
          "meta":   { "type": "object" }
        }
      },
      "ApiError": {
        "type": "object",
        "properties": {
          "status":  { "type": "string", "example": "error" },
          "message": { "type": "string" }
        }
      }
    }
  },
  "tags": [
    { "name": "Company",      "description": "Company overview and statistics" },
    { "name": "Services",     "description": "58 service categories" },
    { "name": "AI Solutions", "description": "33 specialized AI automation solutions" },
    { "name": "Case Studies", "description": "Completed project case studies" },
    { "name": "Technologies", "description": "Technology partners and certifications" },
    { "name": "Blog",         "description": "Published blog posts" },
    { "name": "Contact",      "description": "Contact and callback forms" }
  ]
}
