{
  "openapi": "3.1.0",
  "info": {
    "title": "BookTheTee API",
    "version": "2.0",
    "description": "Static read-only JSON of public golf courses with official booking links. Unknown fields are null."
  },
  "servers": [
    {
      "url": "https://bookthetee.com"
    }
  ],
  "paths": {
    "/api/courses.json": {
      "get": {
        "operationId": "listCourses",
        "summary": "All courses",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schema_version": {
                      "type": "string"
                    },
                    "last_updated": {
                      "type": "string"
                    },
                    "region": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "courses": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Course"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/regions/{region}.json": {
      "get": {
        "operationId": "listRegionCourses",
        "parameters": [
          {
            "name": "region",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "nyc"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schema_version": {
                      "type": "string"
                    },
                    "last_updated": {
                      "type": "string"
                    },
                    "region": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "courses": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Course"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/courses/{slug}.json": {
      "get": {
        "operationId": "getCourse",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "bethpage-state-park-black-course",
                "bally-s-golf-links-at-ferry-point",
                "bethpage-state-park-red-course",
                "crystal-springs-resort-ballyowen",
                "neshanic-valley-golf-course",
                "rock-spring-golf-club",
                "pound-ridge-golf-club",
                "the-knoll-west-course",
                "the-golf-club-at-mansion-ridge",
                "hominy-hill-golf-course",
                "richter-park-golf-course",
                "crystal-springs-resort-crystal-springs-course",
                "crystal-springs-resort-wild-turkey",
                "bethpage-state-park-blue-course",
                "heron-glen-golf-course",
                "galloping-hill-golf-course",
                "saxon-woods-golf-course",
                "marine-park-golf-course",
                "dyker-beach-golf-course",
                "split-rock-golf-course-pelham-split-rock"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schema_version": {
                      "type": "string"
                    },
                    "course": {
                      "$ref": "#/components/schemas/Course"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Course": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "lat": {
            "type": [
              "number",
              "null"
            ]
          },
          "lng": {
            "type": [
              "number",
              "null"
            ]
          },
          "geocode_source": {
            "type": [
              "string",
              "null"
            ]
          },
          "address": {
            "type": "object",
            "properties": {
              "locality": {
                "type": "string"
              },
              "region": {
                "type": "string"
              },
              "country": {
                "type": "string"
              },
              "full": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "region": {
            "type": "string"
          },
          "rank": {
            "type": "integer"
          },
          "rank_sources": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "source": {
                  "type": "string"
                },
                "year": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "list": {
                  "type": "string"
                },
                "position": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "summary": {
            "type": "string"
          },
          "approx_distance_mi_manhattan": {
            "type": "number"
          },
          "holes": {
            "type": [
              "integer",
              "null"
            ]
          },
          "par": {
            "type": [
              "integer",
              "null"
            ]
          },
          "yardage": {
            "type": [
              "integer",
              "null"
            ]
          },
          "green_fee_min": {
            "type": [
              "number",
              "null"
            ]
          },
          "green_fee_max": {
            "type": [
              "number",
              "null"
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "fee_note": {
            "type": "string"
          },
          "website": {
            "type": "string"
          },
          "booking_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "booking_method": {
            "type": "string",
            "enum": [
              "online",
              "phone"
            ]
          },
          "booking_platform": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "walking_allowed": {
            "type": [
              "string",
              "null"
            ]
          },
          "resident_rules": {
            "type": [
              "string",
              "null"
            ]
          },
          "caveats": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "booking_notes": {
            "type": "string"
          },
          "booking_verified": {
            "type": "boolean"
          },
          "booking_url_status": {
            "type": [
              "integer",
              "null"
            ]
          },
          "last_verified": {
            "type": [
              "string",
              "null"
            ]
          },
          "page_url": {
            "type": "string"
          },
          "source_urls": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "last_updated": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "slug",
          "name",
          "lat",
          "lng",
          "geocode_source",
          "address",
          "region",
          "rank",
          "rank_sources",
          "summary",
          "approx_distance_mi_manhattan",
          "holes",
          "par",
          "yardage",
          "green_fee_min",
          "green_fee_max",
          "currency",
          "fee_note",
          "website",
          "booking_url",
          "booking_method",
          "booking_platform",
          "phone",
          "walking_allowed",
          "resident_rules",
          "caveats",
          "booking_notes",
          "booking_verified",
          "booking_url_status",
          "last_verified",
          "page_url",
          "source_urls",
          "last_updated"
        ]
      }
    }
  }
}