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

GET
/api/v1/business

Business name, contact, and service-area info.

GET
/api/v1/service-area

Service area; pass ?cityZip= to check coverage.

GET
/api/v1/calculator/meta

Calculator name, assumptions, thresholds, fees.

GET
/api/v1/calculator/input-schema

Machine-readable input schema.

GET
/api/v1/calculator/results-schema

Machine-readable results schema.

POST
/api/v1/calculator/run

Run a repair-or-replace analysis (no PII).

GET
/api/v1/articles

List published insights articles (filters: category, author, type, q).

GET
/api/v1/articles/{slug}

Get a single published article with FAQ.

GET
/api/v1/categories

List content categories with published counts.

GET
/api/v1/faq

List 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.

POST
/api/v1/lead

Store a lead with consent.

POST
/api/v1/booking-request

Store a booking request with consent.

POST
/api/v1/report/email

Email 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.