Create A Player

Overview

3rd party partners have the ability to create unique USTA player accounts. Each USTA player account is identified by a uaid, which represents the unique identifer for a player. Players should be created before contributing play activity so that the uaid can be used to identify the player in the contribution.

In order to create a player account, the player must accept USTA terms and conditions and indicate acceptance in the contribution body. It is the responsibility of the caller to present the terms and conditions and collect the response before submitting the player account for creation.

In the event that an account matching the player identity already exists at USTA, the existing UAID for that account will be returned. Otherwise, the newly created UAID will be returned.

New accounts created by partners are not visible in usta.com until the player goes in anc claims their account.

Player Account Vs Customer Account

A Player Account differs from a Customer account created on usta.com`. A player account can be used for play activity contribution and profile search but cannot be used for logging into usta.com` without first claiming the account.

 

 

 

 

 

 

Customer Account

Created on usta.com`

Can be used for logging into usta.com`

Player Account

Created using the Player API

Cannot log into usta.com` until the user claims their account using ‘Find Your Account’ function on usta.com`

 

API

This endpoint is designed to only create unique players. In the event that a match to the player exists as a USTA player already, the existing account will be returned. Otherwise, the newly created account will be returned.

URI

Production: POST https://api-ustaconnect.usta.com/v1/usta-service/customers/players/player Stage: POST https://stage-api-ustaconnect.usta.com/v1/usta-service/customers/players/player

Body

The following are the fields that define a unique customer at USTA.

{ "firstName": "Kaiser", "lastName": "Sose", "externalId": "123233123213", "dateOfBirth": "1960-01-01", "gender": "M", "email": "kaiser@gmailg.com", "isAcceptedUSTATerms": true, "termsAcceptedDate": "2024-04-13T10:55:01", "sourceName": "<SOURCE_SYSTEM>", "nationality": "USA", "accessLevel":0, "address": { "address1": "12 Oak Way", "address2": "Apt 1A", "city": "Mt Kisco", "state": "NY", "zipcode": "10536", "countryIso": "USA" } }

Where

Field

Required/Optional

Identifying

Format

Field

Required/Optional

Identifying

Format

firstName

Required

Yes

Must be 2 or more characters

lastName

Required

Yes

Must be 2 or more characters

dateOfBirth

Required

Yes

YYYY-MM-DD

gender

Required

Yes

  • M

  • F

email

Required

No

xxx@yyy.com

externalId

Optional

No

Player Id in source system

address

Optional

No

object defined below

address.address1

Optional

No

Must be 2 or more characters

address.address2

Optional

No

Must be 2 or more characters

address.city

Optional

No

Must be 2 or more characters

address.state

Optional

No

Must be 2 characters

address.zipcode

Required

No

Must be 2 or more characters

address.countryIso

Required

No

3 digit country code for country of residence

nationality

Required

No

3 digit country code for country under whose flag the player competes

isAcceptedUSTATerms

Required

No

True/False

termsAcceptedDate

Required

No

YYYY-DD-MMThh:mm:ss

sourceName

Required

No

Source system name

accessLevel

Required

No

This should be 0

Return Value

When a customer is contributed, the identifying fields will be compared to all existing USTA customers.

  • In the event that a match is found to an existing customer, the existing UAID will be returned.

  • In the event that no match is found and all required fields are present in the contribution, a new USTA customer will be created and the new UAID will be returned.

Standard Response (No merge, new or existing)

{ "uaid": "2018123458", "merged": "False" }

Merged Response (existing)

Error Codes

The following are a list of error codes and descriptions that are returned to the Contributor:

HTTP Error Code

Application Error Code

Description

HTTP Error Code

Application Error Code

Description

400

 

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

401

 

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

403

 

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

404

 

The server can not find the requested resource.

429

 

Rate limiting. The user has sent too many requests in a given amount of time.

Sample Curl

You must first retrieve an access token using Bound or Unbound method. See OKTA Auth0 Client Integration Guide for more on how to request a token.

The following is a sample curl illustrating the contribution of a doubles matchup.

Where:

--header 'Authorization: Bearer eyJraW...

specifies the token that you retrieved using the https://stage-account.usta.com/oauth2/token endpoint.

 

Â