{
  "openapi": "3.1.0",
  "info": {
    "title": "RoofClaw Public API",
    "version": "1.0.0",
    "description": "Public agent-facing API for RoofClaw — AI agents for roofing businesses. A division of RBP Consulting Inc.",
    "contact": {
      "name": "Vito Clawleone",
      "email": "vito@roofclaw.com",
      "url": "https://www.roofclaw.com/faq"
    },
    "license": {
      "name": "Proprietary"
    }
  },
  "servers": [
    {
      "url": "https://www.roofclaw.com",
      "description": "Production"
    }
  ],
  "x-service-info": {
    "name": "RoofClaw",
    "categories": ["ai_agents", "roofing", "professional_services", "saas_alternative"],
    "description": "Dedicated, on-premise AI agents for roofing businesses. Hardware + agent shipped to your door.",
    "merchant": {
      "name": "RoofClaw",
      "legal_name": "RBP Consulting Inc.",
      "url": "https://www.roofclaw.com"
    }
  },
  "paths": {
    "/api/acp/checkout_sessions": {
      "post": {
        "summary": "Create an ACP checkout session for the AI Readiness Session",
        "description": "Creates an Agentic Commerce Protocol (ACP) checkout session for the $800 AI Readiness Session — a 60-minute strategy call with Adam Sand. Returns a Stripe Checkout URL the agent or buyer can complete.",
        "operationId": "createReadinessCheckoutSession",
        "x-payment-info": {
          "intent": "charge",
          "method": "stripe",
          "amount": 800.00,
          "currency": "USD",
          "description": "RoofClaw AI Readiness Session — 60 minutes with Adam Sand. Credits toward the Full Build."
        },
        "x-acp": {
          "service": "checkout",
          "note": "This path matches the ACP spec convention POST {api_base_url}/checkout_sessions. The handler is implemented at /api/acp/sessions and routed via vercel.json rewrite."
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "buyer_email": {
                    "type": "string",
                    "format": "email",
                    "description": "Email of the buyer (the roofing business owner)."
                  },
                  "buyer_name": {
                    "type": "string",
                    "description": "Name of the buyer."
                  },
                  "company": {
                    "type": "string",
                    "description": "Buyer's company name."
                  },
                  "agent_id": {
                    "type": "string",
                    "description": "Optional identifier for the calling agent (e.g. ChatGPT, Claude, custom)."
                  },
                  "success_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "Override the default success redirect URL."
                  },
                  "cancel_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "Override the default cancel redirect URL."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Checkout session created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session_id": { "type": "string" },
                    "checkout_url": { "type": "string", "format": "uri" },
                    "amount": { "type": "number" },
                    "currency": { "type": "string" },
                    "expires_at": { "type": "string", "format": "date-time" },
                    "product": { "type": "string", "example": "ai_readiness_session" }
                  },
                  "required": ["session_id", "checkout_url", "amount", "currency"]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "500": {
            "description": "Stripe or server error"
          }
        }
      }
    },
    "/.well-known/acp.json": {
      "get": {
        "summary": "ACP discovery document",
        "description": "Returns the Agentic Commerce Protocol discovery document advertising RoofClaw's payable services.",
        "operationId": "getAcpDiscovery",
        "responses": {
          "200": {
            "description": "ACP discovery JSON",
            "content": { "application/json": {} }
          }
        }
      }
    },
    "/downloads/roofclaw-ads-playbook.md": {
      "get": {
        "summary": "Download the RoofClaw Ads Playbook",
        "description": "Free markdown playbook with 25 copy-paste prompts for running Facebook and Google Ads with a roofing AI marketing agent.",
        "operationId": "getAdsPlaybook",
        "responses": {
          "200": {
            "description": "Markdown content",
            "content": { "text/markdown": {} }
          }
        }
      }
    },
    "/pricing": {
      "get": {
        "summary": "Get RoofClaw pricing",
        "description": "Returns the RoofClaw pricing page describing the $10,000 Full Build, $800 AI Readiness Session, and $99/month Community.",
        "operationId": "getPricing",
        "responses": {
          "200": {
            "description": "HTML pricing page",
            "content": { "text/html": {} }
          }
        }
      }
    }
  }
}
