# User Details

This endpoint returns a user

Endpoint: GET /api/v1/users
Version: 1.2.0
Security: user

## Security:

  - `user` (unknown)
    http bearer JWT

## Response 200:

  - `200` (unknown)
    Ok

## Response 200 fields (application/json):

  - `userId` (string)
    The userId assigned by EGYM, for example -1c2yqo37vn9m. Can be null on xID authentication if BMA User is not linked to EGYM account.
    Example: -1c2yqo37vn9m

  - `bmaUserId` (string)
    Temporary solution for Matrix. The BMA userId assigned by egym, for example d101df00-ab9d-40f5-8f03-3c50aaa364d6. Only available during xID authentication
    Example: d101df01-ab9d-40f5-8f03-3c50aaa364d6

  - `firstName` (string, required)
    The user's first name.

  - `lastName` (string)
    The user's last name.

  - `image` (object)

  - `image.imageType` (string)
    Enum: "EXERCISE", "EQUIPMENT", "AVATAR", "COVER", "GYM_BANNER", "GYM_PROFILE", "GYM_HEADER", "GYM", "CHART", "BLOG", "PARTNER", "MOBILESPLASH", "SIGNATURE", "CARDIOSCAN", "MUSCLES", "SHARED"

  - `image.imageId` (string)

  - `email` (string)
    The email address of the user. Not available by default. Only available if needed for use case.

  - `gender` (string)
    The gender of the user.
    Enum: "MALE", "FEMALE", "NON_BINARY"

  - `dateOfBirth` (string)
    The date of birth in ISO 8601 format (yyyy-MM-dd).

  - `optIns` (object)
    List of opt-ins.

  - `height` (number)
    The body height of the user in centimeters.
    Example: 180

  - `weight` (number)
    The body weight of the user in kilograms.
    Example: 75

  - `locale` (string)
    The user locale is either in ISO 15897 standard format. i.e.: 'en_US' or just language. i.e.: 'en'
    Example: en_US

  - `unitSystem` (string)
    The user Unit System.
    Enum: "METRIC", "US_CUSTOMARY", "IMPERIAL"

  - `trainingGoal` (string)
    The user training goal.
    Enum: "WEIGHT_LOSS", "FITNESS", "MUSCLE_GAIN", "BBP", "BBP_AND_WEIGHT_LOSS", "REHASPORT"

  - `trainingProgram` (string)
    The Smart Cardio training program.
    Enum: "WEIGHT_LOSS", "FITNESS", "MUSCLE_GAIN", "BBP", "BBP_AND_WEIGHT_LOSS", "REHASPORT", "IMMUNITY"

  - `trainingPlanPreferences` (object)

  - `trainingPlanPreferences.trainingGoalType` (string)
    Goal type overrides the trainingGoal and trainingProgram
    Enum: "WEIGHT_LOSS", "MUSCLE_BUILDING", "GENERAL_FITNESS", "BODY_TONING", "REHA_FIT", "ATHLETIC"

  - `trainingPlanPreferences.trainingExperience` (string)
    Denotes the user experience level from beginner to very advanced
    Enum: "BEGINNER", "BEGINNER_INTERMEDIATE", "INTERMEDIATE", "INTERMEDIATE_ADVANCED", "ADVANCED", "VERY_ADVANCED"

  - `trainingPlanPreferences.daysPerWeek` (integer)
    User's preference for number of training days in a week

  - `trainingPlanPreferences.trainingMuscleGroupPreferences` (array)
    Denotes the user's muscle targeting preferences

  - `trainingPlanPreferences.trainingMuscleGroupPreferences.muscleGroup` (string)
    Denotes which muscle group is targeted in this preference setting
    Enum: "NECK_AND_SHOULDERS", "ARMS", "CHEST", "UPPER_BACK", "ABDOMINAL", "LOWER_BACK", "HIP", "BUTTOCK", "THIGHS", "CALVES"

  - `trainingPlanPreferences.trainingMuscleGroupPreferences.muscleGroupIntent` (string)
    Denotes the intention with the targeted muscle group. Currently can be Focus or Exclude
    Enum: "FOCUS", "EXCLUDE"

  - `trainingPlanPreferences.workoutDurationInMinutes` (integer)
    User's preferred duration for a training session

  - `onboardingChecklist` (object)

  - `onboardingChecklist.preferences` (object)

  - `onboardingChecklist.preferences.state` (string)
    Denotes whether the onboarding checklist item is complete, incomplete or expired
    Enum: "UNSPECIFIED", "INCOMPLETE", "COMPLETE", "EXPIRED"

  - `onboardingChecklist.preferences.expiresAt` (string)
    Date of expiration for this checklist item

  - `termsAndConditionsAccepted` (boolean)
    Informs if the terms and conditions of EGYM have been accepted.

  - `cardioTestInfo` (object)

  - `cardioTestInfo.reminder` (integer)
    The date of the next cardio-test.
    Example: 1553074207520

  - `cardioTestInfo.instructions` (array)
    The instructions to the next step.

## Response 400:

  - `400` (unknown)
    Bad Request

## Response 400 fields (application/json):

  - `timestamp` (integer)
    Unix epoch milliseconds when the error occurred.
    Example: 1775122463109

  - `path` (string)
    The request path that triggered the error.
    Example: /api/v1/measurements/body/history

  - `status` (integer)
    HTTP status code.
    Example: 400

  - `error` (string)
    Short textual description of the HTTP status.
    Example: Bad Request

  - `requestId` (string)
    Unique identifier for the request, useful for correlating logs and support tickets.
    Example: d0c0fd9e-236

  - `message` (string)
    Human-readable description of the error.
    Example: Invalid request parameters: value must be greater than or equal to 1 and less than or equal to 1000

  - `fieldErrors` (array)
    List of field-level validation errors. Only present when the error was caused by request-body binding failures or custom form validation.

  - `fieldErrors.name` (string)
    The field name.

  - `fieldErrors.message` (string)
    The error message.
    Example: Must not be null.

  - `fieldErrors.rejectedValue` (any)
    The rejected value.
    Example: Must not be null.

  - `errorCode` (string)
    Machine-readable error code for domain-specific errors. Only present for exceptions that carry a custom error code.
    Example: USER_NOT_FOUND

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 404:

  - `404` (unknown)
    Not Found

## Response 404 fields (application/json):

  - `timestamp` (integer)
    Unix epoch milliseconds when the error occurred.
    Example: 1775122463109

  - `path` (string)
    The request path that triggered the error.
    Example: /api/v1/measurements/body/history

  - `status` (integer)
    HTTP status code.
    Example: 400

  - `error` (string)
    Short textual description of the HTTP status.
    Example: Bad Request

  - `requestId` (string)
    Unique identifier for the request, useful for correlating logs and support tickets.
    Example: d0c0fd9e-236

  - `message` (string)
    Human-readable description of the error.
    Example: Invalid request parameters: value must be greater than or equal to 1 and less than or equal to 1000

  - `fieldErrors` (array)
    List of field-level validation errors. Only present when the error was caused by request-body binding failures or custom form validation.

  - `fieldErrors.name` (string)
    The field name.

  - `fieldErrors.message` (string)
    The error message.
    Example: Must not be null.

  - `fieldErrors.rejectedValue` (any)
    The rejected value.
    Example: Must not be null.

  - `errorCode` (string)
    Machine-readable error code for domain-specific errors. Only present for exceptions that carry a custom error code.
    Example: USER_NOT_FOUND

## Response 500:

  - `500` (unknown)
    Internal Server Error

## Response 500 fields (application/json):

  - `timestamp` (integer)
    Unix epoch milliseconds when the error occurred.
    Example: 1775122463109

  - `path` (string)
    The request path that triggered the error.
    Example: /api/v1/measurements/body/history

  - `status` (integer)
    HTTP status code.
    Example: 400

  - `error` (string)
    Short textual description of the HTTP status.
    Example: Bad Request

  - `requestId` (string)
    Unique identifier for the request, useful for correlating logs and support tickets.
    Example: d0c0fd9e-236

  - `message` (string)
    Human-readable description of the error.
    Example: Invalid request parameters: value must be greater than or equal to 1 and less than or equal to 1000

  - `fieldErrors` (array)
    List of field-level validation errors. Only present when the error was caused by request-body binding failures or custom form validation.

  - `fieldErrors.name` (string)
    The field name.

  - `fieldErrors.message` (string)
    The error message.
    Example: Must not be null.

  - `fieldErrors.rejectedValue` (any)
    The rejected value.
    Example: Must not be null.

  - `errorCode` (string)
    Machine-readable error code for domain-specific errors. Only present for exceptions that carry a custom error code.
    Example: USER_NOT_FOUND

