API & Integration Docs
Build with the OKC HVAC Calculator. A public, versioned REST API (v1.0.0) and an MCP server make the repair-or-replace tool and insights content available to apps, assistants, and AI agents.
Versioned
Every response includes apiVersion and a timestamp.
Consistent
JSON envelope, validation, rate limiting, and CORS on all routes.
Protected writes
Lead, booking, and report endpoints require an API key and consent.
Base URL
https://okchvaccalculator.com/api/v1
Public endpoints
/api/v1/businessBusiness name, contact, and service-area info.
/api/v1/service-areaService area; pass ?cityZip= to check coverage.
/api/v1/calculator/metaCalculator name, assumptions, thresholds, fees.
/api/v1/calculator/input-schemaMachine-readable input schema.
/api/v1/calculator/results-schemaMachine-readable results schema.
/api/v1/calculator/runRun a repair-or-replace analysis (no PII).
/api/v1/articlesList published insights articles (filters: category, author, type, q).
/api/v1/articles/{slug}Get a single published article with FAQ.
/api/v1/categoriesList content categories with published counts.
/api/v1/faqList published FAQ entries.
Protected endpoints
Send your key in the X-API-Key header. These endpoints require explicit user consent (consent: true), which is logged.
/api/v1/leadStore a lead with consent.
/api/v1/booking-requestStore a booking request with consent.
/api/v1/report/emailEmail a decision report to a user with consent.
Example: run an analysis
curl -X POST https://okchvaccalculator.com/api/v1/calculator/run \
-H "Content-Type: application/json" \
-d '{
"systemType": "ac",
"issueType": "not_cooling",
"systemAge": 14,
"repairCostInput": 1800,
"replaceCostInput": 7000
}'MCP server
AI agents can connect to the Model Context Protocol endpoint at https://okchvaccalculator.com/mcp (JSON-RPC 2.0 over HTTP). Available tools:
- get_okc_hvac_business_info
- get_repair_or_replace_tool_info
- run_hvac_repair_or_replace_analysis
- search_hvac_decision_content
- get_hvac_article
- get_okc_hvac_service_area
- submit_covington_lead_request (protected)
- submit_covington_booking_request (protected)
Estimates only. Final diagnosis, equipment recommendations, availability, and pricing require an on-site evaluation.
