User Profile - MealsMadeEasy/Backend GitHub Wiki

/user/profile

This endpoint contains the user's personal bio and other preferences gathered during user onboarding and throughout use of the app. It contains a UserProfile object:

class UserProfile (
        gender: String, /* one of "MALE", "FEMALE", "OTHER", or "UNSPECIFIED" */
        birthday: Long, /* a timestamp in milliseconds since January 1, 1970 (UTC) */
        height: Int, /* in inches */
        weight: Int, /* in pounds */
)

Read (GET)

Requires Authentication

To get the user's current bio, use the GET verb on the /user/profile endpoint. If the operation is successful, you'll receive a UserProfile in JSON format. NOTE: This value may be null if the user has not completed onboarding yet.

Write (POST)

Requires Authentication

To set the user's current bio, use the POST verb on the user/profile endpoint. The body of this request must contain a valid, non-null UserProfile object in JSON format with all fields. If the operation is successful, the endpoint will return the message Ok with a 200 OK HTTP response code.