{
  "openapi": "3.0.3",
  "info": {
    "title": "Entryphone door entry system guide estimates",
    "version": "1.0.0",
    "description": "Read-only current guide prices for supply and installation in supported London postcode districts. Ask the customer for all configuration choices before calling. Never invent missing choices. Present the returned configuration, VAT, assumptions and subject-to-survey notice alongside prices. Do not treat an estimate as a firm quotation or order. This service does not send emails or save enquiries."
  },
  "servers": [
    {
      "url": "https://www.entryphone.co.uk"
    }
  ],
  "paths": {
    "/api/guide-price/estimate.ashx": {
      "post": {
        "operationId": "calculateInstallationEstimate",
        "summary": "Calculate a specific door entry system installation estimate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EstimateRequest"
              },
              "example": {
                "system": "q-video",
                "buttons": 4,
                "standardPhones": 4,
                "wifiPhones": 0,
                "postcodeDistrict": "SW18",
                "panel": "standard",
                "mounting": "flush",
                "finish": "mirror",
                "release": "rim",
                "accessControl": "none",
                "tradesTimeSwitch": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Current supply-and-installation guide estimate; subject to survey.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Estimate"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported inputs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "Use POST",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Request exceeds 8192 characters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Use application/json",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Outside installation postcode area",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Pricing unavailable; do not invent or extrapolate a price",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "EstimateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "system",
          "buttons",
          "standardPhones",
          "wifiPhones",
          "postcodeDistrict",
          "panel",
          "mounting",
          "finish",
          "release",
          "accessControl",
          "tradesTimeSwitch"
        ],
        "properties": {
          "system": {
            "type": "string",
            "enum": [
              "audio-200",
              "video-500",
              "q-video",
              "q-audio"
            ]
          },
          "buttons": {
            "type": "integer",
            "minimum": 1,
            "maximum": 999,
            "description": "Number of destinations/buttons, not entrance panels. Exactly one entrance is supported. At 30+ destinations audio-200, video-500 and q-video use the existing dial-panel pricing rules. audio-200 maximum: 32."
          },
          "standardPhones": {
            "type": "integer",
            "minimum": 0,
            "maximum": 999
          },
          "wifiPhones": {
            "type": "integer",
            "minimum": 0,
            "maximum": 999,
            "description": "Wi-Fi phones are supported only with q-video. At least one standard or Wi-Fi phone is required."
          },
          "postcodeDistrict": {
            "type": "string",
            "pattern": "^[A-Z]{1,2}[0-9][A-Z0-9]?$",
            "description": "Outward postcode district only, for example SW18. Do not send a street address, full postcode, name or email."
          },
          "panel": {
            "type": "string",
            "enum": [
              "standard",
              "laser-engraved"
            ],
            "description": "Single-button laser-engraved panels are not supported for video-500."
          },
          "mounting": {
            "type": "string",
            "enum": [
              "flush",
              "surface"
            ]
          },
          "finish": {
            "type": "string",
            "enum": [
              "mirror",
              "stainless",
              "brass-finished-stainless"
            ]
          },
          "release": {
            "type": "string",
            "enum": [
              "none",
              "rim",
              "mortice",
              "cisa",
              "maglock"
            ]
          },
          "accessControl": {
            "type": "string",
            "enum": [
              "none",
              "pinnet",
              "coded"
            ]
          },
          "tradesTimeSwitch": {
            "type": "boolean"
          }
        }
      },
      "Money": {
        "type": "object",
        "required": [
          "excludingVat",
          "vat",
          "includingVat",
          "period"
        ],
        "properties": {
          "excludingVat": {
            "type": "number",
            "minimum": 0
          },
          "vat": {
            "type": "number",
            "minimum": 0
          },
          "includingVat": {
            "type": "number",
            "minimum": 0
          },
          "period": {
            "type": "string",
            "enum": [
              "one-off",
              "annual",
              "quarterly"
            ]
          }
        }
      },
      "Estimate": {
        "type": "object",
        "required": [
          "schemaVersion",
          "estimateOnly",
          "calculatedAt",
          "currency",
          "vatRate",
          "inputs",
          "purchase",
          "optionalMaintenance",
          "rental",
          "equipment",
          "assumptions",
          "notice",
          "nextStepUrl",
          "calculatorUrl"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string"
          },
          "estimateOnly": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "calculatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "currency": {
            "type": "string",
            "enum": [
              "GBP"
            ]
          },
          "vatRate": {
            "type": "number"
          },
          "inputs": {
            "$ref": "#/components/schemas/EstimateRequest"
          },
          "purchase": {
            "$ref": "#/components/schemas/Money"
          },
          "optionalMaintenance": {
            "$ref": "#/components/schemas/Money"
          },
          "rental": {
            "type": "object",
            "properties": {
              "available": {
                "type": "boolean"
              },
              "termYears": {
                "type": "integer",
                "nullable": true
              },
              "price": {
                "type": "object",
                "required": [
                  "excludingVat",
                  "vat",
                  "includingVat",
                  "period"
                ],
                "properties": {
                  "excludingVat": {
                    "type": "number",
                    "minimum": 0
                  },
                  "vat": {
                    "type": "number",
                    "minimum": 0
                  },
                  "includingVat": {
                    "type": "number",
                    "minimum": 0
                  },
                  "period": {
                    "type": "string",
                    "enum": [
                      "one-off",
                      "annual",
                      "quarterly"
                    ]
                  }
                },
                "nullable": true
              },
              "upfrontPayment": {
                "type": "object",
                "required": [
                  "excludingVat",
                  "vat",
                  "includingVat",
                  "period"
                ],
                "properties": {
                  "excludingVat": {
                    "type": "number",
                    "minimum": 0
                  },
                  "vat": {
                    "type": "number",
                    "minimum": 0
                  },
                  "includingVat": {
                    "type": "number",
                    "minimum": 0
                  },
                  "period": {
                    "type": "string",
                    "enum": [
                      "one-off",
                      "annual",
                      "quarterly"
                    ]
                  }
                },
                "nullable": true
              }
            }
          },
          "equipment": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "partNumber": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "quantity": {
                  "type": "integer"
                }
              }
            }
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notice": {
            "type": "string"
          },
          "nextStepUrl": {
            "type": "string",
            "format": "uri"
          },
          "calculatorUrl": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
