Facility API Reference Guide
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
POST https://api-ustaconnect.usta.com/v1/usta-connect/facilities
Request Body
The following is the request payload for facility upsert endpoint
{
"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
GET https://api-ustaconnect.usta.com/v1/usta-connect/facilities/<FACILITY_ID>
Response Body
The following is the response payload for facility read endpoint
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
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
Request Body
The following is the request payload for facility retrieve endpoint
Response Body
The following is the response payload for facility retrieve endpoint
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
On This Page:
- 1 Overview
- 2 Authentication
- 3 API’s
- 3.1 Upsert API
- 3.1.1 URI
- 3.1.2 Request Body
- 3.2 Read API
- 3.2.1 URI
- 3.2.2 Response Body
- 3.3 Delete API
- 3.3.1 URI
- 3.4 Retrieval API
- 3.4.1 URI
- 3.4.2 Request Body
- 3.4.3 Response Body
- 3.4.4 Restrictions
- 3.1 Upsert API
Subtopics: