Contains basic user information, such as name and contact information. Could contain address information, or this could be obtained in separate call when editing. Advantage to immediately returning UserData is that if location services aren't enabled, we could localize their nearby restaurants based on shipping address.
UserData {
id: String // Whatever it's currently stored as
fullName: String
email: String
phoneNumber: String
streetAddress: String
city: String
state: String
zip: String
}
Parameters: Email
Used for determining if the user has an account with Foodie Card, or if they need to register their email with a card (or create an account)
Parameters: Email, Password
Returns UserData
or Error
if authentication failed
This would be basic authentication flow that most users would fall under. Their email was recognized, so they submitted credentials. Return UserData
if successful
Parameters: Full name, Foodie Card ID
Could return UserData
or simply the user's email as verification, since the user will still have to confirm their email
This is the screen for submitting the card info if their email was not recognized
Parameters: Email
This is for submitting confirmation email if the user recognizes the email provided. The email will contain a url with the URL scheme supported by the app, which would then open the app and confirm the email
Parameters: Email
Returns UserData
If email is confirmed, the user will need to create a password to be linked to their account. This password will be stored in database and used for authentication in the future
Parameters: Full Name, Email, Password, Zip Code, Mobile Number (optional)
Returns UserData
This will create a new user