Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 32 Next »

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.

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

POST https://services.usta.com/v1/dataexchange/players/player

Body

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

{
  "firstName": "Kaiser",
  "lastName": "Sose"
  "dateOfBirth": "1960-01-01",
  "gender": "M",
  "isAcceptedUSTATerms": True,
  "email": "kaiser@gmailg.com"
  "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

  • M

  • F

email

Optional

No

xxx@yyy.com

address

Optional

No

object defined below

address.address1

Required

No

Must be 2 or more characters

address.address2

Optional

No

Must be 2 or more characters

address.city

Required

No

Must be 2 or more characters

address.state

Required

No

Must be 2 characters

address.zipcode

Required

No

Must be 2 or more characters

address.countryIso

Required

No

Country code for country of residence

competitionNationalityIso

Required

No

Country code for country under whose flag the player competes

isAcceptedUSTATerms

Required

No

True/False

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)

{
  "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/token endpoint.

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",
  "email": "example@example.com",
  "gender": "M",
  "address": {
    "address1": "12 Oak Way",
    "address2": "Apt 1A",
    "city": "Mt Kisco",
    "state": "NY",
    "zipcode": "10536",
    "countryIso": "US"
  },
  "competitionNationalityCountryIso": "US"
  "isAcceptedUSTATerms": true,
  "termsAcceptedDate": "2022-06-10T10:55"
}
'

 

On This Page:

More Reading:

ISO Country Codes

  • No labels