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/v1/facilities
  • Query Parameters
    • country: e.g. United Kingdom (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/v1/facilities/?country=United+Kingdom'

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": "",
                "email": "",
                "address": {
                    "address1": "",
                    "address2": "",
                    "number": "",
                    "addition": "",
                    "zipcode": "",
                    "place": "",
                    "state": "",
                    "country": "United Kingdom"
                }
            },
            {
                "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/v1/facilities/?country=United+Kingdom&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": "",
                "email": "",
                "address": {
                    "address1": "",
                    "address2": "",
                    "number": "",
                    "addition": "",
                    "zipcode": "",
                    "place": "",
                    "state": "",
                    "country": "United Kingdom"
                }
            }
        ]
    }

Find Golf Facility by ID

Returns details of the specified golf facility

GET /api/v1/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/v1/facilities/5'
  • Successful Response (application/json)
    {
        "success": true,
        "data": {
            "id": 5,
            "name": "Facility with id 5",
            "website": "",
            "email": "",
            "address": {
                "address1": "",
                "address2": "",
                "number": "",
                "addition": "",
                "zipcode": "",
                "place": "",
                "state": "",
                "country": "United Kingdom"
            }
        }
    }