Golf Facilities

Returns a list of all the golf facilities in the specified country. Returns a list of only connected golf facilities in the specified country if connected query parameter is set to true.

List Golf Facilities

To list the golf facilities in a given country, send a request to below URL.

GET /api/v3/facilities
  • Query Parameters
    • country: e.g. the Netherlands (string, required) - Golf facilities filtered based on the country
    • connected: e.g. true (boolean, optional) - If set to true - only connected facilities per country.

Listing of all the golf facilities can be done with a curl command like so :

curl -X GET -H 'Content-Type:application/json'  --user username:password '[[base-url]]/api/v3/facilities/?country=the+Netherlands'

And provided that the country is recognized, should result in a json structure like this:

  • Response 200 (application/json)
    {
        "success": true,
        "data": [
            {
                "id": 5,
                "name": "Facility with id 5",
                "website": "https://cm.zest.golf",
                "email": "zest@mail.com",
                "address": {
                    "address1": "Baan",
                    "address2": "",
                    "number": "74",
                    "addition": "",
                    "zipcode": "3011 CD",
                    "place": "Rotterdam",
                    "state": "Zuid-Holland",
                    "country": "the Netherlands"
                }
            },
            {
                "id": 7,
                "name": "Facility with Id 7",
                "website": "albatros.com",
                "email": "al@ba.tros",
                "address": {
                    "address1": "",
                    "address2": "",
                    "number": "",
                    "addition": "",
                    "zipcode": "",
                    "place": "",
                    "state": "",
                    "country": "United Kingdom"
                }
            }
        ]
    }

Listing of the connected golf facilities can be done with a curl command like this :

curl -X GET -H 'Content-Type:application/json'  --user username:password '[[base-url]]/api/v3/facilities/?country=the+Netherlands&connected=true'

Provided that the country is recognized and there are connected to the channel facilities in that country, should result in a json structure like this:

  • Response 200 (application/json)
    {
        "success": true,
        "data": [
            {
                "id": 5,
                "name": "Facility with id 5",
                "website": "https://cm.zest.golf",
                "email": "zest@mail.com",
                "address": {
                    "address1": "Baan",
                    "address2": "",
                    "number": "74",
                    "addition": "",
                    "zipcode": "3011 CD",
                    "place": "Rotterdam",
                    "state": "Zuid-Holland",
                    "country": "the Netherlands"
                }
            }
        ]
    }

Find Golf Facility by ID

Returns details of the specified golf facility

GET /api/v3/facilities/{facilityId}
  • Path Parameters
    • facilityId: e.g. 1 (integer, required) - ID of golf facility to fetch
curl -X GET -H 'Content-Type:application/json'  --user [[username]]:[[password]] '[[base-url]]/api/v3/facilities/5'
  • Successful Response (application/json)
    {
        "success": true,
        "data": {
            "id": 5,
            "name": "Facility with id 5",
            "website": "https://cm.zest.golf",
            "email": "zest@mail.com",
            "address": {
                "address1": "Baan",
                "address2": "",
                "number": "74",
                "addition": "",
                "zipcode": "3011 CD",
                "place": "Rotterdam",
                "state": "Zuid-Holland",
                "country": "the Netherlands"
            }
        }
    }
    

Get Verbose Facility Details by ID

Returns complete details of the specified golf facility. These details include services, branding information, address and more.

GET /api/v3/facilities/details/{facilityId}
  • Path Parameters
    • facilityId: e.g. 1 (integer, required) - ID of golf facility to get details from.
curl -X GET -H 'Content-Type:application/json'  --user [[username]]:[[password]] '[[base-url]]/api/v3/facilities/details/5'
  • Successful Response (application/json)
    {
        "success": true,
        "data": {
            "id": 5,
            "name": "Facility with id 5",
            "latitude": 51.913476,
            "longitude": 4.481602,
            "address": {
                "address1": "Baan",
                "number": "74",
                "addition": "",
                "zipcode": "3011 CD",
                "place": "Rotterdam",
                "state": "Zuid-Holland",
                "country": "the Netherlands"
            },
            "phoneNumber": "",
            "email": "zest@mail.com",
            "website": "https://cm.zest.golf",
            "reservationsContact": {
              "name": "John Smith",
              "email" : "john.smith@google.com(opens in new tab)",
              "phoneNumber" : "+31645623443"
            },
            "foundedIn": 2019,
            "description": "description of the facility",
            "services": {
                "mid": 1,
                "drivingRange": true,
                "chippingArea": true,
                "puttingGreen": true,
                "proShop": true,
                "golfSchool": false,
                "golfBuggy": false,
                "pushTrolley": false,
                "electricTrolley": false,
                "golfClubRentals": true,
                "caddies": true,
                "restaurant": true,
                "bar": true,
                "lockerRoom": false,
                "wifi": false,
                "shuttleService": false
            },
            "logo": "https://cm.zest.golf/branding/facility/1/logo",
            "images": [
                "https://cm.zest.golf/branding/facility/1/image1",
                "https://cm.zest.golf/branding/facility/1/image2",
                "https://cm.zest.golf/branding/facility/1/image3"
            ]
        }
    }