{
 "openapi": "3.1.0",
 "info": {
  "title": "Vinx Pest Control agent API",
  "version": "2.0.0",
  "description": "Public API for AI assistants helping a homeowner sign up for Vinx Pest Control (Charleston, Columbia and Greenville SC; Raleigh NC; Virginia Beach VA). Check a ZIP, get plans and prices with a recommendation for the homeowner's pests, see open first-visit days, and create a pre-filled signup link. Agents cannot sign the service agreement or pay: the homeowner opens the link and finishes in a few taps, and nothing is charged until after the first visit. The same tools are available as a remote MCP server at https://vinxpestcontrol.com/api/mcp (Streamable HTTP). No API key needed.",
  "contact": {
   "name": "Vinx Pest Control",
   "email": "info@vinxpestcontrol.com",
   "url": "https://vinxpestcontrol.com/"
  },
  "termsOfService": "https://vinxpestcontrol.com/terms-of-service/"
 },
 "servers": [
  {
   "url": "https://vinxpestcontrol.com"
  }
 ],
 "paths": {
  "/api/agent/service-area": {
   "get": {
    "operationId": "checkServiceArea",
    "summary": "Is this ZIP served, and by which office?",
    "parameters": [
     {
      "name": "zip",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^\\d{5}$"
      },
      "example": "29401"
     }
    ],
    "responses": {
     "200": {
      "description": "served (true/false), branch, office, phone, hours, termite options",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Bad input or ZIP not served"
     }
    }
   }
  },
  "/api/agent/plans": {
   "get": {
    "operationId": "getPlans",
    "summary": "Plans, online prices and the recommended plan for the homeowner's pests",
    "parameters": [
     {
      "name": "pests",
      "in": "query",
      "required": false,
      "description": "Comma-separated: ants, spiders, roaches, mosquitoes, termites, rodents, fleas, bedbugs, wasps, fireants, other",
      "schema": {
       "type": "string"
      },
      "example": "ants,mosquitoes"
     }
    ],
    "responses": {
     "200": {
      "description": "first-service price ($109, $0 due today), monthly prices, coverage, recommendation and notes for termites, German roaches and bed bugs",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Bad input or ZIP not served"
     }
    }
   }
  },
  "/api/agent/availability": {
   "get": {
    "operationId": "getAvailability",
    "summary": "Upcoming first-visit days and arrival windows (Eastern time)",
    "parameters": [
     {
      "name": "zip",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "pattern": "^\\d{5}$"
      },
      "example": "29401"
     },
     {
      "name": "days",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 30,
       "default": 10
      }
     }
    ],
    "responses": {
     "200": {
      "description": "days with morning (8-noon) and/or afternoon (noon-4) windows",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Bad input or ZIP not served"
     }
    }
   }
  },
  "/api/agent/signup-link": {
   "post": {
    "operationId": "createSignupLink",
    "summary": "Create a pre-filled signup link for the homeowner to review, sign and finish",
    "description": "Only send details the homeowner gave you and wants used. The link opens at the first step that still needs them and expires in 7 days. The visit is not booked until the homeowner finishes.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "zip"
        ],
        "properties": {
         "zip": {
          "type": "string"
         },
         "street": {
          "type": "string"
         },
         "city": {
          "type": "string"
         },
         "first_name": {
          "type": "string"
         },
         "last_name": {
          "type": "string"
         },
         "phone": {
          "type": "string"
         },
         "email": {
          "type": "string",
          "format": "email"
         },
         "pests": {
          "type": "array",
          "items": {
           "type": "string",
           "enum": [
            "ants",
            "spiders",
            "roaches",
            "mosquitoes",
            "termites",
            "rodents",
            "fleas",
            "bedbugs",
            "wasps",
            "fireants",
            "other"
           ]
          }
         },
         "plan": {
          "type": "string",
          "enum": [
           "homeguard",
           "plus",
           "platinum"
          ]
         },
         "date": {
          "type": "string",
          "format": "date",
          "description": "From getAvailability"
         },
         "window": {
          "type": "string",
          "enum": [
           "morning",
           "afternoon"
          ]
         },
         "notes": {
          "type": "string",
          "description": "For the technician: gate code, pets, where the problem is"
         }
        }
       },
       "example": {
        "zip": "29401",
        "street": "12 Meeting St",
        "city": "Charleston",
        "first_name": "Jane",
        "last_name": "Doe",
        "phone": "8435550100",
        "email": "jane@example.com",
        "pests": [
         "ants",
         "spiders"
        ],
        "date": "2026-11-02",
        "window": "morning"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "signup_url to give the homeowner, plan, first visit and recommendation",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Bad input or ZIP not served"
     }
    }
   }
  },
  "/api/mcp": {
   "post": {
    "operationId": "mcp",
    "summary": "Remote MCP server (JSON-RPC 2.0, Streamable HTTP) with tools check_service_area, get_plans, get_availability, create_signup_link",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "JSON-RPC response"
     }
    }
   }
  }
 },
 "externalDocs": {
  "description": "Machine-readable plans and service areas",
  "url": "https://vinxpestcontrol.com/plans.json"
 }
}