{
 "openapi": "3.1.0",
 "info": {
  "title": "Citiwise",
  "version": "1.2.1",
  "description": "What UDCPR 2020 allows on any plot in Maharashtra outside Greater Mumbai: FSI and built-up area, margins on every side, height, the building that fits, parking and approvals, each with its UDCPR clause. No sign-in. Every feasibility answer includes a plain-language summary, a link to the report, and links to the report and site plan as PDF files to hand to the user. Feasibility only; the planning authority decides.",
  "contact": {
   "email": "hello@citiwise.in",
   "url": "https://citiwise.in/connect"
  },
  "termsOfService": "https://citiwise.in/terms"
 },
 "servers": [
  {
   "url": "https://citiwise.in"
  }
 ],
 "paths": {
  "/api/feasibility": {
   "get": {
    "operationId": "feasibilityByLink",
    "summary": "What UDCPR allows on one plot, by link",
    "parameters": [
     {
      "name": "town",
      "in": "query",
      "required": true,
      "description": "Maharashtra town or planning authority, e.g. Pune",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "area",
      "in": "query",
      "required": true,
      "description": "plot area in m² (1 sq ft = 0.0929 m², 1 guntha = 101.17 m²)",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "road",
      "in": "query",
      "required": false,
      "description": "road width in m (1 ft = 0.3048 m)",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "use",
      "in": "query",
      "required": false,
      "description": "use; default flats",
      "schema": {
       "type": "string",
       "enum": [
        "flats",
        "mix",
        "bung",
        "row",
        "shop",
        "office",
        "it",
        "hotel",
        "fuel",
        "school",
        "college",
        "hospital",
        "public",
        "assembly",
        "mangal",
        "parking",
        "warehouse",
        "factory"
       ]
      }
     },
     {
      "name": "zone",
      "in": "query",
      "required": false,
      "description": "nc non-congested, c congested",
      "schema": {
       "type": "string",
       "enum": [
        "nc",
        "c"
       ]
      }
     },
     {
      "name": "land_use",
      "in": "query",
      "required": false,
      "description": "DP zone",
      "schema": {
       "type": "string",
       "enum": [
        "res",
        "com",
        "ind",
        "psp",
        "agr",
        "tt",
        "gb"
       ]
      }
     },
     {
      "name": "upper_floors",
      "in": "query",
      "required": false,
      "description": "floors above ground or stilt; omit to fit",
      "schema": {
       "type": "integer"
      }
     },
     {
      "name": "stilt",
      "in": "query",
      "required": false,
      "description": "stilt parking",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "road_widening",
      "in": "query",
      "required": false,
      "description": "road widening area, m²",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "reservation",
      "in": "query",
      "required": false,
      "description": "DP reservation area, m²",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "asr_rate",
      "in": "query",
      "required": false,
      "description": "ASR land rate, Rs a m²",
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "The feasibility, with summary, report_url and report_pdf_url.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "422": {
      "description": "A fact is missing or not valid; the message says which."
     }
    }
   },
   "post": {
    "operationId": "feasibility",
    "summary": "What UDCPR allows on one plot, with every side and the unit mix",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "town": {
          "type": "string",
          "description": "Maharashtra town, city or planning authority, e.g. Pune, Kolhapur, Nashik, PMRDA"
         },
         "area": {
          "type": "number",
          "description": "plot area in m2: the least of 7/12, measurement sheet and site (1 sq ft = 0.0929 m2; 1 guntha = 101.17 m2; 1 acre = 4,046.86 m2)"
         },
         "road": {
          "type": "number",
          "description": "width of the road in front in m, when there is one road and no sides (1 ft = 0.3048 m)"
         },
         "sides": {
          "type": "array",
          "items": {
           "type": "object",
           "properties": {
            "type": {
             "type": "string",
             "enum": [
              "road",
              "plot",
              "open",
              "nallah",
              "river",
              "rail"
             ]
            },
            "width": {
             "type": "number",
             "description": "DP road width in m, for roads"
            },
            "length": {
             "type": "number"
            },
            "name": {
             "type": "string",
             "description": "label, e.g. south"
            },
            "side": {
             "type": "integer",
             "minimum": 1,
             "description": "for a curved or many-pointed side drawn as several segments: the side number each segment belongs to, the same on every segment of that side"
            }
           },
           "required": [
            "type"
           ]
          },
          "maxItems": 64,
          "description": "every side, anticlockwise, starting at a road"
         },
         "zone": {
          "type": "string",
          "enum": [
           "nc",
           "c"
          ],
          "description": "nc non-congested, c congested (gaothan)"
         },
         "land_use": {
          "type": "string",
          "enum": [
           "res",
           "com",
           "ind",
           "psp",
           "agr",
           "tt",
           "gb"
          ]
         },
         "road_widening": {
          "type": "number"
         },
         "reservation": {
          "type": "number"
         },
         "handed_over": {
          "type": "boolean"
         },
         "stilt": {
          "type": "boolean"
         },
         "ground_height": {
          "type": "number"
         },
         "floor_height": {
          "type": "number"
         },
         "units": {
          "type": "array",
          "maxItems": 12,
          "items": {
           "type": "object",
           "required": [
            "type",
            "carpet"
           ],
           "properties": {
            "type": {
             "type": "string",
             "description": "label of up to 20 characters: 1 BHK, 2 BHK, Studio, Shop, Office"
            },
            "count": {
             "type": "integer",
             "description": "units of this type, 0 to 10000; leave out to work it out"
            },
            "carpet": {
             "type": "number",
             "description": "carpet area of one unit, m2, 10 to 2000"
            },
            "share": {
             "type": "number",
             "description": "with count left out: this type's share of the carpet area, 0 to 1 or a percentage"
            }
           }
          },
          "description": "the unit mix, one entry per type, e.g. [{\"type\":\"2 BHK\",\"count\":12,\"carpet\":60},{\"type\":\"Shop\",\"count\":4,\"carpet\":25}]; parking takes each type in its own Table 8-B row; a count left out is worked out from the building"
         },
         "flats": {
          "type": "integer",
          "description": "number of flats; with carpet, a one-type unit mix"
         },
         "carpet": {
          "type": "number",
          "description": "carpet area of a flat, m2"
         },
         "polygon": {
          "type": "array",
          "items": {
           "type": "array",
           "items": {
            "type": "number"
           }
          },
          "maxItems": 64,
          "description": "plot corners [x, y] in m, anticlockwise, one per side, side 1 first; needed for plots that are not rectangles"
         },
         "sprinklers": {
          "type": "boolean",
          "description": "mixed building fully sprinklered (1.3(93)(xiv) note)"
         },
         "power_line_kv": {
          "type": "number",
          "description": "voltage of an overhead line near the plot, kV, for its clearance"
         },
         "tod": {
          "type": "boolean",
          "description": "plot inside a TOD zone (14.2.1)"
         },
         "road_widening_side": {
          "type": "integer",
          "description": "side number (1-based) that the road widening strip comes off; default the first road side"
         },
         "plot_origin": {
          "type": "string",
          "enum": [
           "layout",
           "unauthorised",
           "gunthewari"
          ],
          "description": "layout: sanctioned layout or sub-division; unauthorised: sub-divided after 11.01.1967 without permission; gunthewari: regularised under the Gunthewari Act"
         },
         "asr_rate": {
          "type": "number",
          "description": "land rate of the plot in the Annual Statement of Rates, Rs a m2; gives premiums in rupees and the DRC to debit"
         },
         "tdr_generating_rate": {
          "type": "number",
          "description": "ASR land rate of the TDR's generating plot, Rs a m2 (11.2.6)"
         },
         "use_carpet": {
          "type": "number",
          "description": "carpet area of a non-residential use, or of the shops below flats, m2, for its parking and water; default the built-up that fits"
         },
         "rooms": {
          "type": "integer",
          "description": "guest rooms, for hotel parking and sanitation"
         },
         "beds": {
          "type": "integer",
          "description": "beds: for hospitals, parking, water, sanitation and grey water; for hotels, water"
         },
         "seats": {
          "type": "integer",
          "description": "seats, for assembly parking"
         },
         "bathrooms": {
          "type": "boolean",
          "description": "factories: whether bath-rooms are provided, for water (Table 12-A)"
         },
         "use": {
          "type": "string",
          "enum": [
           "flats",
           "mix",
           "bung",
           "row",
           "shop",
           "office",
           "it",
           "hotel",
           "fuel",
           "school",
           "college",
           "hospital",
           "public",
           "assembly",
           "mangal",
           "parking",
           "warehouse",
           "factory"
          ]
         },
         "upper_floors": {
          "type": "integer",
          "description": "floors above ground or stilt (G+3 is 3); omit to fit"
         }
        },
        "required": [
         "town",
         "area",
         "use"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "The feasibility, with summary, report_url and report_pdf_url.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "422": {
      "description": "A fact is missing or not valid; the message says which."
     }
    }
   }
  },
  "/api/compare": {
   "get": {
    "operationId": "compareUsesByLink",
    "summary": "Every use on the same plot, by link",
    "parameters": [
     {
      "name": "town",
      "in": "query",
      "required": true,
      "description": "Maharashtra town or planning authority, e.g. Pune",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "area",
      "in": "query",
      "required": true,
      "description": "plot area in m² (1 sq ft = 0.0929 m², 1 guntha = 101.17 m²)",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "road",
      "in": "query",
      "required": false,
      "description": "road width in m (1 ft = 0.3048 m)",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "use",
      "in": "query",
      "required": false,
      "description": "use; default flats",
      "schema": {
       "type": "string",
       "enum": [
        "flats",
        "mix",
        "bung",
        "row",
        "shop",
        "office",
        "it",
        "hotel",
        "fuel",
        "school",
        "college",
        "hospital",
        "public",
        "assembly",
        "mangal",
        "parking",
        "warehouse",
        "factory"
       ]
      }
     },
     {
      "name": "zone",
      "in": "query",
      "required": false,
      "description": "nc non-congested, c congested",
      "schema": {
       "type": "string",
       "enum": [
        "nc",
        "c"
       ]
      }
     },
     {
      "name": "land_use",
      "in": "query",
      "required": false,
      "description": "DP zone",
      "schema": {
       "type": "string",
       "enum": [
        "res",
        "com",
        "ind",
        "psp",
        "agr",
        "tt",
        "gb"
       ]
      }
     },
     {
      "name": "upper_floors",
      "in": "query",
      "required": false,
      "description": "floors above ground or stilt; omit to fit",
      "schema": {
       "type": "integer"
      }
     },
     {
      "name": "stilt",
      "in": "query",
      "required": false,
      "description": "stilt parking",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "road_widening",
      "in": "query",
      "required": false,
      "description": "road widening area, m²",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "reservation",
      "in": "query",
      "required": false,
      "description": "DP reservation area, m²",
      "schema": {
       "type": "number"
      }
     },
     {
      "name": "asr_rate",
      "in": "query",
      "required": false,
      "description": "ASR land rate, Rs a m²",
      "schema": {
       "type": "number"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Every use in a fixed order, allowed or not, with built-up and clause.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "422": {
      "description": "A fact is missing or not valid; the message says which."
     }
    }
   },
   "post": {
    "operationId": "compareUses",
    "summary": "Every use on the same plot",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "town": {
          "type": "string",
          "description": "Maharashtra town, city or planning authority, e.g. Pune, Kolhapur, Nashik, PMRDA"
         },
         "area": {
          "type": "number",
          "description": "plot area in m2: the least of 7/12, measurement sheet and site (1 sq ft = 0.0929 m2; 1 guntha = 101.17 m2; 1 acre = 4,046.86 m2)"
         },
         "road": {
          "type": "number",
          "description": "width of the road in front in m, when there is one road and no sides (1 ft = 0.3048 m)"
         },
         "sides": {
          "type": "array",
          "items": {
           "type": "object",
           "properties": {
            "type": {
             "type": "string",
             "enum": [
              "road",
              "plot",
              "open",
              "nallah",
              "river",
              "rail"
             ]
            },
            "width": {
             "type": "number",
             "description": "DP road width in m, for roads"
            },
            "length": {
             "type": "number"
            },
            "name": {
             "type": "string",
             "description": "label, e.g. south"
            },
            "side": {
             "type": "integer",
             "minimum": 1,
             "description": "for a curved or many-pointed side drawn as several segments: the side number each segment belongs to, the same on every segment of that side"
            }
           },
           "required": [
            "type"
           ]
          },
          "maxItems": 64,
          "description": "every side, anticlockwise, starting at a road"
         },
         "zone": {
          "type": "string",
          "enum": [
           "nc",
           "c"
          ],
          "description": "nc non-congested, c congested (gaothan)"
         },
         "land_use": {
          "type": "string",
          "enum": [
           "res",
           "com",
           "ind",
           "psp",
           "agr",
           "tt",
           "gb"
          ]
         },
         "road_widening": {
          "type": "number"
         },
         "reservation": {
          "type": "number"
         },
         "handed_over": {
          "type": "boolean"
         },
         "stilt": {
          "type": "boolean"
         },
         "ground_height": {
          "type": "number"
         },
         "floor_height": {
          "type": "number"
         },
         "units": {
          "type": "array",
          "maxItems": 12,
          "items": {
           "type": "object",
           "required": [
            "type",
            "carpet"
           ],
           "properties": {
            "type": {
             "type": "string",
             "description": "label of up to 20 characters: 1 BHK, 2 BHK, Studio, Shop, Office"
            },
            "count": {
             "type": "integer",
             "description": "units of this type, 0 to 10000; leave out to work it out"
            },
            "carpet": {
             "type": "number",
             "description": "carpet area of one unit, m2, 10 to 2000"
            },
            "share": {
             "type": "number",
             "description": "with count left out: this type's share of the carpet area, 0 to 1 or a percentage"
            }
           }
          },
          "description": "the unit mix, one entry per type, e.g. [{\"type\":\"2 BHK\",\"count\":12,\"carpet\":60},{\"type\":\"Shop\",\"count\":4,\"carpet\":25}]; parking takes each type in its own Table 8-B row; a count left out is worked out from the building"
         },
         "flats": {
          "type": "integer",
          "description": "number of flats; with carpet, a one-type unit mix"
         },
         "carpet": {
          "type": "number",
          "description": "carpet area of a flat, m2"
         },
         "polygon": {
          "type": "array",
          "items": {
           "type": "array",
           "items": {
            "type": "number"
           }
          },
          "maxItems": 64,
          "description": "plot corners [x, y] in m, anticlockwise, one per side, side 1 first; needed for plots that are not rectangles"
         },
         "sprinklers": {
          "type": "boolean",
          "description": "mixed building fully sprinklered (1.3(93)(xiv) note)"
         },
         "power_line_kv": {
          "type": "number",
          "description": "voltage of an overhead line near the plot, kV, for its clearance"
         },
         "tod": {
          "type": "boolean",
          "description": "plot inside a TOD zone (14.2.1)"
         },
         "road_widening_side": {
          "type": "integer",
          "description": "side number (1-based) that the road widening strip comes off; default the first road side"
         },
         "plot_origin": {
          "type": "string",
          "enum": [
           "layout",
           "unauthorised",
           "gunthewari"
          ],
          "description": "layout: sanctioned layout or sub-division; unauthorised: sub-divided after 11.01.1967 without permission; gunthewari: regularised under the Gunthewari Act"
         },
         "asr_rate": {
          "type": "number",
          "description": "land rate of the plot in the Annual Statement of Rates, Rs a m2; gives premiums in rupees and the DRC to debit"
         },
         "tdr_generating_rate": {
          "type": "number",
          "description": "ASR land rate of the TDR's generating plot, Rs a m2 (11.2.6)"
         },
         "use_carpet": {
          "type": "number",
          "description": "carpet area of a non-residential use, or of the shops below flats, m2, for its parking and water; default the built-up that fits"
         },
         "rooms": {
          "type": "integer",
          "description": "guest rooms, for hotel parking and sanitation"
         },
         "beds": {
          "type": "integer",
          "description": "beds: for hospitals, parking, water, sanitation and grey water; for hotels, water"
         },
         "seats": {
          "type": "integer",
          "description": "seats, for assembly parking"
         },
         "bathrooms": {
          "type": "boolean",
          "description": "factories: whether bath-rooms are provided, for water (Table 12-A)"
         }
        },
        "required": [
         "town",
         "area"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Every use in a fixed order.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "422": {
      "description": "A fact is missing or not valid; the message says which."
     }
    }
   }
  },
  "/api/check": {
   "post": {
    "operationId": "checkDesign",
    "summary": "Check a proposed building against UDCPR",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "town": {
          "type": "string",
          "description": "Maharashtra town, city or planning authority, e.g. Pune, Kolhapur, Nashik, PMRDA"
         },
         "area": {
          "type": "number",
          "description": "plot area in m2: the least of 7/12, measurement sheet and site (1 sq ft = 0.0929 m2; 1 guntha = 101.17 m2; 1 acre = 4,046.86 m2)"
         },
         "road": {
          "type": "number",
          "description": "width of the road in front in m, when there is one road and no sides (1 ft = 0.3048 m)"
         },
         "sides": {
          "type": "array",
          "items": {
           "type": "object",
           "properties": {
            "type": {
             "type": "string",
             "enum": [
              "road",
              "plot",
              "open",
              "nallah",
              "river",
              "rail"
             ]
            },
            "width": {
             "type": "number",
             "description": "DP road width in m, for roads"
            },
            "length": {
             "type": "number"
            },
            "name": {
             "type": "string",
             "description": "label, e.g. south"
            },
            "side": {
             "type": "integer",
             "minimum": 1,
             "description": "for a curved or many-pointed side drawn as several segments: the side number each segment belongs to, the same on every segment of that side"
            }
           },
           "required": [
            "type"
           ]
          },
          "maxItems": 64,
          "description": "every side, anticlockwise, starting at a road"
         },
         "zone": {
          "type": "string",
          "enum": [
           "nc",
           "c"
          ],
          "description": "nc non-congested, c congested (gaothan)"
         },
         "land_use": {
          "type": "string",
          "enum": [
           "res",
           "com",
           "ind",
           "psp",
           "agr",
           "tt",
           "gb"
          ]
         },
         "road_widening": {
          "type": "number"
         },
         "reservation": {
          "type": "number"
         },
         "handed_over": {
          "type": "boolean"
         },
         "stilt": {
          "type": "boolean"
         },
         "ground_height": {
          "type": "number"
         },
         "floor_height": {
          "type": "number"
         },
         "units": {
          "type": "array",
          "maxItems": 12,
          "items": {
           "type": "object",
           "required": [
            "type",
            "carpet"
           ],
           "properties": {
            "type": {
             "type": "string",
             "description": "label of up to 20 characters: 1 BHK, 2 BHK, Studio, Shop, Office"
            },
            "count": {
             "type": "integer",
             "description": "units of this type, 0 to 10000; leave out to work it out"
            },
            "carpet": {
             "type": "number",
             "description": "carpet area of one unit, m2, 10 to 2000"
            },
            "share": {
             "type": "number",
             "description": "with count left out: this type's share of the carpet area, 0 to 1 or a percentage"
            }
           }
          },
          "description": "the unit mix, one entry per type, e.g. [{\"type\":\"2 BHK\",\"count\":12,\"carpet\":60},{\"type\":\"Shop\",\"count\":4,\"carpet\":25}]; parking takes each type in its own Table 8-B row; a count left out is worked out from the building"
         },
         "flats": {
          "type": "integer",
          "description": "number of flats; with carpet, a one-type unit mix"
         },
         "carpet": {
          "type": "number",
          "description": "carpet area of a flat, m2"
         },
         "polygon": {
          "type": "array",
          "items": {
           "type": "array",
           "items": {
            "type": "number"
           }
          },
          "maxItems": 64,
          "description": "plot corners [x, y] in m, anticlockwise, one per side, side 1 first; needed for plots that are not rectangles"
         },
         "sprinklers": {
          "type": "boolean",
          "description": "mixed building fully sprinklered (1.3(93)(xiv) note)"
         },
         "power_line_kv": {
          "type": "number",
          "description": "voltage of an overhead line near the plot, kV, for its clearance"
         },
         "tod": {
          "type": "boolean",
          "description": "plot inside a TOD zone (14.2.1)"
         },
         "road_widening_side": {
          "type": "integer",
          "description": "side number (1-based) that the road widening strip comes off; default the first road side"
         },
         "plot_origin": {
          "type": "string",
          "enum": [
           "layout",
           "unauthorised",
           "gunthewari"
          ],
          "description": "layout: sanctioned layout or sub-division; unauthorised: sub-divided after 11.01.1967 without permission; gunthewari: regularised under the Gunthewari Act"
         },
         "asr_rate": {
          "type": "number",
          "description": "land rate of the plot in the Annual Statement of Rates, Rs a m2; gives premiums in rupees and the DRC to debit"
         },
         "tdr_generating_rate": {
          "type": "number",
          "description": "ASR land rate of the TDR's generating plot, Rs a m2 (11.2.6)"
         },
         "use_carpet": {
          "type": "number",
          "description": "carpet area of a non-residential use, or of the shops below flats, m2, for its parking and water; default the built-up that fits"
         },
         "rooms": {
          "type": "integer",
          "description": "guest rooms, for hotel parking and sanitation"
         },
         "beds": {
          "type": "integer",
          "description": "beds: for hospitals, parking, water, sanitation and grey water; for hotels, water"
         },
         "seats": {
          "type": "integer",
          "description": "seats, for assembly parking"
         },
         "bathrooms": {
          "type": "boolean",
          "description": "factories: whether bath-rooms are provided, for water (Table 12-A)"
         },
         "use": {
          "type": "string",
          "enum": [
           "flats",
           "mix",
           "bung",
           "row",
           "shop",
           "office",
           "it",
           "hotel",
           "fuel",
           "school",
           "college",
           "hospital",
           "public",
           "assembly",
           "mangal",
           "parking",
           "warehouse",
           "factory"
          ]
         },
         "proposed": {
          "type": "object",
          "properties": {
           "built_up": {
            "type": "number"
           },
           "height": {
            "type": "number"
           },
           "upper_floors": {
            "type": "integer"
           },
           "margins": {
            "type": "array",
            "items": {
             "type": "number"
            },
            "maxItems": 64
           }
          }
         }
        },
        "required": [
         "town",
         "area",
         "use",
         "proposed"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Allowed, proposed and pass or fail per item.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "422": {
      "description": "A fact is missing or not valid; the message says which."
     }
    }
   }
  },
  "/api/clause": {
   "get": {
    "operationId": "clause",
    "summary": "The text of a UDCPR regulation or table",
    "parameters": [
     {
      "name": "ref",
      "in": "query",
      "required": true,
      "description": "e.g. 6.2.6 or Table 6-G",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "The clause text.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "422": {
      "description": "A fact is missing or not valid; the message says which."
     }
    }
   }
  },
  "/api/search": {
   "get": {
    "operationId": "searchUdcpr",
    "summary": "Lines of UDCPR containing all the given words",
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": true,
      "description": "words to find",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Matching lines with their chapter.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "422": {
      "description": "A fact is missing or not valid; the message says which."
     }
    }
   }
  },
  "/api/towns": {
   "get": {
    "operationId": "towns",
    "summary": "Maharashtra towns and authorities",
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": false,
      "description": "part of a name",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Towns with kind and class.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "422": {
      "description": "A fact is missing or not valid; the message says which."
     }
    }
   }
  },
  "/api/pdf": {
   "get": {
    "operationId": "reportPdf",
    "summary": "The feasibility study or site plan as a PDF file",
    "description": "Use report_pdf_url from a feasibility answer.",
    "parameters": [
     {
      "name": "d",
      "in": "query",
      "required": true,
      "description": "the case, as given in report_pdf_url",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "doc",
      "in": "query",
      "required": false,
      "description": "site for the A3 site plan; omit for the A4 feasibility study",
      "schema": {
       "type": "string",
       "enum": [
        "site"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "A PDF file.",
      "content": {
       "application/pdf": {}
      }
     }
    }
   }
  },
  "/api/plot": {
   "post": {
    "operationId": "drawPlot",
    "summary": "A plot from its measurements: sides with angles or diagonals, in metres or feet",
    "description": "Fixes the exact corners, checks every measurement given twice and reports any misfit; returns polygon and sides for feasibility, site_url to open the plot drawn in Citiwise, and the feasibility when town and use are given.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "sides"
        ],
        "properties": {
         "sides": {
          "type": "array"
         },
         "unit": {
          "type": "string",
          "enum": [
           "m",
           "ft"
          ]
         },
         "angles": {
          "type": "array",
          "items": {
           "type": "number"
          }
         },
         "diagonals": {
          "type": "array"
         },
         "right_angles": {
          "type": "boolean"
         },
         "polygon": {
          "type": "array"
         },
         "stated_area": {
          "type": "number"
         },
         "town": {
          "type": "string"
         },
         "use": {
          "type": "string"
         },
         "zone": {
          "type": "string",
          "enum": [
           "nc",
           "c"
          ]
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "The plot, its checks and links.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "422": {
      "description": "The measurements do not fix or do not agree; the message says which."
     }
    }
   }
  }
 }
}