{
 "openapi": "3.1.0",
 "info": {
  "title": "Lookup API: India PIN codes and districts, public holidays (US, UK, AU, CA)",
  "version": "1.0.0",
  "description": "Free, no key, open CORS, about 60 requests a minute per IP (the limiter is approximate and works per data centre). Every response lists its sources and licences."
 },
 "servers": [
  {
   "url": "https://api.at01.io"
  }
 ],
 "paths": {
  "/v1/pin/{pin}": {
   "get": {
    "operationId": "pin",
    "summary": "India PIN code to post offices, district and state",
    "parameters": [
     {
      "name": "pin",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[0-9]{6}$"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Found"
     },
     "400": {
      "description": "Bad input"
     },
     "404": {
      "description": "Not found"
     }
    }
   }
  },
  "/v1/place": {
   "get": {
    "operationId": "place",
    "summary": "Indian place to district",
    "parameters": [
     {
      "name": "name",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "state",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Found"
     },
     "404": {
      "description": "Not found"
     }
    }
   }
  },
  "/v1/holidays": {
   "get": {
    "operationId": "holidays",
    "summary": "Public holidays by country and date or year",
    "parameters": [
     {
      "name": "country",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "US",
        "GB",
        "AU",
        "CA"
       ]
      }
     },
     {
      "name": "date",
      "in": "query",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "year",
      "in": "query",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "region",
      "in": "query",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Found"
     },
     "404": {
      "description": "None"
     }
    }
   }
  },
  "/v1/holidays/next": {
   "get": {
    "operationId": "holidaysNext",
    "summary": "The next holiday on or after a date",
    "parameters": [
     {
      "name": "country",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "from",
      "in": "query",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "region",
      "in": "query",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Found"
     }
    }
   }
  }
 }
}