{
  "openapi": "3.1.0",
  "info": {
    "title": "Piano Inside rough moving estimates",
    "version": "1.0.0",
    "description": "Live estimate-only moving calculator. No lead is created and no booking is confirmed."
  },
  "servers": [
    {
      "url": "https://pianoinside.com"
    }
  ],
  "paths": {
    "/api/agent-quote/v1/estimate": {
      "post": {
        "operationId": "getMovingRoughEstimate",
        "summary": "Get an estimate-only piano moving response",
        "description": "No customer contact fields. Complex or unknown access requires review. Flexible dates do not guarantee a discount. Final pricing and booking require human review.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "schemaVersion",
                  "website_origin",
                  "brand_origin",
                  "actor_mode",
                  "move_type",
                  "piano_type",
                  "pickup_postal",
                  "destination_postal",
                  "pickup_steps",
                  "destination_steps",
                  "stair_shape",
                  "pickup_access",
                  "destination_access",
                  "date_flexible",
                  "time_flexible"
                ],
                "properties": {
                  "schemaVersion": {
                    "const": "1"
                  },
                  "website_origin": {
                    "const": "pianoinside.com"
                  },
                  "brand_origin": {
                    "const": "piano_inside"
                  },
                  "actor_mode": {
                    "const": "ai_agent"
                  },
                  "move_type": {
                    "const": "moving"
                  },
                  "piano_type": {
                    "type": "string",
                    "enum": [
                      "Apt Size Upright (42\" height,108 cm or shorter)",
                      "Standard Size Upright (43~ 48\",109~121 cm height)",
                      "Full Size Upright (49~52\",122 ~ 131 cm height)",
                      "Grand Upright (53\" or higher ,132 cm ~)",
                      "Player Upright Piano",
                      "Baby Grand (4 ' ~ 5' 2\",121~158 cm Long)",
                      "Grand (5' 3\" ~ 6'2\", 159 ~ 185 cm Long)",
                      "Player Grand Piano",
                      "unknown"
                    ]
                  },
                  "pickup_postal": {
                    "type": "string",
                    "maxLength": 7
                  },
                  "destination_postal": {
                    "type": "string",
                    "maxLength": 7
                  },
                  "pickup_steps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "destination_steps": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "stair_shape": {
                    "enum": [
                      "straight",
                      "l_turn",
                      "u_turn",
                      "spiral",
                      "unknown"
                    ]
                  },
                  "pickup_access": {
                    "enum": [
                      "ground_floor",
                      "stairs",
                      "elevator",
                      "unknown"
                    ]
                  },
                  "destination_access": {
                    "enum": [
                      "ground_floor",
                      "stairs",
                      "elevator",
                      "unknown"
                    ]
                  },
                  "preferred_date": {
                    "type": "string",
                    "format": "date"
                  },
                  "date_flexible": {
                    "type": "boolean"
                  },
                  "time_flexible": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Estimated or review_required; CAD amounts and HST basis, no confirmed booking",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Estimate"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unexpected input"
          },
          "403": {
            "description": "Origin mismatch"
          },
          "429": {
            "description": "Rate or concurrency limit; retry later"
          },
          "503": {
            "description": "Estimate provider unavailable; no price returned"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Estimate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schemaVersion",
          "status",
          "estimateOnly",
          "currency",
          "subtotal",
          "tax",
          "total",
          "taxRate",
          "availability",
          "routeDiscountApplied",
          "assumptions",
          "reasonCodes",
          "pricingVersion",
          "estimateBasis",
          "bookingConfirmed"
        ],
        "properties": {
          "schemaVersion": {
            "const": "1"
          },
          "status": {
            "enum": [
              "estimated",
              "review_required",
              "unavailable"
            ]
          },
          "estimateOnly": {
            "const": true
          },
          "currency": {
            "const": "CAD"
          },
          "subtotal": {
            "type": [
              "number",
              "null"
            ]
          },
          "tax": {
            "type": [
              "number",
              "null"
            ]
          },
          "total": {
            "type": [
              "number",
              "null"
            ]
          },
          "taxRate": {
            "type": [
              "number",
              "null"
            ]
          },
          "availability": {
            "const": "not_checked"
          },
          "routeDiscountApplied": {
            "const": false
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reasonCodes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "pricingVersion": {
            "type": "string"
          },
          "estimateBasis": {
            "const": "postal_route_approximation"
          },
          "bookingConfirmed": {
            "const": false
          }
        }
      }
    }
  }
}