Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Page Tree Search

Overview

The following page describes the management of facilities in USTA ecosystem. Facility can be created and managed through API’s only.

Authentication

Partner who needs to access the facility API need to raised a request for credentials. USTA team will generated the credentials and will be shared with the partner to access the API’s and swagger documentation.

API’s

Following are the endpoints to perform CRUD operations and bulk retrieval of facilities.

Upsert API

The endpoint is designed to create or update the facility. Endpoint checks if request payload has facility Id if exist update operation will be considered. Also endpoint checks the address (Address Line 1, City, State, Zip and country) of the facility in request payload if no facility id exist and if found a match in database returns the existing facility else create new record and return facility id in response.

URI

Code Block
POST https://api-ustaconnect.usta.com/v1/usta-connect/facilities

Request Body

The following is the request payload for facility upsert endpoint

Code Block
{
    "ustaFacilityId": 12345,
    "facilityStatus": "Active",
    "externalFacilityId": "1327537123573",
    "name": "Nassau Tennis Club 111",
    "verifiedBy": "TEST_USER",
    "phoneNumber": "908-359-8730",
    "website": "https://www.website.com",
    "facilityType": "Club",
    "facilityTypeDetail": "Athletic/Commercial Club",
    "isPrivateFlag": false,
    "reservationType": "Managed Reservation",
    "lastUpdatedBy": "Logged_in_user",
    "sourceData": "<Source_data_name>",
    "address": {
        "streetAddressLine1": "1915 Test Rd Test 111",
        "streetAddressLine2": null,
        "city": "Bridgewater",
        "state": "NJ",
        "zip": "08758",
        "postalCode": "08758",
        "country": "US",
        "latitude": "40.4257324",
        "longitude": "-74.6583754"
    },
    "amenities": {
        "proShop": false,
        "spanishSpeaking": false,
        "hittingWall": false,
        "smartGateAccess": false,
        "wheelchairAccessible": false,
        "changingRoom": false,
        "coachingAvailable": false
    },
    "courts": {
        "totalTennisCourts": 10,
        "courtsPlayableStatus": "All Playable",
        "totalIndoorTennisCourts": 4,
        "totalOutdoorTennisCourts": 6,
        "totalBubbleCourts": 0,
        "hasGrassCourts": false,
        "numberOfGrassCourts": 0,
        "hasHardCourts": false,
        "numberOfHardCourts": 0,
        "hasClayCourts": false,
        "numberOfClayCourts": 0,
        "numberOfSoftCourts": 0,
        "hasOtherCourtSurface": false,
        "hasOutdoorLightedCourts": false,
        "numberOfOutdoorLightedCourts": 0,
        "has36ftCourts": false,
        "numberOf36ftCourts": 2,
        "hasBlended36ftCourts": false,
        "numberOf36ftBlendedCourts": 0,
        "hasStandalone36ftCourts": false,
        "numberOf36ftStandaloneCourts": 0,
        "has60ftCourts": false,
        "numberOf60ftCourts": 3,
        "hasBlended60ftCourts": false,
        "numberOf60ftBlendedCourts": 0,
        "hasStandalone60ftCourts": false,
        "numberOf60ftStandaloneCourts": 0,
        "has78ftCourts": false,
        "numberOf78ftCourts": 0,
        "hasPickleballCourts": false,
        "numberOfStandalonePickleballCourts": 0,
        "numberOfPickleballBlendedCourts": 0
    }
}

Read API

The endpoint is designed to read a facility data by passing the facility id.

URI

Code Block
GET https://api-ustaconnect.usta.com/v1/usta-connect/facilities/<FACILITY_ID>

Response Body

The following is the response payload for facility read endpoint

Code Block
{
    "ustaFacilityId": 4000004120,
    "facilityStatus": "Active",
    "externalFacilityId": "74574565645645",
    "name": "Ruff Park2",
    "verifiedBy": "Me",
    "phoneNumber": "270 887 4290",
    "website": "https://hpr.recdesk.com/Community/Facility/Detail?facilityId=11",
    "facilityType": "Parks & Recreation",
    "facilityTypeDetail": "Athletic/Commercial Club",
    "isPrivateFlag": false,
    "reservationType": "Managed Reservation",
    "createdDateTime": "2023-10-16T21:38:39",
    "lastUpdatedBy": "TEST_USER",
    "lastUpdatedDateTime": "2023-10-16T21:38:39",
    "address": {
        "streetAddressLine1": "LITCHFIELD DRIVE, HOPKINSVILLE, KY, 42240",
        "streetAddressLine2": null,
        "city": "Atlanta",
        "state": "GA",
        "zip": "42240",
        "postalCode": "42240",
        "country": "US",
        "section": "Southern",
        "district": "Kentucky",
        "latitude": "36.8858624",
        "longitude": "-87.4928237"
    },
    "amenities": {
        "proShop": false,
        "spanishSpeaking": false,
        "hittingWall": false,
        "smartGateAccess": false,
        "wheelchairAccessible": false,
        "changingRoom": false,
        "coachingAvailable": false
    },
    "courts": {
        "totalTennisCourts": 12,
        "courtsPlayableStatus": "All Playable",
        "totalIndoorTennisCourts": 0,
        "totalOutdoorTennisCourts": 12,
        "totalBubbleCourts": 0,
        "hasGrassCourts": false,
        "numberOfGrassCourts": 0,
        "hasHardCourts": false,
        "numberOfHardCourts": 12,
        "hasClayCourts": false,
        "numberOfClayCourts": 0,
        "numberOfSoftCourts": 0,
        "hasOtherCourtSurface": false,
        "hasOutdoorLightedCourts": false,
        "numberOfOutdoorLightedCourts": 0,
        "has36ftCourts": false,
        "numberOf36ftCourts": 6,
        "hasBlended36ftCourts": false,
        "numberOf36ftBlendedCourts": 0,
        "hasStandalone36ftCourts": false,
        "numberOf36ftStandaloneCourts": 0,
        "has60ftCourts": false,
        "numberOf60ftCourts": 0,
        "hasBlended60ftCourts": false,
        "numberOf60ftBlendedCourts": 0,
        "hasStandalone60ftCourts": false,
        "numberOf60ftStandaloneCourts": 0,
        "has78ftCourts": false,
        "numberOf78ftCourts": 0,
        "hasPickleballCourts": false,
        "numberOfStandalonePickleballCourts": 0,
        "numberOfPickleballBlendedCourts": 0
    }
}

Delete API

The endpoint is designed to mark the facility deleted for the source. This will be a soft delete and facility itself will not be deleted from data base. Endpoint will mark the association of the source and facility as deleted.

URI

Code Block
DELETE https://api-ustaconnect.usta.com/v1/usta-connect/facilities/<FACILITY_ID>?sourceName=<SOURCE_NAME>

Retrieval API

The endpoint is designed to retrieve the facility data in bulk. There are some restrictions implemented by this endpoint to control the bulk nature of retrieval. Restrictions are listed below.

URI

Code Block
POST https://api-ustaconnect.usta.com/v1/usta-connect/facilities/retrieve

Request Body

The following is the request payload for facility upsert retrieve endpoint

Code Block
{
   "from": "2023-09-29T08:00:00",
   "to": "2023-09-29T11:43:08",
   "excludeSource": "<SOURCE_NAME>",
   "page": 1,
   "size": 5
}

Response Body

The following is the response payload for facility retrieve endpoint

Code Block
{
   "data":[
      {
         "ustaFacilityId":7000004120,
         "facilityStatus":"Active",
         "externalFacilityId":"74574565645645",
         "name":"TestPark2",
         "verifiedBy":"Me",
         "phoneNumber":"1234567890",
         "website":"https://hpr.test.com/Community/Facility/Detail?facilityId=11",
         "facilityType":"Parks & Recreation",
         "facilityTypeDetail":"Athletic/Commercial Club",
         "isPrivateFlag":false,
         "reservationType":"Managed Reservation",
         "createdDateTime":"2023-10-16T21:38:39",
         "lastUpdatedBy":"TEST_USER",
         "lastUpdatedDateTime":"2023-10-16T21:38:39",
         "address":{
            "streetAddressLine1":"LITCHFIELD DRIVE, HOPKINSVILLE, KY, 42240",
            "streetAddressLine2":null,
            "city":"Atlanta",
            "state":"GA",
            "zip":"42240",
            "postalCode":"42240",
            "country":"US",
            "section":"Southern",
            "district":"Kentucky",
            "latitude":"36.8858624",
            "longitude":"-87.4928237"
         },
         "amenities":{
            "proShop":false,
            "spanishSpeaking":false,
            "hittingWall":false,
            "smartGateAccess":false,
            "wheelchairAccessible":false,
            "changingRoom":false,
            "coachingAvailable":false
         },
         "courts":{
            "totalTennisCourts":12,
            "courtsPlayableStatus":"All Playable",
            "totalIndoorTennisCourts":0,
            "totalOutdoorTennisCourts":12,
            "totalBubbleCourts":0,
            "hasGrassCourts":false,
            "numberOfGrassCourts":0,
            "hasHardCourts":false,
            "numberOfHardCourts":12,
            "hasClayCourts":false,
            "numberOfClayCourts":0,
            "numberOfSoftCourts":0,
            "hasOtherCourtSurface":false,
            "hasOutdoorLightedCourts":false,
            "numberOfOutdoorLightedCourts":0,
            "has36ftCourts":false,
            "numberOf36ftCourts":6,
            "hasBlended36ftCourts":false,
            "numberOf36ftBlendedCourts":0,
            "hasStandalone36ftCourts":false,
            "numberOf36ftStandaloneCourts":0,
            "has60ftCourts":false,
            "numberOf60ftCourts":0,
            "hasBlended60ftCourts":false,
            "numberOf60ftBlendedCourts":0,
            "hasStandalone60ftCourts":false,
            "numberOf60ftStandaloneCourts":0,
            "has78ftCourts":false,
            "numberOf78ftCourts":0,
            "hasPickleballCourts":false,
            "numberOfStandalonePickleballCourts":0,
            "numberOfPickleballBlendedCourts":0
         }
      }
   ],
   "total_hits":100
}

Restrictions

  • Only last two month of data can be fetched with this endpoint

  • Maximum of 100 result per request

  • Maximum result set size of 5000

Panel
bgColor#FFFFFF

On This Page:

Table of Contents
Panel
bgColor#FFFFFF

Subtopics:

Child pages (Children Display)
Panel
bgColor#FFFFFF

More Reading:

Claiming A Player Account

https://worldtennisnumber.com/