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/v5/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/v5/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/v5/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/v4/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/v5/facilities/5'
  • Successful Response (application/json)
    {
        "success": true,
        "data": [
            {
                "id": 45,
                "name": "fac45",
                "website": "fac45.com",
                "email": "fac45@mail.com",
                "timeZone": "Etc/GMT+0",
                "address": {
                    "mid": 438,
                    "address1": "Fac45",
                    "number": "45",
                    "addition": "45",
                    "zipcode": "45",
                    "place": "Rotterdam",
                    "state": "Zuid-Holland",
                    "country": "Netherlands",
                    "latitude": 54.56,
                    "longitude": 78.77,
                    "region": ""
                },
                "language": "en",
                "currencyCode": "EUR",
                "created": "2022-05-19T10:52:46.553"
            },
            {
                "paymentRule": {
                    "mid": 227,
                    "name": "time of play2",
                    "description": "",
                    "firstPaymentCondition": "Time of Play",
                    "lastPaymentCondition": "Time of Play",
                    "firstPaymentConditionDuration": 50,
                    "lastPaymentConditionDuration": 49,
                    "firstPaymentConditionPercentage": 50,
                    "lastPaymentConditionPercentage": 50
                },
                "applicableForWhitelable": false
            }
        ]
    }
    

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/v5/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/v5/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"
            ]
        }
    }