User Registration

This service will handle creation of a user.

Create a user

PUT HTTPS /v1/users
Name Required Values Description
AUTHORIZATION Y Bearer {token} Used to attach access token for API call

Body

Name Required Values Description
CONTENT-TYPE Y application/json Used to alert the rest service to the presence of a json body

Body Fields

Name Type Constrain Description
username String 4 - 20 characters username
password String 4 - 20 characters password
firstName String 1 - 20 characters first name
lastName String 1 - 20 characters last name
emailAddress String 3 - 100 characters all lowercase, unique email address
birthDay Integer 1-31 day of birth
birthMonth Integer 1-12 month of birth
birthYear Integer >1900 year of birth
optIn Boolean true/false mailing opt in (default true)
street String 1 - 50 characters street
city String 1 - 50 characters city
state String Must in StateCode state
country String Must in CountryCode country
zip String zip code
favoriteTeams Array Each value must be in TeamCode favorite teams in order of preference
device Device device information

State Code

AK,AL,AR,AZ,CA,CO,CT,DC,DE,FL,
GA,GU,HI,IA,ID, IL,IN,KS,KY,LA,
MA,MD,ME,MH,MI,MN,MO,MS,MT,NC,ND,
NE,NH,NJ,NM,NV,NY, OH,OK,OR,PA,
PR,PW,RI,SC,SD,TN,TX,UT,VA,VI,VT,
WA,WI,WV,WY

Country Code

AFG,ALB,ALG,ASA,AND,ANGO,ANGU,ANTI,
ARG,ARM,ARU,AUS,AST,AZE,BAH,BHR,BI,
BAN,BAR,BAS,BEL,BLG,BLZ,BEN,BER,BHU,
BOL,BOS,BOT,BRA,BRU,BUL,BRK,BRD,CAM,
CMR,CAN,CV,VAY,CAR,CHA,CHI,CHN,CI,
COC,COL,COM,CON,CKI,CSA,COS,CRO,CUB,
CYP,CZE,DEN,DJI,DOM,DR,ET,ECU,EGY,
SAL,EQG,ERI,EST,ETH,EI,FAL,FAR,FIJ,
FIN,FRA,FG,FP,GAB,GMB,GAZ,GEO,GER,
GHA,GIB,GLO,GRE,GRN,GRA,GUA,GAM,GAT,
GUE,GUI,GB,GUY,HAI,HON,HK,HOW,HUN,
ICE,IND,IDO,IRA,IRQ,IRE,IOM,ISR,ITA,
IC,JAM,JAP,JAR,JER,JOH,JOR,JUA,KAZ,
KEN,KIN,KIR,KUW,KYR,LAS,LAT,LEB,LES,
LIB,LBY,LIE,LIT,LUX,MAC,MCD,MAD,MAL,
MLY,MLD,MLI,MLA,MI,MTQ,MAU,MAT,MAY,
MEX,MIC,MID,MOL,MON,MNG,MNT,MOR,MOZ,
MYA,NAM,NAU,NAV,NEP,NET,NAN,NCA,NZ,
NIC,NIG,NGA,NIU,NRI,NKO,NMI,NOR,OMA,
PAK,PAL,PLA,PAN,PNG,PAR,PER,PHI,PIT,
POL,POR,PR,QAT,REU,ROM,RUS,RWA,SH,
SKN,SL,SPM,SV,SAM,SAN,SAO,SAU,SEN,
SER,SEY,SIE,SIN,SLO,SLV,SOL,SOM,SAF,
SKO,SPA,SRI,SUD,SUR,SWA,SWE,SWI,SYR,
TAI,TAJ,TAN,THA,TOG,TOK,TON,TRI,TRO,
TUN,TUR,TRM,TAC,TUV,UGA,UKR,UAB,IK,
USA,URU,UZB,VAN,VAT,VEN,VIE,VIB,VIU,
WAK,WAL,WBK,WSA,YEM,YUG,ZAM,ZIM

Team Code

ARI,ATL,BAL,BUF,CAR,CHI,CIN,CLE,
DAL,DEN,DET,GB,HOU,IND,JAC,KC,
MIA,MIN,NE,NO,NYG,NYJ,OAK,PHI,
PIT,SD,SEA,SF,STL,TB,TEN,WAS

Device Type

Name Type Description
id string device unique id

Request JSON

{  
   "username":"jimmyreeds4",
   "password":"password",
   "firstName":"William",
   "lastName":"Somo",
   "emailAddress":"jimmyreed4@nfl.com",
   "street":"123 NFL Street",
   "city":"Culver City",
   "state":"CA",
   "country":"USA",
   "zip":"92330",
   "birthYear" : 1986,
   "birthMonth" : 10,
   "birthDay" : 10,
   "optIn" : "true",
   "favoriteTeams" : [
      "SF",
      "OAK",
      "STL"
   ],
   "device":{  
      "id":"68753A44-4D6F-1234-9D60-0050E4C11167"
   }
}

Response Status Code

Code Description Body
202 Accepted No body
400 Bad Request No body

Check if a username exists

GET HTTP /v1/users/{username}/exists

Header

Name Required Values Description
AUTHORIZATION Y Bearer {token} Used to attach access token for API call

Path Parameters

Name Description Type
username Desired username to check for String

Response Status Code

Code Description Body
200 OK Return true / false indicating the existence of that username