Facility API Reference Guide

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

You must first retrieve an access token using machine-to-machine method. See USTA Connect - Authentication OKTA for more on how to request a token.

Base URLs

Replace {BASE_URL} with the following value:

PROD: https://api-ustaconnect.usta.com

STAGE: https://stage-api-ustaconnect.usta.com

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

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 {BASE_URL}/v1/usta-connect/facilities

Request Body Schema

Field

Type

Required

Description

Field

Type

Required

Description

ustaFacilityId

Integer

Optional

Facility Id assigned by USTA after upsert

facilityStatus

String

Required

Active
Closed
Duplicate
Nonexistent
ConvertedPickleBall
Inactive

externalFacilityId

String

Optional

source/customer generated Facility Id if any

name

String

Required

Name of the facility

verifiedBy

String

Optional

Internal to USTA, once facility data is validated by USTA person his name will be updated here.
Must be provided on Update

phoneNumber

String

Optional

Phone number of the facility in format “XXX-XXX-XXXX”

website

String

Optional

Facility website

facilityType

String

Optional

Club
Parks & Recreation
Private Homeowner
School
Service Facility
Corporation

facilityTypeDetail

String

Optional

Public Park
Community/Recreation Center
School
College/University
Country Club
Athletic/Commercial Club
Apartments/Condominiums
Private Residence
Homeowner Association

isPrivateFlag

Boolean

Required

Is this facility private (true) or publicly available (false)

reservationType

String

Optional

First Come/First Served
Managed Reservation
Unknown

lastUpdatedBy

String

Optional

Internal to USTA. Name/Id of the person who made the last update.

Must be provided on Update

sourceData

String

Required

Facility source name

Address

streetAddressLine1

String

Required

Facility address line 1

streetAddressLine2

String

Optional

Facility address line 2

city

String

Required

City facility located in

state

String

Required

State facility located in

zip

String

Required

Full zip code include 9 digit zip code +4 (08844-3497)

postalCode

String

Required

5 digit zip code

country

String

Required

Country facility located in

latitude

String

Optional

Latitude of the facility, will be calculated by provided address if not provided

longitude

String

Optional

Longitude of the facility, will be calculated by provided address if not provided

Amenities

proShop

Boolean

Optional

Is there a pro shop available at this facility

spanishSpeaking

Boolean

Optional

Is Spanish-speaking staff available at this facility

hittingWall

Boolean

Optional

Does this facility have a hitting wall

smartGateAccess

Boolean

Optional

Does this facility offer smart gate access

wheelchairAccessible

Boolean

Optional

Is this facility wheelchair accessible

changingRoom

Boolean

Optional

Is there a changing room available

coachingAvailable

Boolean

Optional

Is coaching available at this facility

Courts

totalTennisCourts

Integer

Optional

Total amount of tennis courts at the facility.
Defaulted as totalIndoorTennisCourts + totalOutdoorTennisCourts

courtsPlayableStatus

String

Optional

All Playable
Permanently Closed
Some Unplayable
Unplayable

totalIndoorTennisCourts

Integer

Optional

Total amount of indoor tennis courts at the facility.
Defaulted to 0

totalOutdoorTennisCourts

Integer

Optional

Total amount of outdoor tennis courts at the facility.
Defaulted to 0

totalBubbleCourts

Integer

Optional

Total amount of bubble courts at the facility.
Defaulted to 0

hasGrassCourts

Boolean

Optional

Does this facility have grass courts

numberOfGrassCourts

Integer

Optional

Total amount of grass courts at the facility if available

hasHardCourts

Boolean

Optional

Does this facility have hard courts

numberOfHardCourts

Integer

Optional

Total amount of hard courts at the facility if available

hasClayCourts

Boolean

Optional

Does this facility have clay courts

numberOfClayCourts

Integer

Optional

Total amount of clay courts at the facility if available

numberOfSoftCourts

Integer

Optional

Total amount of soft courts at the facility if available

hasOtherCourtSurface

Boolean

Optional

Does this facility have other court surface

hasOutdoorLightedCourts

Boolean

Optional

Does this facility have outdoor lighted courts

numberOfOutdoorLightedCourts

Integer

Optional

Total amount of outdoor lighted courts at the facility if available

has36ftCourts

Boolean

Optional

Does this facility have 36ft courts

numberOf36ftCourts

Integer

Optional

Total amount of 36ft courts at the facility if available

hasBlended36ftCourts

Boolean

Optional

Does this facility have blended 36ft courts

numberOf36ftBlendedCourts

Integer

Optional

Total amount of blended 36ft courts at the facility if available

hasStandalone36ftCourts

Boolean

Optional

Does this facility have standalone 36ft courts

numberOf36ftStandaloneCourts

Integer

Optional

Total amount of standalone 36ft courts at the facility if available

has60ftCourts

Boolean

Optional

Does this facility have 60ft courts

numberOf60ftCourts

Integer

Optional

Total amount of 60ft courts at the facility if available

hasBlended60ftCourts

Boolean

Optional

Does this facility have blended 60ft courts

numberOf60ftBlendedCourts

Integer

Optional

Total amount of 60ft blended courts at the facility if available

hasStandalone60ftCourts

Boolean

Optional

Does this facility have standalone 60ft courts

numberOf60ftStandaloneCourts

Integer

Optional

Total amount of 60ft standalone courts at the facility if available

has78ftCourts

Boolean

Optional

Does this facility have 78ft courts

numberOf78ftCourts

Integer

Optional

Total amount of 78ft courts at the facility if available

hasPickleballCourts

Boolean

Optional

Total amount of pickleball courts at the facility if available

numberOfStandalonePickleballCourts

Integer

Optional

Total amount of standalone pickleball courts at the facility if available

numberOfPickleballBlendedCourts

Integer

Optional

Total amount of blended pickleball courts at the facility if available

 

Request example

{ "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 } }

Responses

Status

Body

Meaning

Status

Body

Meaning

200 - Success

{ "lastUpdatedBy": "string", "amenities": { "smartGateAccess": true, "hittingWall": true, "coachingAvailable": true, "proShop": true, "wheelchairAccessible": true, "spanishSpeaking": true, "changingRoom": true, "locker": true }, "website": "string", "address": { "zip": "string", "country": "string", "city": "string", "postalCode": "string", "latitude": "string", "section": "string", "streetAddressLine2": "string", "streetAddressLine1": "string", "section_id": "string", "district": "string", "state": "string", "district_id": "string", "longitude": "string" }, "facilityType": "string", "ustaFacilityId": "string", "createdDateTime": "string", "facilityTypeDetail": "string", "courts": { "totalIndoorTennisCourts": 0, "has60ftCourts": true, "hasOutdoorLightedCourts": true, "has78ftCourts": true, "totalBubbleCourts": 0, "numberOf60ftCourts": 0, "hasOtherCourtSurface": true, "hasBlended60ftCourts": true, "hasStandalone36ftCourts": true, "hasPickleballCourts": true, "numberOfSoftCourts": 0, "numberOfStandalonePickleballCourts": 0, "numberOfHardCourts": 0, "numberOf60ftBlendedCourts": 0, "numberOfGrassCourts": 0, "numberOf36ftCourts": 0, "hasStandalone60ftCourts": true, "numberOfOutdoorLightedCourts": 0, "hasBlended36ftCourts": true, "hasClayCourts": true, "numberOf36ftStandaloneCourts": 0, "numberOf60ftStandaloneCourts": 0, "numberOfPickleballBlendedCourts": 0, "numberOfClayCourts": 0, "courtsPlayableStatus": "string", "totalOutdoorTennisCourts": 0, "hasHardCourts": true, "totalTennisCourts": 0, "has36ftCourts": true, "hasGrassCourts": true, "numberOf36ftBlendedCourts": 0, "numberOf78ftCourts": 0 }, "facilityStatus": "string", "externalFacilityId": "string", "verifiedBy": "string", "phoneNumber": "string", "isPrivateFlag": true, "name": "string", "reservationType": "string", "survivorFacilityId": "string", "lastUpdatedDateTime": "string" }

Standard Response

400 - Bad request

{ "message": "string" }

The request could not be understood by the server due to incorrect syntax. The client SHOULD NOT repeat the request without modifications.

401 - UNAUTHORIZED

 

Indicates that the request requires user authentication information. The client MAY repeat the request with a suitable Authorization header field.

403 - FORBIDDEN

 

Unauthorized request. The client does not have access rights to the content. Unlike 401, the client’s identity is known to the server.

404 - NOT FOUND

{ "message": "string" }

The server can not find the requested resource.

409 - CONFLICT

{ "message": "string" }