Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Page Tree Search |
---|
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.
Info |
---|
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
Code Block |
---|
POST https://services.usta.com/v1/dataexchange/players/player |
Body
The following are the fields that define a unique customer at USTA.
Code Block |
---|
{ "firstName": "Kaiser", "lastName": "Sose" "dateOfBirth": "1960-01-01", "gender": "M", "email": "kaiser@gmailg.com", "isAcceptedUSTATerms": true, "termsAcceptedDate": True"2024-04-13T10:55:01", "sourceName": "<SOURCE_SYSTEM>", "emailnationality": "kaiser@gmailg.comUSA", "accessLevel":0, "address": { "address1": "12 Oak Way", "address2": "Apt 1A", "city": "Mt Kisco", "state": "NY", "zipcode": "10536", "countryIso": "USA" }, "competitionNationalityIso": "USA" } |
Where
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 |
|
OptionalRequired | No | xxx@yyy.com | |
| Optional | No | Player Id in source system |
address | Optional | No | object defined below |
address.address1 | RequiredOptional | No | Must be 2 or more characters |
address.address2 | Optional | No | Must be 2 or more characters |
address.city | RequiredOptional | No | Must be 2 or more characters |
address.state | RequiredOptional | 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 |
competitionNationalityIso | Required | No | 3 digit country code for country under whose flag the player competes |
| Required | No | True/False |
termsAcceptedDate | Required | No | YYYY-DD-MMThh:mm:ss |
| Required | No | Source system name |
| 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)
Code Block |
---|
{ "uaid": "2018123458", "merged": "False" } |
Merged Response (existing)
Code Block |
---|
{ "uaid": "2018123458", "merged": "True", "oldUAID": "2018123456" } |
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 |
---|---|---|
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 Cognito 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/tokenendpoint.
Code Block |
---|
curl --location --request POST 'https://stage-services.usta.com/v1/dataexchange/players/player' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer eyJraW...' \ --header 'Cookie: JSESSIONID=A18BF05059108055D15F38262123C04D' \ --data-raw '{ "firstName": "Kaiser", "lastName": "Sose", "dateOfBirth": "1960-01-01", "gender": "M", "email": "example@examplekaiser@gmailg.com", "gender"isAcceptedUSTATerms": true, "termsAcceptedDate": "2024-04-13T10:55:01", "sourceName": "<SOURCE_SYSTEM>", "nationality": "M""USA", "accessLevel":0, "address": { "address1": "12 Oak Way", "address2": "Apt 1A", "city": "Mt Kisco", "state": "NY", "zipcode": "10536", "countryIso": "USUSA" }, "competitionNationalityCountryIso": "US" "isAcceptedUSTATerms": true, "termsAcceptedDate": "2022-06-10T10:55" } ' |
Panel | ||
---|---|---|
| ||
Panel | ||
---|---|---|
| ||
On This Page: |
Table of Contents |
---|
Panel | ||
---|---|---|
| ||
More Reading: |