{"openapi":"3.1.0","info":{"title":"Golf Course Data API","version":"1","summary":"Golf course scorecards, ratings and club details.","description":"Golf course data: par and stroke index per hole, tee lengths, course rating and slope, and club details (address, position, website, other names). Phone numbers are not delivered.\n\n**Conventions**\n\n- Lengths are whole meters per hole. Add `units=yards` to `GET /v1/courses/{id}` to get yards as well.\n- Missing values are `null`, never `0` and never invented.\n- By default only tees with a course rating and slope are served. Add `include_unrated=true` to any `GET` to also get the tees and courses without a rating, marked by `rated` and `rating_status`.\n- Ids are stable strings. A replaced id answers `301` with the new id; a withdrawn id answers `410`.\n- Lists are sorted by id and paged with an opaque `cursor`.\n- `data_version` changes whenever the approved set changes. `/v1/releases` and `/v1/changes` tell what changed.\n- Every `200` carries an `ETag`; send it back in `If-None-Match` to get `304`.\n- Every error has the form `{\"error\": {\"code\", \"message\"}}`.\n- `GET /v1/courses/{id}/greens` gives the position of the middle of each green (WGS 84), where the course has them; `greens_count` on a course tells how many holes have one.\n- `GET /v1/export/{country}` gives a whole country as one gzip file. `POST /v1/reports` (hosted service) reports an error in a course or club.\n- **What counts** (hosted service): only course data counts toward a quota: per paid period on the paid plans (a month, or a year on `world`), in all on the free trial. `GET /v1/courses/{id}` answering `200` counts 1; `GET /v1/courses/batch` counts the courses it returns; `GET /v1/export/{country}` counts the number of courses in the file. Green positions count on their own: `GET /v1/courses/{id}/greens` counts 1 when the course has at least one position (0 when it has none), and `GET /v1/export/{country}/greens` counts the number of courses in that file. Lists, search, clubs, changes, releases, usage, reports and every `304` are free. Free calls have a per-minute limit on keys with a plan. `X-Request-Cost` tells what a request counted.\n\n**Versioning.** Inside v1, new fields may be added to existing objects, and new endpoints, countries and optional query parameters may appear. Clients must ignore unknown fields. Removing or renaming a field, changing a unit or the meaning of a field, changing the sort order or the paging, or changing the error model needs v2. A replaced id keeps answering `301` for at least one major version.\n\n**Access.** The hosted service needs a customer key in `Authorization: Bearer <key>`. A key sees every country in the current release; a key on the free trial has a small number of course requests in all. What counts toward the quota is described under **What counts** above.\n\n**Data.** The data is delivered as it is.\n"},"servers":[{"url":"https://api.golfdata.io","description":"Production. Send your customer key in `Authorization: Bearer <key>`."}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Courses","description":"Course layouts with par, stroke index, tees and ratings."},{"name":"Clubs","description":"Clubs with their courses and metadata."},{"name":"Meta","description":"Release, coverage and change information."},{"name":"Account","description":"The customer's own usage."},{"name":"Download","description":"A whole country as one file."},{"name":"Feedback","description":"Error reports from customers."}],"paths":{"/v1/meta":{"get":{"operationId":"getMeta","tags":["Meta"],"summary":"Describe the current data release","description":"Versions, counts per country and units of the current release. Compare `data_version` with the one you stored to learn whether anything changed.","parameters":[{"$ref":"#/components/parameters/IncludeUnrated"},{"$ref":"#/components/parameters/IfNoneMatch"}],"responses":{"200":{"description":"The current release.","headers":{"ETag":{"$ref":"#/components/headers/ETag"},"X-Request-Id":{"$ref":"#/components/headers/XRequestId"},"X-Requests-Today":{"$ref":"#/components/headers/XRequestsToday"},"X-Request-Cost":{"$ref":"#/components/headers/XRequestCost"},"X-Quota-Daily":{"$ref":"#/components/headers/XQuotaDaily"},"X-Quota-Monthly":{"$ref":"#/components/headers/XQuotaMonthly"},"X-Quota-Remaining":{"$ref":"#/components/headers/XQuotaRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Meta"}}}},"304":{"$ref":"#/components/responses/NotModified"},"401":{"$ref":"#/components/responses/Unauthorized"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"429":{"$ref":"#/components/responses/QuotaExceeded"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/v1/countries":{"get":{"operationId":"listCountries","tags":["Meta"],"summary":"List coverage per country","description":"One entry per country (England, Scotland and Wales are separate), with the number of courses and clubs, the number of 9- and 18-hole courses and the ids of all courses.","parameters":[{"$ref":"#/components/parameters/IncludeUnrated"},{"$ref":"#/components/parameters/IfNoneMatch"}],"responses":{"200":{"description":"Coverage per country.","headers":{"ETag":{"$ref":"#/components/headers/ETag"},"X-Request-Id":{"$ref":"#/components/headers/XRequestId"},"X-Requests-Today":{"$ref":"#/components/headers/XRequestsToday"},"X-Request-Cost":{"$ref":"#/components/headers/XRequestCost"},"X-Quota-Daily":{"$ref":"#/components/headers/XQuotaDaily"},"X-Quota-Monthly":{"$ref":"#/components/headers/XQuotaMonthly"},"X-Quota-Remaining":{"$ref":"#/components/headers/XQuotaRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountryList"}}}},"304":{"$ref":"#/components/responses/NotModified"},"401":{"$ref":"#/components/responses/Unauthorized"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"429":{"$ref":"#/components/responses/QuotaExceeded"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/v1/courses":{"get":{"operationId":"listCourses","tags":["Courses"],"summary":"List courses","description":"Course summaries sorted by `id`, paged with `limit` and `cursor`. `total_count` counts all matches, not only the page.","parameters":[{"$ref":"#/components/parameters/Country"},{"$ref":"#/components/parameters/Q"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/UpdatedSince"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/IncludeUnrated"},{"$ref":"#/components/parameters/IfNoneMatch"}],"responses":{"200":{"description":"One page of courses.","headers":{"ETag":{"$ref":"#/components/headers/ETag"},"X-Request-Id":{"$ref":"#/components/headers/XRequestId"},"X-Requests-Today":{"$ref":"#/components/headers/XRequestsToday"},"X-Request-Cost":{"$ref":"#/components/headers/XRequestCost"},"X-Quota-Daily":{"$ref":"#/components/headers/XQuotaDaily"},"X-Quota-Monthly":{"$ref":"#/components/headers/XQuotaMonthly"},"X-Quota-Remaining":{"$ref":"#/components/headers/XQuotaRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseList"}}}},"304":{"$ref":"#/components/responses/NotModified"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"429":{"$ref":"#/components/responses/QuotaExceeded"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/v1/courses/batch":{"get":{"operationId":"getCourseBatch","tags":["Courses"],"summary":"Get several courses","description":"Several courses in one request (at most 100 ids), in the order asked (an id asked twice is answered once). Each id is answered as `GET /v1/courses/{id}` would answer it: found courses in `courses`, replaced ids in `moved` (not followed; ask for the new id), withdrawn ids in `gone`, and the rest in `not_found`. Use it to fetch the courses that `/v1/changes` lists. In the hosted service every course in `courses` counts toward the quota, the same as fetching it alone.","parameters":[{"name":"ids","in":"query","required":true,"description":"Course ids separated by commas, 1 to 100. Spaces around an id and empty entries are ignored.","schema":{"type":"string","examples":["es-camposol-club-de-golf-standard-18,es-la-cala-america-18"]}},{"$ref":"#/components/parameters/Units"},{"$ref":"#/components/parameters/IncludeUnrated"},{"$ref":"#/components/parameters/IfNoneMatch"}],"responses":{"200":{"description":"The courses that were found, and what happened to the other ids.","headers":{"ETag":{"$ref":"#/components/headers/ETag"},"X-Request-Id":{"$ref":"#/components/headers/XRequestId"},"X-Requests-Today":{"$ref":"#/components/headers/XRequestsToday"},"X-Request-Cost":{"$ref":"#/components/headers/XRequestCost"},"X-Quota-Daily":{"$ref":"#/components/headers/XQuotaDaily"},"X-Quota-Monthly":{"$ref":"#/components/headers/XQuotaMonthly"},"X-Quota-Remaining":{"$ref":"#/components/headers/XQuotaRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseBatch"}}}},"304":{"$ref":"#/components/responses/NotModified"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"429":{"$ref":"#/components/responses/QuotaExceeded"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/v1/courses/{id}":{"get":{"operationId":"getCourse","tags":["Courses"],"summary":"Get one course","description":"The whole course. A replaced id answers 301 with the new id in `Location` and in the body; a withdrawn id answers 410.","parameters":[{"name":"id","in":"path","required":true,"description":"Course id, as in `id` of a course summary.","schema":{"type":"string","examples":["es-camposol-club-de-golf-standard-18"]}},{"$ref":"#/components/parameters/Units"},{"$ref":"#/components/parameters/IncludeUnrated"},{"$ref":"#/components/parameters/IfNoneMatch"}],"responses":{"200":{"description":"The course.","headers":{"ETag":{"$ref":"#/components/headers/ETag"},"X-Request-Id":{"$ref":"#/components/headers/XRequestId"},"X-Requests-Today":{"$ref":"#/components/headers/XRequestsToday"},"X-Request-Cost":{"$ref":"#/components/headers/XRequestCost"},"X-Quota-Daily":{"$ref":"#/components/headers/XQuotaDaily"},"X-Quota-Monthly":{"$ref":"#/components/headers/XQuotaMonthly"},"X-Quota-Remaining":{"$ref":"#/components/headers/XQuotaRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseDetail"}}}},"301":{"description":"The id has been replaced. Follow `Location`; the body repeats the new id.","headers":{"Location":{"$ref":"#/components/headers/Location"},"X-Request-Id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Moved"}}}},"304":{"$ref":"#/components/responses/NotModified"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"410":{"$ref":"#/components/responses/Gone"},"429":{"$ref":"#/components/responses/QuotaExceeded"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/v1/courses/{id}/greens":{"get":{"operationId":"getCourseGreens","tags":["Courses"],"summary":"Get the green positions of a course","description":"The position of the middle of the green for each hole of the course, in playing order (WGS 84). A hole without a position has `lat` and `lon` null, and a course without any has `greens` null; `greens_count` on the course tells in advance. The id is answered as `GET /v1/courses/{id}`: a replaced id answers 301 with the new id in `Location` and in the body, a withdrawn id answers 410. In the hosted service the request counts 1 toward the quota when the course has at least one position, on top of the course itself, and 0 when it has none.","parameters":[{"name":"id","in":"path","required":true,"description":"Course id, as in `id` of a course summary.","schema":{"type":"string","examples":["es-camposol-club-de-golf-standard-18"]}},{"$ref":"#/components/parameters/IncludeUnrated"},{"$ref":"#/components/parameters/IfNoneMatch"}],"responses":{"200":{"description":"The green positions.","headers":{"ETag":{"$ref":"#/components/headers/ETag"},"X-Request-Id":{"$ref":"#/components/headers/XRequestId"},"X-Requests-Today":{"$ref":"#/components/headers/XRequestsToday"},"X-Request-Cost":{"$ref":"#/components/headers/XRequestCost"},"X-Quota-Daily":{"$ref":"#/components/headers/XQuotaDaily"},"X-Quota-Monthly":{"$ref":"#/components/headers/XQuotaMonthly"},"X-Quota-Remaining":{"$ref":"#/components/headers/XQuotaRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseGreens"}}}},"301":{"description":"The id has been replaced. Follow `Location`; the body repeats the new id.","headers":{"Location":{"$ref":"#/components/headers/Location"},"X-Request-Id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Moved"}}}},"304":{"$ref":"#/components/responses/NotModified"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"410":{"$ref":"#/components/responses/Gone"},"429":{"$ref":"#/components/responses/QuotaExceeded"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/v1/clubs":{"get":{"operationId":"listClubs","tags":["Clubs"],"summary":"List or search clubs","description":"Clubs with their courses, sorted by `id`. With `lat` and `lng` (and optionally `radius_km`) it is a position search: only clubs with a known position within the radius, sorted by distance and then `id`, with `distance_km` set. The filters `city` and `region` were removed on 2026-12-04 and answer `400`: `q` finds clubs by name, town or region.","parameters":[{"$ref":"#/components/parameters/Country"},{"$ref":"#/components/parameters/Q"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/UpdatedSince"},{"$ref":"#/components/parameters/Lat"},{"$ref":"#/components/parameters/Lng"},{"$ref":"#/components/parameters/RadiusKm"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/IncludeUnrated"},{"$ref":"#/components/parameters/IfNoneMatch"}],"responses":{"200":{"description":"One page of clubs.","headers":{"ETag":{"$ref":"#/components/headers/ETag"},"X-Request-Id":{"$ref":"#/components/headers/XRequestId"},"X-Requests-Today":{"$ref":"#/components/headers/XRequestsToday"},"X-Request-Cost":{"$ref":"#/components/headers/XRequestCost"},"X-Quota-Daily":{"$ref":"#/components/headers/XQuotaDaily"},"X-Quota-Monthly":{"$ref":"#/components/headers/XQuotaMonthly"},"X-Quota-Remaining":{"$ref":"#/components/headers/XQuotaRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClubList"}}}},"304":{"$ref":"#/components/responses/NotModified"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"429":{"$ref":"#/components/responses/QuotaExceeded"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/v1/clubs/{id}":{"get":{"operationId":"getClub","tags":["Clubs"],"summary":"Get one club","description":"The club with its courses. A merged club's old id answers 301 with the new id in `Location` and in the body; a withdrawn id answers 410.","parameters":[{"name":"id","in":"path","required":true,"description":"Club id, as in `club_id` of a course summary.","schema":{"type":"string","examples":["es-camposol-club-de-golf-club"]}},{"$ref":"#/components/parameters/IncludeUnrated"},{"$ref":"#/components/parameters/IfNoneMatch"}],"responses":{"200":{"description":"The club.","headers":{"ETag":{"$ref":"#/components/headers/ETag"},"X-Request-Id":{"$ref":"#/components/headers/XRequestId"},"X-Requests-Today":{"$ref":"#/components/headers/XRequestsToday"},"X-Request-Cost":{"$ref":"#/components/headers/XRequestCost"},"X-Quota-Daily":{"$ref":"#/components/headers/XQuotaDaily"},"X-Quota-Monthly":{"$ref":"#/components/headers/XQuotaMonthly"},"X-Quota-Remaining":{"$ref":"#/components/headers/XQuotaRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Club"}}}},"301":{"description":"The club id has been merged into another. Follow `Location`; the body repeats the new id.","headers":{"Location":{"$ref":"#/components/headers/Location"},"X-Request-Id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Moved"}}}},"304":{"$ref":"#/components/responses/NotModified"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"410":{"$ref":"#/components/responses/Gone"},"429":{"$ref":"#/components/responses/QuotaExceeded"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/v1/releases":{"get":{"operationId":"listReleases","tags":["Meta"],"summary":"List data releases","description":"The release history, newest first, with the number of added, changed and removed courses and clubs in each release.","parameters":[{"$ref":"#/components/parameters/IncludeUnrated"},{"$ref":"#/components/parameters/IfNoneMatch"}],"responses":{"200":{"description":"The release history.","headers":{"ETag":{"$ref":"#/components/headers/ETag"},"X-Request-Id":{"$ref":"#/components/headers/XRequestId"},"X-Requests-Today":{"$ref":"#/components/headers/XRequestsToday"},"X-Request-Cost":{"$ref":"#/components/headers/XRequestCost"},"X-Quota-Daily":{"$ref":"#/components/headers/XQuotaDaily"},"X-Quota-Monthly":{"$ref":"#/components/headers/XQuotaMonthly"},"X-Quota-Remaining":{"$ref":"#/components/headers/XQuotaRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReleaseList"}}}},"304":{"$ref":"#/components/responses/NotModified"},"401":{"$ref":"#/components/responses/Unauthorized"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"429":{"$ref":"#/components/responses/QuotaExceeded"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/v1/changes":{"get":{"operationId":"listChanges","tags":["Meta"],"summary":"List changes since a release","description":"The net change in course and club ids from the release `since` to the current one: what was added, what changed and what is gone (with the replacing id when there is one). A `since` that is unknown answers 400: fetch everything again.","parameters":[{"$ref":"#/components/parameters/Since"},{"$ref":"#/components/parameters/IncludeUnrated"},{"$ref":"#/components/parameters/IfNoneMatch"}],"responses":{"200":{"description":"The changes.","headers":{"ETag":{"$ref":"#/components/headers/ETag"},"X-Request-Id":{"$ref":"#/components/headers/XRequestId"},"X-Requests-Today":{"$ref":"#/components/headers/XRequestsToday"},"X-Request-Cost":{"$ref":"#/components/headers/XRequestCost"},"X-Quota-Daily":{"$ref":"#/components/headers/XQuotaDaily"},"X-Quota-Monthly":{"$ref":"#/components/headers/XQuotaMonthly"},"X-Quota-Remaining":{"$ref":"#/components/headers/XQuotaRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Changes"}}}},"304":{"$ref":"#/components/responses/NotModified"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"429":{"$ref":"#/components/responses/QuotaExceeded"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/v1/usage":{"get":{"operationId":"getUsage","tags":["Account"],"summary":"Show the customer's own request counts","description":"Hosted service only; the local reference server does not have this path. Counts are per customer and UTC day; this request is included in `requests_today` and `requests_this_month`, and counts nothing toward the quota.","parameters":[{"$ref":"#/components/parameters/IfNoneMatch"}],"responses":{"200":{"description":"The request counts.","headers":{"ETag":{"$ref":"#/components/headers/ETag"},"X-Request-Id":{"$ref":"#/components/headers/XRequestId"},"X-Requests-Today":{"$ref":"#/components/headers/XRequestsToday"},"X-Request-Cost":{"$ref":"#/components/headers/XRequestCost"},"X-Quota-Daily":{"$ref":"#/components/headers/XQuotaDaily"},"X-Quota-Monthly":{"$ref":"#/components/headers/XQuotaMonthly"},"X-Quota-Remaining":{"$ref":"#/components/headers/XQuotaRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"429":{"$ref":"#/components/responses/QuotaExceeded"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"x-cloud-only":true}},"/v1/export/{country}":{"get":{"operationId":"downloadCountry","tags":["Download"],"summary":"Download a whole country as one file","description":"Every course and every club of one country in the current release as one gzip-compressed JSON file (`CountryExport` once decompressed): the same objects as `GET /v1/courses/{id}` (in meters) and `GET /v1/clubs/{id}`, sorted by id. The same release always gives the same bytes, so the `ETag` changes only when `data_version` does. Use it to keep a full copy; between files, `/v1/changes` tells what changed. The file is served as `application/gzip`; it is not decompressed for you. Counts toward the quota as the number of courses in the file, the same as fetching each course. A key whose plan does not include country files answers `403 plan_limit`.","parameters":[{"name":"country","in":"path","required":true,"description":"Country as a key of `courses_per_country` in /v1/meta, for example `es` or `gb-eng`. Case does not matter.","schema":{"type":"string","examples":["es"]}},{"$ref":"#/components/parameters/IncludeUnrated"},{"$ref":"#/components/parameters/IfNoneMatch"}],"responses":{"200":{"description":"The file.","headers":{"ETag":{"$ref":"#/components/headers/ETag"},"X-Request-Id":{"$ref":"#/components/headers/XRequestId"},"X-Requests-Today":{"$ref":"#/components/headers/XRequestsToday"},"X-Request-Cost":{"$ref":"#/components/headers/XRequestCost"},"X-Quota-Daily":{"$ref":"#/components/headers/XQuotaDaily"},"X-Quota-Monthly":{"$ref":"#/components/headers/XQuotaMonthly"},"X-Quota-Remaining":{"$ref":"#/components/headers/XQuotaRemaining"},"Content-Disposition":{"$ref":"#/components/headers/ContentDisposition"}},"content":{"application/gzip":{"schema":{"type":"string","format":"binary","description":"gzip of a `CountryExport` JSON document (UTF-8)."},"x-decompressed-schema":{"$ref":"#/components/schemas/CountryExport"}}}},"304":{"$ref":"#/components/responses/NotModified"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"429":{"$ref":"#/components/responses/QuotaExceeded"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/v1/export/{country}/greens":{"get":{"operationId":"downloadCountryGreens","tags":["Download"],"summary":"Download the green positions of a whole country as one file","description":"The green positions of every course of one country that has any, in the current release, as one gzip-compressed JSON file (`CountryGreensExport` once decompressed): the same objects as `GET /v1/courses/{id}/greens`, sorted by course id. The same release always gives the same bytes. The file is served as `application/gzip`; it is not decompressed for you. A country without green positions answers `404`; `greens_courses_count` in `/v1/countries` tells in advance. Counts toward the quota as the number of courses in the file (`greens_courses_count`), the same as fetching the green positions of each course, and on top of `GET /v1/export/{country}`. A key whose plan does not include country files answers `403 plan_limit`.","parameters":[{"name":"country","in":"path","required":true,"description":"Country as a key of `courses_per_country` in /v1/meta, for example `es` or `gb-eng`. Case does not matter.","schema":{"type":"string","examples":["es"]}},{"$ref":"#/components/parameters/IncludeUnrated"},{"$ref":"#/components/parameters/IfNoneMatch"}],"responses":{"200":{"description":"The file.","headers":{"ETag":{"$ref":"#/components/headers/ETag"},"X-Request-Id":{"$ref":"#/components/headers/XRequestId"},"X-Requests-Today":{"$ref":"#/components/headers/XRequestsToday"},"X-Request-Cost":{"$ref":"#/components/headers/XRequestCost"},"X-Quota-Daily":{"$ref":"#/components/headers/XQuotaDaily"},"X-Quota-Monthly":{"$ref":"#/components/headers/XQuotaMonthly"},"X-Quota-Remaining":{"$ref":"#/components/headers/XQuotaRemaining"},"Content-Disposition":{"$ref":"#/components/headers/ContentDisposition"}},"content":{"application/gzip":{"schema":{"type":"string","format":"binary","description":"gzip of a `CountryGreensExport` JSON document (UTF-8)."},"x-decompressed-schema":{"$ref":"#/components/schemas/CountryGreensExport"}}}},"304":{"$ref":"#/components/responses/NotModified"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"429":{"$ref":"#/components/responses/QuotaExceeded"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/v1/reports":{"post":{"operationId":"reportError","tags":["Feedback"],"summary":"Report an error in a course or club","description":"Hosted service only; the local reference server does not have this path. Tell us when a value looks wrong. The report is stored and answered with `202`; it changes nothing by itself. We check it like any other correction, and a fix shows up in a later release (`/v1/changes`). The course or club must be visible to your key. At most 100 reports per customer and UTC day; each report also counts as a request.","parameters":[],"requestBody":{"required":true,"description":"The report.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRequest"}}}},"responses":{"202":{"description":"The report is stored.","headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestId"},"X-Requests-Today":{"$ref":"#/components/headers/XRequestsToday"},"X-Request-Cost":{"$ref":"#/components/headers/XRequestCost"},"X-Quota-Daily":{"$ref":"#/components/headers/XQuotaDaily"},"X-Quota-Monthly":{"$ref":"#/components/headers/XQuotaMonthly"},"X-Quota-Remaining":{"$ref":"#/components/headers/XQuotaRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportReceipt"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"429":{"$ref":"#/components/responses/QuotaExceeded"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}},"x-cloud-only":true}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Customer key in `Authorization: Bearer <key>`. Hosted service only. A key on a paid plan sees every country in the current release; a trial key sees the same, with a small number of course requests in all."}},"parameters":{"Country":{"name":"country","in":"query","description":"Only items of one country prefix, as listed in `courses_per_country` of /v1/meta (lower case, for example `es` or `gb-eng`). `gb` gives all of the United Kingdom: England, Northern Ireland, Scotland and Wales (`gb-eng`, `gb-nir`, `gb-sct` and `gb-wls`). Case-insensitive. An unknown code answers 400; GET /v1/countries lists the codes.","schema":{"type":"string","examples":["es"]}},"Q":{"name":"q","in":"query","description":"Free-text search, ignoring case and accents. For courses it looks in club name, course name and id; for clubs in club name, other names, city, province and id. It tries these steps in order and answers with the first that finds something: (1) the text as typed; (2) the text without apostrophes, punctuation and spaces (`Royal St George's` finds `The Royal St Georges Golf Club`, `stockbrook` finds `Stock Brook`); (3) every word on its own, in any order (`Turnberry Ailsa`, `Sandhurst, Victoria`); (4) every distinctive word on its own, with golf's common words optional on both sides (golf, club, course, country, links, resort, the, GC, CC, G&CC, GK, golfklubb and the like) and Saint = St, Sainte = Ste, Mount = Mt, Fort = Ft (`Shotts GC` finds `Shotts Golf Club`, `Saint Denis Golf Course` finds `St. Denis Golf Course`); a search of only common words finds nothing in this step; (5) spelling: a distinctive word of at least 5 letters may differ by one letter, of at least 8 letters by two, where two neighbouring letters swapped count as one (`wokefiled` finds `Wokefield` and `Wakefield`). Steps 2 to 5 match from the start of a word and also look in the names of a club's courses, and for courses in the club's other names, city and province. Places: when the search is a town, city, county or region (the city or province of one of the clubs, or a populated place or region by its English or local name, such as `Gothenburg`, `Munich` or `West Sussex`), the answer also has the clubs within about 25 km of the place, more for a large place and at most 60 km; a state, province or county also has every club whose address names it, wherever in it the club is (`Texas` finds the clubs with `TX` in the address, `County Dublin` those with `Co. Dublin`). Each place counts on its own (`Melbourne` finds the clubs near Melbourne, Australia and near Melbourne, Florida), and with `country` only the places in that country. Without `sort`, the name matches come first (by `id`) and then the place's other clubs (by `id`); with `sort=relevance` the place's clubs come after the name matches, nearest first. When neither the names nor the search as a place find anything, the place is tried without golf's common words (`Gothenburg golf club` finds the clubs near Gothenburg). Spelling (step 5) is tried only when neither the names nor a place found anything. `match` in the response says which kind of step answered. A search that finds something as typed still finds the same matches; when it also names a place, the clubs near the place are added.","schema":{"type":"string"}},"Sort":{"name":"sort","in":"query","description":"`id` (default): the list is sorted by id, as before. `relevance`: the best match comes first, for a search box. With `q`, the matches of steps 1 to 4 are taken together and ordered by how a name meets the search (a name that is the search, then a name that starts with it, then the search from the start of a word in a name, then every distinctive word in the names, then a match in city or province), then fewer letters changed for spelling, fewer words of the search missing, a shorter name without golf's common words, and id. Clubs and courses that only a place found come after the name matches, nearest to the place first. Abbreviations count as written out (`GC` = Golf Club, `CC` = Country Club) and `the` is left out when names are compared. Without `q` the order is by id. Pages follow `next_cursor` as usual. Not with `lat` and `lng`, which sort by distance. Any other value answers 400.","schema":{"type":"string","enum":["id","relevance"],"default":"id"}},"UpdatedSince":{"name":"updated_since","in":"query","description":"Only items updated (`updated_at`) at this instant or later. An ISO 8601 date or date-time (`2026-10-26`, `2026-10-26T08:00:00Z`, `2026-10-26T10:00+02:00`); without a time zone UTC is assumed. For clubs the newest `updated_at` among the club's courses counts; changed club metadata does not. Withdrawn items are not listed: use /v1/changes for those.","schema":{"type":"string"}},"Limit":{"name":"limit","in":"query","description":"Page size, 1 to 500. Default 50.","schema":{"type":"integer","minimum":1,"maximum":500,"default":50}},"Cursor":{"name":"cursor","in":"query","description":"Continue after the previous page: the `next_cursor` of that page. Opaque. Keep the other parameters unchanged between pages.","schema":{"type":"string"}},"Units":{"name":"units","in":"query","description":"`meter` (default) changes nothing. `yards` adds `distances_yd` and `total_yd` (and `distances_yd_women` and `total_yd_women`) to every tee; the meter values stay.","schema":{"type":"string","enum":["meter","yards"],"default":"meter"}},"Lat":{"name":"lat","in":"query","description":"Latitude of a point, -90 to 90. Together with `lng` this turns the request into a position search: only clubs with a known position within `radius_km`, nearest first.","schema":{"type":"number","minimum":-90,"maximum":90}},"Lng":{"name":"lng","in":"query","description":"Longitude of a point, -180 to 180. Must be given together with `lat`.","schema":{"type":"number","minimum":-180,"maximum":180}},"RadiusKm":{"name":"radius_km","in":"query","description":"Search radius in kilometres, greater than 0 and at most 500. Default 50. Requires `lat` and `lng`. When `q` finds nothing within the radius, `outside_radius` names the nearest matches further away.","schema":{"type":"number","exclusiveMinimum":0,"maximum":500,"default":50}},"Since":{"name":"since","in":"query","required":true,"description":"A `data_version` from /v1/meta or /v1/releases. The changes after that release are returned.","schema":{"type":"string"}},"IfNoneMatch":{"name":"If-None-Match","in":"header","description":"An ETag from an earlier response. When it still matches, the answer is 304 without a body.","schema":{"type":"string"}},"IncludeUnrated":{"name":"include_unrated","in":"query","description":"`false` (default): a course is served with only its tees that have a course rating and slope, and a course without such a tee is left out. `true`: the same release with those tees and courses included, marked by `rated` on each tee and `rating_status` on each course. Both views have the same `data_version` but each has its own history: use the same value of `include_unrated` with `/v1/releases` and `/v1/changes` as when you fetched the data. Any other value answers 400.","schema":{"type":"boolean","default":false}}},"headers":{"ETag":{"description":"Strong validator of the response body. Send it back in `If-None-Match` to get 304 when nothing changed.","schema":{"type":"string"}},"XRequestId":{"description":"Unique id (UUID) of the request. Quote it when reporting a problem.","schema":{"type":"string"}},"XRequestsToday":{"description":"Requests counted for the customer today (UTC day), including this one. Hosted service only.","schema":{"type":"integer"}},"XRequestCost":{"description":"What this request counted toward the quota: 1 for a course answering `200`, 1 for the green positions of a course that has any, the number of courses for a country file, 0 for everything else. Hosted service only.","schema":{"type":"integer","minimum":0}},"XQuotaDaily":{"description":"The customer's daily quota of course requests: each course (`GET /v1/courses/{id}` with `200`) counts 1 and each country file counts the number of courses in it. Hosted service only, and only when a daily quota is set.","schema":{"type":"integer"}},"XQuotaMonthly":{"description":"The customer's monthly quota of course requests (the monthly paid plans), counted from the day the paid month started (UTC): each course (`GET /v1/courses/{id}` with `200`) counts 1 and each country file counts the number of courses in it. Hosted service only, and only on a monthly plan; a yearly plan has its quota in `GET /v1/usage` (`period_quota`).","schema":{"type":"integer"}},"XQuotaRemaining":{"description":"Course requests left after this request, of the quota that runs out first when there is both a daily and a monthly quota, plus any course requests bought once. Hosted service only, and only when a quota is set.","schema":{"type":"integer"}},"RetryAfter":{"description":"Seconds to wait before trying again. On `429 quota_exceeded`: 60 when the per-minute limit on free calls is reached, otherwise the seconds until the quota starts again (the next UTC day for a daily quota or for reports, the end of the paid period for a plan, or 60 while a plan is being renewed). On `503 unavailable`: while the data is being updated. Hosted service only.","schema":{"type":"integer"}},"Location":{"description":"Path of the replacing resource, for example `/v1/courses/{new-id}` (`/v1/courses/{new-id}/greens` for green positions). It keeps `units=yards` (courses) and `include_unrated=true` in the query when they were asked for, in that order.","schema":{"type":"string"}},"WWWAuthenticate":{"description":"Always `Bearer`. Hosted service only.","schema":{"type":"string"}},"ContentDisposition":{"description":"`attachment` with a file name of the form `golf-course-data-{country}-{first 12 characters of data_version}.json.gz`, or `...-include-unrated.json.gz` with `include_unrated=true`.","schema":{"type":"string","examples":["attachment; filename=\"golf-course-data-es-ee35ee352b43.json.gz\""]}}},"responses":{"NotModified":{"description":"Not modified: the `If-None-Match` header matched the current ETag. No body.","headers":{"ETag":{"$ref":"#/components/headers/ETag"},"X-Request-Id":{"$ref":"#/components/headers/XRequestId"},"X-Requests-Today":{"$ref":"#/components/headers/XRequestsToday"},"X-Request-Cost":{"$ref":"#/components/headers/XRequestCost"},"X-Quota-Daily":{"$ref":"#/components/headers/XQuotaDaily"},"X-Quota-Monthly":{"$ref":"#/components/headers/XQuotaMonthly"},"X-Quota-Remaining":{"$ref":"#/components/headers/XQuotaRemaining"}}},"BadRequest":{"description":"`bad_request`: the request is not valid, for example an unknown country, a bad `limit`, `cursor`, `updated_since`, `units`, `lat`, `lng` or `radius_km`, or a `since` that is missing or not a known `data_version`, or a report body that is not valid (`POST /v1/reports`).","headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestId"},"X-Requests-Today":{"$ref":"#/components/headers/XRequestsToday"},"X-Request-Cost":{"$ref":"#/components/headers/XRequestCost"},"X-Quota-Daily":{"$ref":"#/components/headers/XQuotaDaily"},"X-Quota-Monthly":{"$ref":"#/components/headers/XQuotaMonthly"},"X-Quota-Remaining":{"$ref":"#/components/headers/XQuotaRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"`unauthorized`: the key is missing, wrong, revoked or inactive. Hosted service only.","headers":{"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"},"X-Request-Id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"`plan_limit`: the key's plan does not include this, for example country files (`/v1/export/{country}` and `/v1/export/{country}/greens`), or the free trial's course requests are used up (then on a course or a batch; it does not start again, so do not retry). Hosted service only.","headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"`not_found`: no such path, no such id, or no such country (for `/v1/export/{country}` and reports, also one outside the key's countries).","headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestId"},"X-Requests-Today":{"$ref":"#/components/headers/XRequestsToday"},"X-Request-Cost":{"$ref":"#/components/headers/XRequestCost"},"X-Quota-Daily":{"$ref":"#/components/headers/XQuotaDaily"},"X-Quota-Monthly":{"$ref":"#/components/headers/XQuotaMonthly"},"X-Quota-Remaining":{"$ref":"#/components/headers/XQuotaRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"MethodNotAllowed":{"description":"`method_not_allowed`: the path does not take this method. Every path takes only GET, except `/v1/reports`, which takes only POST (hosted service). It answers 405 after the key has been checked in the hosted service.","headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestId"},"X-Requests-Today":{"$ref":"#/components/headers/XRequestsToday"},"X-Request-Cost":{"$ref":"#/components/headers/XRequestCost"},"X-Quota-Daily":{"$ref":"#/components/headers/XQuotaDaily"},"X-Quota-Monthly":{"$ref":"#/components/headers/XQuotaMonthly"},"X-Quota-Remaining":{"$ref":"#/components/headers/XQuotaRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Gone":{"description":"`gone`: the id existed earlier and has been withdrawn without a replacement.","headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestId"},"X-Requests-Today":{"$ref":"#/components/headers/XRequestsToday"},"X-Request-Cost":{"$ref":"#/components/headers/XRequestCost"},"X-Quota-Daily":{"$ref":"#/components/headers/XQuotaDaily"},"X-Quota-Monthly":{"$ref":"#/components/headers/XQuotaMonthly"},"X-Quota-Remaining":{"$ref":"#/components/headers/XQuotaRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"QuotaExceeded":{"description":"`quota_exceeded`: the daily or monthly quota of course requests is used up (a course, or a country file that counts more than what is left), or the per-minute limit on free calls is reached, or (for `POST /v1/reports`) the customer has sent 100 reports this UTC day. Hosted service only.","headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestId"},"X-Requests-Today":{"$ref":"#/components/headers/XRequestsToday"},"X-Request-Cost":{"$ref":"#/components/headers/XRequestCost"},"X-Quota-Daily":{"$ref":"#/components/headers/XQuotaDaily"},"X-Quota-Monthly":{"$ref":"#/components/headers/XQuotaMonthly"},"X-Quota-Remaining":{"$ref":"#/components/headers/XQuotaRemaining"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"`internal`: unexpected error. Retry later and quote the `X-Request-Id`. Hosted service only.","headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestId"},"X-Requests-Today":{"$ref":"#/components/headers/XRequestsToday"},"X-Request-Cost":{"$ref":"#/components/headers/XRequestCost"},"X-Quota-Daily":{"$ref":"#/components/headers/XQuotaDaily"},"X-Quota-Monthly":{"$ref":"#/components/headers/XQuotaMonthly"},"X-Quota-Remaining":{"$ref":"#/components/headers/XQuotaRemaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"`unavailable`: no data release is active at the moment, or the data is being updated (then with `Retry-After`; try again after that many seconds). Hosted service only.","headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestId"},"X-Requests-Today":{"$ref":"#/components/headers/XRequestsToday"},"X-Request-Cost":{"$ref":"#/components/headers/XRequestCost"},"X-Quota-Daily":{"$ref":"#/components/headers/XQuotaDaily"},"X-Quota-Monthly":{"$ref":"#/components/headers/XQuotaMonthly"},"X-Quota-Remaining":{"$ref":"#/components/headers/XQuotaRemaining"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","description":"Body of every error response (4xx and 5xx).","properties":{"error":{"type":"object","description":"The error.","properties":{"code":{"type":"string","description":"Machine-readable error code: `bad_request` (400), `unauthorized` (401), `plan_limit` (403), `not_found` (404), `method_not_allowed` (405), `gone` (410), `quota_exceeded` (429), `internal` (500) or `unavailable` (503). Clients should treat a code they do not know as a generic error of that HTTP status.","enum":["bad_request","unauthorized","plan_limit","not_found","method_not_allowed","gone","quota_exceeded","internal","unavailable"]},"message":{"type":"string","description":"Explanation in English for people. Do not match on it; use `code`."}},"required":["code","message"]}},"required":["error"]},"Moved":{"type":"object","description":"Body of a 301 response: the requested id has been replaced by another one.","properties":{"alias_of":{"type":"string","description":"The id that replaces the requested id. The `Location` header points at it."}},"required":["alias_of"]},"Paging":{"type":"object","description":"Paging information for list responses.","properties":{"total_count":{"type":"integer","description":"Number of items matching the query in total, not only on this page."},"limit":{"type":"integer","description":"Page size in effect (the `limit` parameter, or 50)."},"next_cursor":{"type":["string","null"],"description":"Pass this as `cursor` to get the next page. null on the last page. Opaque: do not parse or build it."}},"required":["total_count","limit","next_cursor"]},"CourseSummary":{"type":"object","description":"One playable course layout in short form. Used in course lists and inside clubs.","properties":{"id":{"type":"string","description":"Stable course id: lowercase ASCII and hyphens, starting with the country prefix, for example `es-camposol-club-de-golf-standard-18`. If an id is replaced later, the old id answers 301."},"club_id":{"type":"string","description":"Id of the club the course belongs to."},"club_name":{"type":"string","description":"Name of the club."},"course_name":{"type":"string","description":"Name of the course or layout."},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code in upper case, for example `ES`.","pattern":"^[A-Z]{2}$"},"region":{"type":["string","null"],"description":"ISO 3166-2 code, only for England, Scotland, Wales and Northern Ireland (`GB-ENG`, `GB-SCT`, `GB-WLS`, `GB-NIR`). null for every other country."},"holes_count":{"type":"integer","description":"Number of holes played on this layout. 18 or 9 in almost all cases; 6, 11, 12 and 14 also occur."},"physical_holes_count":{"type":["integer","null"],"description":"Number of physical holes the layout is built on, for example 9 when an 18-hole round is two laps of a 9-hole loop. null when not established."},"par_total":{"type":["integer","null"],"description":"Sum of `par_men` over all holes. null when par is not known for every hole."},"tee_count":{"type":"integer","description":"Number of tees listed on the course."},"updated_at":{"type":"string","description":"When the content of this course last changed through an approval, ISO 8601 with time zone: the newest approval among the course itself, the 9-hole courses whose ratings it carries (`ratings[].half`) and, for a 9-hole course with `part_of`, the 18-hole course it belongs to. A later update of the course moves it. Used by `updated_since`.","format":"date-time"},"part_of":{"$ref":"#/components/schemas/PartOf","description":"Normally null. The front and back nine of an 18-hole layout in the API are not courses of their own: the 18-hole layout carries each half's 9-hole ratings on its tees (`ratings[].half`), and an id that used to be such a half redirects (301) to the 18-hole layout. Set only for the rare 9-hole course that is listed while the same response set also holds its 18-hole layout only under `include_unrated=true`: which layout and which half."},"rating_status":{"type":"string","enum":["rated","partial","unrated"],"description":"`rated`: every tee has a course rating and slope (`rated` is true on all tees). `partial`: some tees have. `unrated`: none has, or the course has no tees. `partial` and `unrated` appear only with `include_unrated=true`."},"greens_count":{"type":"integer","minimum":0,"description":"Number of holes with a green position in `GET /v1/courses/{id}/greens`. 0 when the course has none; then that request is free."}},"required":["id","club_id","club_name","course_name","country","region","holes_count","physical_holes_count","par_total","tee_count","updated_at","part_of","rating_status"]},"Rating":{"type":"object","description":"A course rating and slope for one tee and one category.","properties":{"category":{"type":"string","description":"Rating category: `men` or `women`."},"course_rating":{"type":"number","description":"Course rating, in strokes with one decimal (for example 71.4)."},"slope_rating":{"type":"number","description":"Slope rating. Normally a whole number between 55 and 155 (a few are given with a decimal point)."},"holes":{"type":"integer","description":"Number of holes the rating applies to: 18 or 9 (12 occurs). Read it before using the rating: on a 9-hole course a rating with `holes` 18 is the rating for playing the nine twice, with the par of the two laps in `par_total`."},"par_total":{"type":"integer","description":"Par the rating was issued for."},"half":{"type":["string","null"],"enum":["front","back",null],"description":"null for a rating of the whole layout. `front` or `back` for a 9-hole rating of one half of an 18-hole layout: holes 1-9 or 10-18; on a nine played twice (`published_two_loops`), the first or second loop. Such ratings have `holes` 9 and the par of that half in `par_total`. They are only given where that tee has a nine-hole rating; otherwise there is none."}},"required":["category","course_rating","slope_rating","holes","par_total","half"]},"Tee":{"type":"object","description":"One tee (set of markers) on a course: lengths per hole, printed totals and ratings.","properties":{"name":{"type":"string","description":"Name of the tee as the club writes it."},"kind":{"type":"string","enum":["regular","winter","temporary","youth"],"description":"What sort of tee this is. `winter`: a winter tee (the name says Winter). `temporary`: a temporary tee (the name says Temp or Temporary). `youth`: a tee for a youth age class, served only with `include_unrated=true`. `regular`: every other tee. Absent in releases published before the field was added. Use it to sort or hide tees in a tee picker; new values may be added."},"color":{"type":["string","null"],"description":"Tee colour in English lower case, for example `white`, `yellow`, `red`; a tee with two colours as `green/white`. null when not stated."},"distances_m":{"type":["array","null"],"description":"Length of each hole in whole meters, hole 1 first. null when the tee has no lengths. An entry is null when that hole's length is not known; never 0.","items":{"type":["integer","null"],"description":"Length of one hole in meters, or null."}},"distances_m_women":{"type":["array","null"],"description":"Length of each hole in whole meters for women, hole 1 first, when women play other lengths than men on this tee (for example another teeing area on some holes). null when the tee has no lengths of its own for women; then `distances_m` applies to women too.","items":{"type":"integer","description":"Length of one hole in meters."}},"source_unit":{"type":["string","null"],"description":"Unit the original lengths are in: `yards` or `m`. null when not recorded.","enum":["yards","m",null]},"total_m":{"type":["integer","null"],"description":"Sum of `distances_m`. null when the tee has no lengths or a hole is missing."},"total_m_women":{"type":["integer","null"],"description":"Sum of `distances_m_women`. null when `distances_m_women` is null."},"par_men":{"type":["array","null"],"description":"Par per hole for men on this tee, hole 1 first, when the tee has its own values (for example a women's tee where a hole is par 5 and the men's is par 4). null when the tee has no values of its own; then the course-level `par_men` applies.","items":{"type":"integer","description":"Par of one hole."}},"par_women":{"type":["array","null"],"description":"Par per hole for women on this tee, hole 1 first, when the tee has its own values (for example a women's tee where a hole is par 5 and the men's is par 4). null when the tee has no values of its own; then the course-level `par_women` applies.","items":{"type":"integer","description":"Par of one hole."}},"index_men":{"type":["array","null"],"description":"Stroke index per hole for men on this tee, hole 1 first, when the tee has its own values (for example a women's tee where a hole is par 5 and the men's is par 4). null when the tee has no values of its own; then the course-level `index_men` applies.","items":{"type":"integer","description":"Stroke index of one hole."}},"index_women":{"type":["array","null"],"description":"Stroke index per hole for women on this tee, hole 1 first, when the tee has its own values (for example a women's tee where a hole is par 5 and the men's is par 4). null when the tee has no values of its own; then the course-level `index_women` applies.","items":{"type":"integer","description":"Stroke index of one hole."}},"ratings":{"type":"array","description":"Ratings for this tee, one per category (men, women).","items":{"$ref":"#/components/schemas/Rating"}},"distances_yd":{"type":["array","null"],"description":"Length of each hole in whole yards. Present only with `units=yards`. The card's own yards when the course is measured in yards (`source_unit`); otherwise meters / 0.9144 rounded to a whole number. null when the tee has no lengths (as `distances_m`).","items":{"type":["integer","null"],"description":"Length of one hole in yards, or null when unknown."}},"distances_yd_women":{"type":["array","null"],"description":"Only with `units=yards`: `distances_m_women` in yards, hole 1 first. null when `distances_m_women` is null.","items":{"type":["integer","null"],"description":"Length of one hole in yards, or null."}},"total_yd":{"type":["integer","null"],"description":"Sum of `distances_yd`. Present only with `units=yards`. null when a hole length is missing."},"total_yd_women":{"type":["integer","null"],"description":"Only with `units=yards`: sum of `distances_yd_women`. null when `distances_yd_women` is null."},"rated":{"type":"boolean","description":"true when the tee has at least one rating with both course rating and slope. Nine-hole ratings added from a separate nine (`half`) do not count. Always true unless `include_unrated=true`."}},"required":["name","color","distances_m","source_unit","total_m","par_men","par_women","index_men","index_women","ratings","rated"]},"ClubLocation":{"type":["object","null"],"description":"Position of the club. null when no position is known.","properties":{"lat":{"type":"number","description":"Latitude in decimal degrees (WGS 84).","minimum":-90,"maximum":90},"lon":{"type":"number","description":"Longitude in decimal degrees (WGS 84).","minimum":-180,"maximum":180},"confidence":{"type":"string","description":"`confirmed` when two independent positions agree within 3 km, otherwise `single_source`.","enum":["confirmed","single_source"]}},"required":["lat","lon"]},"ClubAddress":{"type":["object","null"],"description":"Postal address of the club. null when no address is known.","properties":{"street":{"type":["string","null"],"description":"Street name, possibly with the number."},"housenumber":{"type":["string","null"],"description":"House number when given separately."},"postcode":{"type":["string","null"],"description":"Postal code."},"city":{"type":["string","null"],"description":"City or town."},"region":{"type":["string","null"],"description":"Region or province as written in the address (not an ISO code), for example `Malaga`."}},"required":["street","housenumber","postcode","city","region"]},"ClubWebsite":{"type":["object","null"],"description":"Website of the club. null when no website is known.","properties":{"value":{"type":"string","description":"Web address of the club."}},"required":["value"]},"ClubRef":{"type":"object","description":"The club of a course: its id and name, and its metadata when the release carries it.","properties":{"id":{"type":"string","description":"Id of the club."},"name":{"type":"string","description":"Name of the club."},"location":{"$ref":"#/components/schemas/ClubLocation","description":"Position of the club. Present when the release carries club metadata; null when unknown."},"address":{"$ref":"#/components/schemas/ClubAddress","description":"Address of the club. Present when the release carries club metadata; null when unknown."},"website":{"$ref":"#/components/schemas/ClubWebsite","description":"Website of the club. Present when the release carries club metadata; null when unknown."},"other_names":{"type":"array","description":"Other names the club is known by; searched by `q` on `/v1/clubs`. Present when the release carries club metadata with names; an empty list when there are none.","items":{"$ref":"#/components/schemas/ClubName"}}},"required":["id","name"]},"CourseDetail":{"type":"object","description":"A whole course: par and stroke index per hole, tees with lengths and ratings, approval and when it was last updated.","properties":{"id":{"type":"string","description":"Stable course id, as in the summary."},"club":{"$ref":"#/components/schemas/ClubRef","description":"The club the course belongs to."},"course_name":{"type":"string","description":"Name of the course or layout."},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code in upper case, for example `ES`.","pattern":"^[A-Z]{2}$"},"region":{"type":["string","null"],"description":"ISO 3166-2 code for England, Scotland, Wales and Northern Ireland (`GB-ENG`, `GB-SCT`, `GB-WLS`, `GB-NIR`); null elsewhere."},"holes_count":{"type":"integer","description":"Number of holes played on this layout."},"physical_holes_count":{"type":["integer","null"],"description":"Number of physical holes the layout is built on. null when not established."},"par_men":{"type":"array","description":"Par per hole for men, hole 1 first.","items":{"type":"integer","description":"Par of one hole (3, 4 or 5 in practice)."}},"par_women":{"type":["array","null"],"description":"Par per hole for women, hole 1 first. null when there is no separate women's par.","items":{"type":"integer","description":"Par of one hole."}},"index_men":{"type":"array","description":"Stroke index per hole for men, hole 1 first: 1 is the hardest hole, and each number from 1 to `holes_count` occurs once.","items":{"type":"integer","description":"Stroke index of one hole."}},"index_women":{"type":["array","null"],"description":"Stroke index per hole for women. null when there is no separate women's index.","items":{"type":"integer","description":"Stroke index of one hole."}},"par_total":{"type":["integer","null"],"description":"Sum of `par_men`. null when par is not known for every hole."},"tees":{"type":"array","description":"Tees of the course.","items":{"$ref":"#/components/schemas/Tee"}},"updated_at":{"type":"string","description":"When the content of this course last changed through an approval, ISO 8601 with time zone: the newest approval among the course itself, the 9-hole courses whose ratings it carries (`ratings[].half`) and, for a 9-hole course with `part_of`, the 18-hole course it belongs to. A later update of the course moves it. Used by `updated_since`.","format":"date-time"},"data_version":{"type":"string","description":"Version of the data release the response comes from. The same value as `data_version` in /v1/meta."},"part_of":{"$ref":"#/components/schemas/PartOf","description":"Normally null. The front and back nine of an 18-hole layout in the API are not courses of their own: the 18-hole layout carries each half's 9-hole ratings on its tees (`ratings[].half`), and an id that used to be such a half redirects (301) to the 18-hole layout. Set only for the rare 9-hole course that is listed while the same response set also holds its 18-hole layout only under `include_unrated=true`: which layout and which half."},"loops":{"type":["array","null"],"description":"The loops of the layout with a stable id per loop at the club. On an 18-hole layout two entries in playing order, holes 1-9 and holes 10-18 (on a nine played twice, the first and second loop); on a 9-hole course one entry, holes 1-9. Two halves, or a half and a 9-hole course, at the same club are the same loop when par is equal hole by hole and at least one tee has exactly the same length on all nine holes, also through other layouts (A = B and B = C). Stroke index is not compared. A loop found on only one layout gets no id. null when no half belongs to a loop.","items":{"$ref":"#/components/schemas/Loop"}},"used_in":{"type":["array","null"],"description":"For a 9-hole course: the 18-hole layouts in the API whose `loops` give this course as `course_id`, and on which holes. null when none.","items":{"$ref":"#/components/schemas/LoopUse"}},"rating_status":{"type":"string","enum":["rated","partial","unrated"],"description":"`rated`: every tee has a course rating and slope (`rated` is true on all tees). `partial`: some tees have. `unrated`: none has, or the course has no tees. `partial` and `unrated` appear only with `include_unrated=true`."},"greens_count":{"type":"integer","minimum":0,"description":"Number of holes with a green position in `GET /v1/courses/{id}/greens`. 0 when the course has none; then that request is free."}},"required":["id","club","course_name","country","region","holes_count","physical_holes_count","par_men","par_women","index_men","index_women","par_total","tees","updated_at","data_version","part_of","loops","used_in","rating_status"]},"CourseBatch":{"type":"object","description":"Answer of `GET /v1/courses/batch`. Every requested id is in exactly one of the four lists.","properties":{"courses":{"type":"array","description":"The courses found, in the order asked, each as `GET /v1/courses/{id}` returns it.","items":{"$ref":"#/components/schemas/CourseDetail"}},"moved":{"type":"array","description":"Ids that have been replaced: `id` as asked, `alias_of` the replacing id.","items":{"$ref":"#/components/schemas/BatchMoved"}},"gone":{"type":"array","description":"Ids of withdrawn courses (410 on the single endpoint).","items":{"type":"string","description":"A withdrawn course id."}},"not_found":{"type":"array","description":"Ids that are not known, or not in the key's countries.","items":{"type":"string","description":"A course id that is not known."}}},"required":["courses","moved","gone","not_found"]},"BatchMoved":{"type":"object","description":"A replaced id in a batch answer.","properties":{"id":{"type":"string","description":"The id that was asked for."},"alias_of":{"type":"string","description":"The id that replaces it."}},"required":["id","alias_of"]},"Club":{"type":"object","description":"A club with its courses and, when the release carries it, its metadata.","properties":{"id":{"type":"string","description":"Stable club id, for example `es-camposol-club-de-golf-club`. A merged club's old id answers 301."},"name":{"type":"string","description":"Name of the club."},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code in upper case.","pattern":"^[A-Z]{2}$"},"region":{"type":["string","null"],"description":"ISO 3166-2 code for England, Scotland and Wales; null elsewhere."},"courses":{"type":"array","description":"The club's courses, sorted by id.","items":{"$ref":"#/components/schemas/CourseSummary"}},"location":{"$ref":"#/components/schemas/ClubLocation","description":"Position of the club. Present when the release carries club metadata; null when unknown."},"address":{"$ref":"#/components/schemas/ClubAddress","description":"Address of the club. Present when the release carries club metadata; null when unknown."},"website":{"$ref":"#/components/schemas/ClubWebsite","description":"Website of the club. Present when the release carries club metadata; null when unknown."},"other_names":{"type":"array","description":"Other names the club is known by; searched by `q` on `/v1/clubs`. Present when the release carries club metadata with names; an empty list when there are none.","items":{"$ref":"#/components/schemas/ClubName"}}},"required":["id","name","country","region","courses"]},"ClubListItem":{"type":"object","description":"One hit in a club list.","properties":{"club":{"$ref":"#/components/schemas/Club","description":"The club, in the same form as /v1/clubs/{id}."},"distance_km":{"type":["number","null"],"description":"Great-circle distance in kilometres, rounded to whole meters: from the searched point for a position search (`lat` and `lng`, also in `outside_radius`), or from the place for a club that only a place in `q` found. Otherwise null."}},"required":["club","distance_km"]},"CourseList":{"type":"object","description":"One page of courses, sorted by id (best match first with `sort=relevance`).","properties":{"data":{"type":"array","description":"The courses on this page.","items":{"$ref":"#/components/schemas/CourseSummary"}},"match":{"type":["string","null"],"enum":["text","words","place","spelling",null],"description":"Only with `q`: how the search found its matches. `text`: the search as typed, or without punctuation and spaces (steps 1 and 2 of `q`). `words`: every word, or every distinctive word, on its own (steps 3 and 4). `place`: no name matched, and these are near the place the search names (see `q`). `spelling`: nothing matched as written and these are the nearest spellings (step 5), for a \"Did you mean\". null when nothing was found."},"paging":{"$ref":"#/components/schemas/Paging","description":"Paging information."},"unrated_count":{"type":["integer","null"],"description":"Only with `q`: how many more matches the same search has with `include_unrated=true`, which also lists courses and clubs without a course rating. 0 when there are none. null when the request already has `include_unrated=true`, for a position search (`lat` and `lng`), and when the release has no such option. Use it to offer the option when a search finds little or nothing."}},"required":["data","paging"]},"ClubList":{"type":"object","description":"One page of clubs, sorted by id (by distance, then id, for a position search; best match first with `sort=relevance`).","properties":{"data":{"type":"array","description":"The clubs on this page.","items":{"$ref":"#/components/schemas/ClubListItem"}},"match":{"type":["string","null"],"enum":["text","words","place","spelling",null],"description":"Only with `q`: how the search found its matches. `text`: the search as typed, or without punctuation and spaces (steps 1 and 2 of `q`). `words`: every word, or every distinctive word, on its own (steps 3 and 4). `place`: no name matched, and these are near the place the search names (see `q`). `spelling`: nothing matched as written and these are the nearest spellings (step 5), for a \"Did you mean\". null when nothing was found."},"outside_radius":{"type":"array","description":"Only for a position search with `q` (`q`, `lat` and `lng`) that finds no club within `radius_km`: the nearest clubs that the same `q` finds outside the radius, at most 3, nearest first, each with its distance from the point. An empty array when `q` finds no club with a position anywhere in the countries searched. Not present otherwise. Use it to tell your user that the club exists but further away, for example when the point you search from is not where the club is.","items":{"$ref":"#/components/schemas/ClubListItem"}},"paging":{"$ref":"#/components/schemas/Paging","description":"Paging information."},"unrated_count":{"type":["integer","null"],"description":"Only with `q`: how many more matches the same search has with `include_unrated=true`, which also lists courses and clubs without a course rating. 0 when there are none. null when the request already has `include_unrated=true`, for a position search (`lat` and `lng`), and when the release has no such option. Use it to offer the option when a search finds little or nothing."}},"required":["data","paging"]},"Meta":{"type":"object","description":"Description of the current data release.","properties":{"api_version":{"type":"string","description":"Major version of the API. Always `1` in v1.","enum":["1"]},"data_version":{"type":"string","description":"Version of the data: a SHA-256 hex digest that changes with every change of the approved set. Pass it as `since` to /v1/changes later.","pattern":"^[0-9a-f]{64}$"},"generated_at":{"type":"string","description":"Time of the latest approval in the release, ISO 8601 with time zone.","format":"date-time"},"courses_count":{"type":"integer","description":"Number of courses in the release (for the customer's countries in the hosted service)."},"clubs_count":{"type":"integer","description":"Number of clubs in the release."},"courses_per_country":{"type":"object","description":"Number of courses per country prefix, for example `{\"es\": 628}`. The keys are the values `country` accepts.","additionalProperties":{"type":"integer","description":"Number of courses in the country."}},"units":{"type":"object","description":"Units used in the responses.","properties":{"length":{"type":"string","description":"Unit of all lengths: always `meter`.","enum":["meter"]}},"required":["length"]}},"required":["api_version","data_version","generated_at","courses_count","clubs_count","courses_per_country","units"]},"Country":{"type":"object","description":"Coverage of one country, or of one UK nation.","properties":{"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code in upper case.","pattern":"^[A-Z]{2}$"},"region":{"type":["string","null"],"description":"ISO 3166-2 code for England, Scotland, Wales and Northern Ireland (`GB-ENG`, `GB-SCT`, `GB-WLS`, `GB-NIR`); null elsewhere."},"courses_count":{"type":"integer","description":"Number of courses."},"clubs_count":{"type":"integer","description":"Number of clubs."},"nine_hole_courses":{"type":"integer","description":"Number of courses with `holes_count` 9."},"eighteen_hole_courses":{"type":"integer","description":"Number of courses with `holes_count` 18."},"greens_courses_count":{"type":"integer","minimum":0,"description":"Number of courses with at least one green position: the courses in `GET /v1/export/{country}/greens`, and what that file counts toward the quota."}},"required":["country","region","courses_count","clubs_count","nine_hole_courses","eighteen_hole_courses"]},"CountryList":{"type":"object","description":"Coverage per country.","properties":{"countries":{"type":"array","description":"One entry per country (England, Scotland and Wales are separate entries).","items":{"$ref":"#/components/schemas/Country"}}},"required":["countries"]},"ChangeCounts":{"type":"object","description":"Number of ids that were added, changed or removed in one release.","properties":{"added":{"type":"integer","description":"Number of ids added."},"changed":{"type":"integer","description":"Number of ids whose content changed."},"removed":{"type":"integer","description":"Number of ids removed (withdrawn or replaced)."}},"required":["added","changed","removed"]},"Release":{"type":"object","description":"One data release in the history.","properties":{"data_version":{"type":"string","description":"The release's `data_version`.","pattern":"^[0-9a-f]{64}$"},"generated_at":{"type":"string","description":"Time of the latest approval in the release, ISO 8601 with time zone.","format":"date-time"},"previous":{"type":["string","null"],"description":"`data_version` of the release before this one. null for the first release in the history."},"courses":{"$ref":"#/components/schemas/ChangeCounts","description":"Course changes in this release compared with the previous one."},"clubs":{"$ref":"#/components/schemas/ChangeCounts","description":"Club changes in this release compared with the previous one."}},"required":["data_version","generated_at","previous","courses","clubs"]},"ReleaseList":{"type":"object","description":"The release history, newest first.","properties":{"releases":{"type":"array","description":"Releases, newest first. The first one is the current release.","items":{"$ref":"#/components/schemas/Release"}}},"required":["releases"]},"RemovedItem":{"type":"object","description":"An id that no longer exists.","properties":{"id":{"type":"string","description":"The id that was removed."},"alias_of":{"type":["string","null"],"description":"The id that replaces it (the old id then answers 301). null when it was withdrawn (the old id answers 410)."}},"required":["id","alias_of"]},"ChangeSet":{"type":"object","description":"Net change of ids of one kind between two releases.","properties":{"added":{"type":"array","description":"Ids that did not exist in the `since` release and exist now.","items":{"type":"string","description":"An id."}},"changed":{"type":"array","description":"Ids that exist in both and whose content changed.","items":{"type":"string","description":"An id."}},"removed":{"type":"array","description":"Ids that existed in the `since` release and are gone now.","items":{"$ref":"#/components/schemas/RemovedItem"}}},"required":["added","changed","removed"]},"Changes":{"type":"object","description":"Net changes between a past release and the current one.","properties":{"since":{"type":"string","description":"The `data_version` the changes are counted from, as given."},"data_version":{"type":"string","description":"The current `data_version`."},"courses":{"$ref":"#/components/schemas/ChangeSet","description":"Course ids that changed."},"clubs":{"$ref":"#/components/schemas/ChangeSet","description":"Club ids that changed."}},"required":["since","data_version","courses","clubs"]},"Usage":{"type":"object","description":"The customer's own request counts. Hosted service only.","properties":{"customer":{"type":"string","description":"Name of the customer the key belongs to."},"countries":{"type":"array","description":"Country prefixes the key gives access to.","items":{"type":"string","description":"Country prefix, for example `es`."}},"day":{"type":"string","description":"The current day (UTC), YYYY-MM-DD.","format":"date"},"month":{"type":"string","description":"The current month (UTC), YYYY-MM.","pattern":"^[0-9]{4}-[0-9]{2}$"},"requests_today":{"type":"integer","description":"All requests today, free or not, including this one."},"requests_this_month":{"type":"integer","description":"All requests this month, free or not, including this one."},"quota_used_today":{"type":"integer","description":"Course requests counted toward the quota today: 1 per course answering `200`, the number of courses per country file."},"quota_used_this_month":{"type":"integer","description":"Course requests counted toward the quota this calendar month (UTC). A paid plan counts its quota over the paid period instead: see `quota_used_this_period`."},"daily_quota":{"type":["integer","null"],"description":"Course requests allowed per day (see `quota_used_today`). Lists, search and other calls are free. null when no quota is set."},"monthly_quota":{"type":["integer","null"],"description":"Course requests allowed per month on a monthly paid plan, counted over the paid period (see `period_quota` and `quota_used_this_period`). Lists, search and other calls are free. null on a yearly plan and when no plan quota is set."},"plan":{"type":["string","null"],"description":"The key's plan: `trial` (the free trial: a few course requests in all, no country files), `starter`, `basic`, `plus`, `business` or `world` (yearly). null for a customer set up by hand."},"period_quota":{"type":["integer","null"],"description":"Course requests allowed in the current paid period: a month, or a year on `world`. Lists, search and other calls are free. On `trial` it is the trial's course requests in all, which do not start again. null without a plan quota."},"period_start":{"type":["string","null"],"format":"date","description":"The day (UTC) the current paid period started, YYYY-MM-DD. The quota starts again when the plan renews, and a larger plan starts a new period. null without a plan quota."},"period_end":{"type":["string","null"],"format":"date-time","description":"When the current paid period ends and the quota starts again. null without a plan quota, or when it is not known (then the quota follows the calendar month)."},"quota_used_this_period":{"type":["integer","null"],"description":"Course requests counted toward `period_quota` in the current paid period, counting the whole day the period started. null without a plan quota."}},"required":["customer","countries","day","month","requests_today","requests_this_month","daily_quota","monthly_quota","quota_used_today","quota_used_this_month","plan","period_quota","period_start","period_end","quota_used_this_period"]},"PartOf":{"type":["object","null"],"description":"This 9-hole layout is one half, or one loop, of an 18-hole layout in the API: the same holes, par and lengths as that half. null when the layout is not part of another.","properties":{"id":{"type":"string","description":"Id of the 18-hole layout."},"half":{"type":"string","enum":["front","back"],"description":"`front` is holes 1-9 (or the first loop), `back` holes 10-18 (or the second loop)."}},"required":["id","half"]},"ClubName":{"type":"object","description":"Another name the same club is known by (word order, 'Golf Club' for 'Club de Golf', abbreviations). Used by the club search.","properties":{"value":{"type":"string","description":"The name as written."}},"required":["value"]},"CountryExport":{"type":"object","description":"The whole country in one document: what `GET /v1/courses/{id}` and `GET /v1/clubs/{id}` answer for every course and club of the country, sorted by id. Lengths are meters.","properties":{"api_version":{"type":"string","enum":["1"],"description":"API version, as in /v1/meta."},"country":{"type":"string","description":"ISO 3166-1 alpha-2 code, as in /v1/countries."},"region":{"type":["string","null"],"description":"ISO 3166-2 region for countries split by region (for example England), as in /v1/countries; otherwise null."},"data_version":{"type":"string","description":"Version of the data release the file comes from, as in /v1/meta."},"generated_at":{"type":"string","format":"date-time","description":"When the release was generated, as in /v1/meta."},"courses":{"type":"array","description":"Every course of the country, sorted by id.","items":{"$ref":"#/components/schemas/CourseDetail"}},"clubs":{"type":"array","description":"Every club of the country, sorted by id.","items":{"$ref":"#/components/schemas/Club"}}},"required":["api_version","country","region","data_version","generated_at","courses","clubs"]},"ReportRequest":{"type":"object","description":"An error report. Give exactly one of `course_id` and `club_id`, and a message. Unknown fields are refused with `400`. The body may be at most 8192 bytes.","properties":{"course_id":{"type":"string","description":"Id of the course the report is about, as in the API."},"club_id":{"type":"string","description":"Id of the club the report is about, as in the API."},"field":{"type":["string","null"],"maxLength":200,"description":"Optional: which value looks wrong, in your own words or as a path such as `tees[0].ratings[1].slope_rating`."},"message":{"type":"string","minLength":1,"maxLength":2000,"description":"What is wrong and, if you know it, what is right and where it can be seen. Leading and trailing spaces are removed."}},"required":["message"]},"ReportReceipt":{"type":"object","description":"Receipt for a stored report.","properties":{"report":{"type":"object","description":"The stored report.","properties":{"id":{"type":"string","description":"Id of the report; the same as the `X-Request-Id` of the request. Quote it when you contact us."},"received_at":{"type":"string","format":"date-time","description":"When the report was stored, UTC."}},"required":["id","received_at"]}},"required":["report"]},"Loop":{"type":"object","description":"One loop of a layout.","properties":{"holes":{"type":"array","description":"First and last hole of the loop on this layout: `[1, 9]` or `[10, 18]`.","items":{"type":"integer","description":"Hole number."}},"loop_id":{"type":["string","null"],"description":"Id of the loop at the club, `<club id>-loop-<n>`. It stays the same in later releases while any layout that plays the loop remains. null when the half belongs to no loop."},"course_id":{"type":["string","null"],"description":"Id of the 9-hole course that is this loop when the loop has exactly one; on a 9-hole course its own id. null otherwise."}},"required":["holes","loop_id","course_id"]},"LoopUse":{"type":"object","description":"An 18-hole layout that plays this 9-hole course as one of its loops.","properties":{"course_id":{"type":"string","description":"Id of the 18-hole layout."},"holes":{"type":"array","description":"The holes of the 18-hole layout this loop covers: `[1, 9]` or `[10, 18]`.","items":{"type":"integer","description":"Hole number."}}},"required":["course_id","holes"]},"Green":{"type":"object","description":"The middle of the green of one hole. `lat` and `lon` are both null when the hole has no position; a missing position is never estimated.","properties":{"hole":{"type":"integer","minimum":1,"description":"Hole number on this layout, from 1 to `holes_count`."},"lat":{"type":["number","null"],"minimum":-90,"maximum":90,"description":"Latitude of the middle of the green in decimal degrees (WGS 84). null when there is no position for the hole."},"lon":{"type":["number","null"],"minimum":-180,"maximum":180,"description":"Longitude of the middle of the green in decimal degrees (WGS 84). null when there is no position for the hole."}},"required":["hole","lat","lon"]},"CourseGreens":{"type":"object","description":"The green positions of one course: one entry per hole in playing order.","properties":{"course_id":{"type":"string","description":"Course id, as in `id` of the course."},"holes_count":{"type":"integer","description":"Number of holes played on this layout, as on the course."},"greens_count":{"type":"integer","minimum":0,"description":"Number of holes with a position, as `greens_count` on the course."},"greens":{"type":["array","null"],"description":"One entry per hole, hole 1 first, `holes_count` entries. null when the course has no green positions at all.","items":{"$ref":"#/components/schemas/Green"}}},"required":["course_id","holes_count","greens_count","greens"]},"CountryGreensExport":{"type":"object","description":"The green positions of a whole country in one document: what `GET /v1/courses/{id}/greens` answers for every course of the country that has at least one position, sorted by course id.","properties":{"api_version":{"type":"string","enum":["1"],"description":"API version, as in /v1/meta."},"country":{"type":"string","description":"ISO 3166-1 alpha-2 code, as in /v1/countries."},"region":{"type":["string","null"],"description":"ISO 3166-2 region for countries split by region (for example England), as in /v1/countries; otherwise null."},"data_version":{"type":"string","description":"Version of the data release the file comes from, as in /v1/meta."},"generated_at":{"type":"string","format":"date-time","description":"When the release was generated, as in /v1/meta."},"courses":{"type":"array","description":"The green positions of every course of the country that has any, sorted by course id.","items":{"$ref":"#/components/schemas/CourseGreens"}}},"required":["api_version","country","region","data_version","generated_at","courses"]}}}}