{
  "openapi": "3.1.0",
  "info": {
    "title": "Pioneer preliminary roof quotes",
    "version": "1.0.0",
    "description": "No booking, messaging or payment side effects. Customer confirmation is required before proceeding through the website."
  },
  "servers": [
    {
      "url": "https://catalog.mypioneerroofing.com"
    }
  ],
  "paths": {
    "/api/agent/catalog": {
      "get": {
        "operationId": "searchRoofProducts",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "products with IDs and colors, total and nextOffset"
          },
          "429": {
            "description": "Wait Retry-After seconds"
          }
        }
      }
    },
    "/api/agent/quote": {
      "post": {
        "operationId": "preparePreliminaryRoofQuote",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "productId",
                  "color",
                  "area",
                  "areaKind",
                  "pitch",
                  "stories",
                  "layers",
                  "complexity"
                ],
                "properties": {
                  "productId": {
                    "type": "integer"
                  },
                  "color": {
                    "type": "string"
                  },
                  "area": {
                    "type": "number",
                    "minimum": 100,
                    "maximum": 120000
                  },
                  "areaKind": {
                    "type": "string",
                    "enum": [
                      "roof",
                      "footprint"
                    ]
                  },
                  "pitch": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 24
                  },
                  "stories": {
                    "enum": [
                      1,
                      2,
                      3,
                      null
                    ]
                  },
                  "layers": {
                    "enum": [
                      0,
                      1,
                      2,
                      3,
                      null
                    ]
                  },
                  "complexity": {
                    "enum": [
                      "simple",
                      "standard",
                      "complex",
                      "unknown"
                    ]
                  },
                  "extraArea": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 20000
                  },
                  "installationOptions": {
                    "type": "object",
                    "properties": {
                      "dripEdgeColor": {
                        "enum": [
                          "match",
                          "white",
                          "black",
                          "brown",
                          "bronze",
                          "gray",
                          "mill",
                          "keep-existing"
                        ]
                      },
                      "ridgeCap": {
                        "enum": [
                          "standard",
                          "high-profile"
                        ]
                      },
                      "ventilationMode": {
                        "enum": [
                          "existing",
                          "upgrade"
                        ]
                      },
                      "ventilationRequest": {
                        "enum": [
                          "none",
                          "assess",
                          "box",
                          "ridge",
                          "solar",
                          "power"
                        ]
                      },
                      "ventilationAdditions": {
                        "type": "object",
                        "properties": {
                          "box": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 100
                          },
                          "dome": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 100
                          },
                          "ridge": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 2000
                          },
                          "solar": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 100
                          },
                          "power": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 100
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "preliminary or needs_review; cashTotal (USD or null), scope, items, customerReviewUrl; no booking or payment"
          },
          "400": {
            "description": "Invalid measurements or selection"
          },
          "429": {
            "description": "Wait Retry-After seconds"
          },
          "503": {
            "description": "Temporarily unavailable; wait Retry-After seconds"
          }
        }
      }
    }
  }
}
