{
 "openapi": "3.1.0",
 "info": {
  "title": "Florida Load Calcs API",
  "version": "1.0.0",
  "description": "Quote and order Florida residential energy calcs (Form R405/R402) and Manual J, S & D. Prices come from the same pricing code as the website calculator. Orders return a secure checkout URL for the human buyer. Florida only. No captcha; rate limited per IP and per X-API-Key. Florida Load Calcs is a DBA of Designda Inc.",
  "contact": {
   "name": "Florida Load Calcs",
   "email": "hello@floridaloadcalcs.com",
   "url": "https://floridaloadcalcs.com/for-ai-agents/"
  }
 },
 "servers": [
  {
   "url": "https://floridaloadcalcs.com"
  }
 ],
 "paths": {
  "/api/v1/pricing": {
   "get": {
    "operationId": "getPricing",
    "summary": "Published price list, delivery tiers, clock rules and holidays",
    "responses": {
     "200": {
      "description": "Pricing config",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/quote": {
   "post": {
    "operationId": "getQuote",
    "summary": "Exact price and delivery window",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/QuoteInput"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Quote (state instant or custom)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Quote"
        }
       }
      }
     },
     "422": {
      "description": "Invalid input",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/orders": {
   "post": {
    "operationId": "createOrder",
    "summary": "Create an order; returns a secure checkout URL the buyer opens to pay",
    "parameters": [
     {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
       "type": "string",
       "minLength": 8,
       "maxLength": 128
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "quote",
         "contact"
        ],
        "properties": {
         "quote": {
          "$ref": "#/components/schemas/QuoteInput"
         },
         "contact": {
          "type": "object",
          "required": [
           "name",
           "email",
           "phone"
          ],
          "properties": {
           "name": {
            "type": "string"
           },
           "email": {
            "type": "string",
            "format": "email"
           },
           "phone": {
            "type": "string",
            "description": "US phone, 10 digits; normalized to E.164 (+1XXXXXXXXXX)"
           },
           "company": {
            "type": "string"
           }
          }
         },
         "project": {
          "type": "object",
          "properties": {
           "address": {
            "type": "string"
           },
           "notes": {
            "type": "string"
           }
          }
         },
         "upload_ids": {
          "type": "array",
          "items": {
           "type": "string"
          },
          "description": "Required unless plan_url is given: at least one ready PDF or DWG plan from /api/v1/uploads"
         },
         "plan_url": {
          "type": "string",
          "format": "uri",
          "description": "Public https link to a PDF/DWG/DXF/ZIP plan set; fetched once, validated, stored privately"
         },
         "inputs": {
          "type": "object",
          "description": "Answers the energy calc needs when the plans don't show them. Critical: project.address or orientation, and windows.",
          "properties": {
           "orientation": {
            "type": "string",
            "enum": [
             "N",
             "NE",
             "E",
             "SE",
             "S",
             "SW",
             "W",
             "NW"
            ]
           },
           "windows": {
            "type": "string",
            "enum": [
             "schedule",
             "drawn"
            ]
           },
           "walls": {
            "type": "string",
            "enum": [
             "cbs",
             "frame",
             "not_sure"
            ],
            "default": "not_sure"
           },
           "ducts": {
            "type": "string",
            "enum": [
             "attic",
             "conditioned",
             "not_sure"
            ],
            "default": "not_sure"
           }
          }
         },
         "sms_consent": {
          "type": "object",
          "description": "Optional. Only send opt_in=true when the human ticked the SMS consent box themselves.",
          "properties": {
           "opt_in": {
            "type": "boolean"
           },
           "phone": {
            "type": "string"
           },
           "page_url": {
            "type": "string"
           }
          }
         }
        }
       }
      }
     }
    },
    "responses": {
     "201": {
      "description": "Created",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Order"
        }
       }
      }
     },
     "200": {
      "description": "Idempotent replay",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Order"
        }
       }
      }
     },
     "422": {
      "description": "Invalid input, plans_required, plans_unreadable or critical_inputs_missing (error.missing lists what to send)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Rate limited",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/uploads": {
   "post": {
    "operationId": "createUpload",
    "summary": "Start a plan upload; returns a presigned PUT url and a complete_url",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "name",
         "size"
        ],
        "properties": {
         "name": {
          "type": "string"
         },
         "size": {
          "type": "integer"
         },
         "content_type": {
          "type": "string"
         }
        }
       }
      }
     }
    },
    "responses": {
     "201": {
      "description": "Upload slot",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "413": {
      "description": "Too large",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "415": {
      "description": "File type not accepted",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/uploads/{id}/complete": {
   "post": {
    "operationId": "completeUpload",
    "summary": "Validate (magic bytes, executable and archive checks), read the plan and mark the upload ready",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Upload record with detected sqft/systems",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "422": {
      "description": "Rejected file",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/orders/{id}": {
   "get": {
    "operationId": "getOrder",
    "summary": "Order status (no personal data)",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Order"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "QuoteInput": {
    "type": "object",
    "required": [
     "package"
    ],
    "description": "Send sqft (exact conditioned area) or size_band.",
    "properties": {
     "package": {
      "type": "string",
      "enum": [
       "energy",
       "full",
       "sealed"
      ]
     },
     "sqft": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100000
     },
     "size_band": {
      "type": "string",
      "enum": [
       "up_to_2500",
       "2501_4000",
       "4001_6000",
       "over_6000"
      ],
      "description": "Use when the exact area is unknown; over_6000 is a custom quote"
     },
     "systems": {
      "type": "integer",
      "minimum": 1,
      "maximum": 20,
      "default": 1
     },
     "speed": {
      "type": "string",
      "enum": [
       "standard",
       "expedited"
      ],
      "default": "standard"
     },
     "county": {
      "type": "string",
      "description": "Florida county (optional; one statewide price)"
     },
     "intake_at": {
      "type": "string",
      "description": "YYYY-MM-DDTHH:MM Eastern time; defaults to now"
     }
    }
   },
   "Quote": {
    "type": "object",
    "properties": {
     "state": {
      "type": "string",
      "enum": [
       "instant",
       "custom"
      ]
     },
     "currency": {
      "type": "string"
     },
     "total": {
      "type": [
       "integer",
       "null"
      ]
     },
     "total_cents": {
      "type": "integer"
     },
     "line_items": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/LineItem"
      }
     },
     "delivery": {
      "$ref": "#/components/schemas/Delivery"
     },
     "custom_reasons": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "package": {
      "type": "object"
     },
     "inputs": {
      "type": "object"
     },
     "county": {
      "type": [
       "object",
       "null"
      ]
     },
     "expedited_available": {
      "type": "object"
     },
     "message": {
      "type": "string"
     }
    }
   },
   "LineItem": {
    "type": "object",
    "properties": {
     "label": {
      "type": "string"
     },
     "amount": {
      "type": "integer"
     },
     "amount_cents": {
      "type": "integer"
     }
    }
   },
   "Delivery": {
    "type": "object",
    "properties": {
     "speed": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "label": {
      "type": "string"
     },
     "surcharge": {
      "type": "integer"
     },
     "clock_start_et": {
      "type": "string"
     },
     "earliest_et": {
      "type": "string"
     },
     "latest_et": {
      "type": "string"
     },
     "window_label": {
      "type": "string"
     },
     "timezone": {
      "type": "string"
     },
     "rule": {
      "type": "string"
     },
     "projected": {
      "type": "boolean"
     },
     "note": {
      "type": "string"
     }
    }
   },
   "Order": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "status": {
      "type": "string",
      "enum": [
       "awaiting_payment",
       "paid",
       "custom_quote_requested",
       "in_progress",
       "delivered"
      ]
     },
     "total": {
      "type": [
       "integer",
       "null"
      ]
     },
     "currency": {
      "type": "string"
     },
     "package": {
      "type": "string"
     },
     "county": {
      "type": [
       "string",
       "null"
      ]
     },
     "delivery_speed": {
      "type": "string"
     },
     "plans_received": {
      "type": "boolean"
     },
     "turnaround": {
      "oneOf": [
       {
        "$ref": "#/components/schemas/Delivery"
       },
       {
        "type": "null"
       }
      ]
     },
     "checkout_url": {
      "type": [
       "string",
       "null"
      ]
     },
     "payment": {
      "type": [
       "object",
       "null"
      ]
     },
     "next_step": {
      "type": "string"
     },
     "test_mode": {
      "type": "boolean"
     }
    }
   },
   "Error": {
    "type": "object",
    "properties": {
     "error": {
      "type": "object",
      "properties": {
       "code": {
        "type": "string"
       },
       "message": {
        "type": "string"
       },
       "errors": {
        "type": "array",
        "items": {
         "type": "object"
        }
       }
      },
      "required": [
       "code",
       "message"
      ]
     }
    }
   }
  }
 },
 "x-mcp": {
  "endpoint": "https://floridaloadcalcs.com/mcp",
  "transport": "streamable-http"
 }
}